-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPublicCreateQRCodeRequest.ts
More file actions
137 lines (126 loc) · 4.36 KB
/
Copy pathPublicCreateQRCodeRequest.ts
File metadata and controls
137 lines (126 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/* tslint:disable */
/* eslint-disable */
/**
* Bitly API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 4.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { QRCodeCustomizationsPublic } from './QRCodeCustomizationsPublic';
import {
QRCodeCustomizationsPublicFromJSON,
QRCodeCustomizationsPublicFromJSONTyped,
QRCodeCustomizationsPublicToJSON,
QRCodeCustomizationsPublicToJSONTyped,
} from './QRCodeCustomizationsPublic';
import type { QRCodeDestination } from './QRCodeDestination';
import {
QRCodeDestinationFromJSON,
QRCodeDestinationFromJSONTyped,
QRCodeDestinationToJSON,
QRCodeDestinationToJSONTyped,
} from './QRCodeDestination';
import type { GS1Metadata } from './GS1Metadata';
import {
GS1MetadataFromJSON,
GS1MetadataFromJSONTyped,
GS1MetadataToJSON,
GS1MetadataToJSONTyped,
} from './GS1Metadata';
/**
* Customization and content values for a QR code created through the public API
* @export
* @interface PublicCreateQRCodeRequest
*/
export interface PublicCreateQRCodeRequest {
/**
* The title of the QR Code
* @type {string}
* @memberof PublicCreateQRCodeRequest
*/
title?: string;
/**
* Identify which group to place the QR Code.
* @type {string}
* @memberof PublicCreateQRCodeRequest
*/
group_guid: string;
/**
*
* @type {QRCodeCustomizationsPublic}
* @memberof PublicCreateQRCodeRequest
*/
render_customizations?: QRCodeCustomizationsPublic;
/**
* A boolean representing if the QR code should be archived (hidden from the UI) upon creation
* @type {boolean}
* @memberof PublicCreateQRCodeRequest
*/
archived?: boolean;
/**
*
* @type {QRCodeDestination}
* @memberof PublicCreateQRCodeRequest
*/
destination: QRCodeDestination;
/**
*
* @type {GS1Metadata}
* @memberof PublicCreateQRCodeRequest
*/
gs1?: GS1Metadata;
/**
* Coming soon
* @type {string}
* @memberof PublicCreateQRCodeRequest
*/
expiration_at?: string;
}
/**
* Check if a given object implements the PublicCreateQRCodeRequest interface.
*/
export function instanceOfPublicCreateQRCodeRequest(value: object): value is PublicCreateQRCodeRequest {
if (!('group_guid' in value) || value['group_guid'] === undefined) return false;
if (!('destination' in value) || value['destination'] === undefined) return false;
return true;
}
export function PublicCreateQRCodeRequestFromJSON(json: any): PublicCreateQRCodeRequest {
return PublicCreateQRCodeRequestFromJSONTyped(json, false);
}
export function PublicCreateQRCodeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicCreateQRCodeRequest {
if (json == null) {
return json;
}
return {
'title': json['title'] == null ? undefined : json['title'],
'group_guid': json['group_guid'],
'render_customizations': json['render_customizations'] == null ? undefined : QRCodeCustomizationsPublicFromJSON(json['render_customizations']),
'archived': json['archived'] == null ? undefined : json['archived'],
'destination': QRCodeDestinationFromJSON(json['destination']),
'gs1': json['gs1'] == null ? undefined : GS1MetadataFromJSON(json['gs1']),
'expiration_at': json['expiration_at'] == null ? undefined : json['expiration_at'],
};
}
export function PublicCreateQRCodeRequestToJSON(json: any): PublicCreateQRCodeRequest {
return PublicCreateQRCodeRequestToJSONTyped(json, false);
}
export function PublicCreateQRCodeRequestToJSONTyped(value?: PublicCreateQRCodeRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'title': value['title'],
'group_guid': value['group_guid'],
'render_customizations': QRCodeCustomizationsPublicToJSON(value['render_customizations']),
'archived': value['archived'],
'destination': QRCodeDestinationToJSON(value['destination']),
'gs1': GS1MetadataToJSON(value['gs1']),
'expiration_at': value['expiration_at'],
};
}