-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel_project_status_dto.go
201 lines (165 loc) · 6.42 KB
/
model_project_status_dto.go
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/*
Localizely API
<h2>Getting started</h2><p>Localizely API is built on <a href=\"https://en.wikipedia.org/wiki/Representational_state_transfer\" target=\"_blank\">REST</a>. <br>You can use this API for importing & exporting your localization files in order to automate the process with `curl` scripts or external <a href=\"https://en.wikipedia.org/wiki/Continuous_integration\" target=\"_blank\">CI</a> tools. <br>Response is returned in JSON form even in case of error. <br></p><p>If you Authenticate with your API token on this page by clicking \"Authorize\" button, you can make API calls directly from here with \"Try it out\", and generate such `curl` examples. </p><h2>API Authentication</h2><p>Authenticate your account by sending your API token as a request header `X-Api-Token`. <br>The token can be found under <a href=\"https://app.localizely.com/account\" target=\"_blank\">My Profile</a> page. <br>A user must have an Admin role in the project in order to access the project with his token. <br>API requests without authentication will fail.</p><p><b>Base url:</b> `https://api.localizely.com`</p>
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package localizely
import (
"encoding/json"
)
// checks if the ProjectStatusDto type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectStatusDto{}
// ProjectStatusDto struct for ProjectStatusDto
type ProjectStatusDto struct {
// Total number of string keys in the project
Strings *int32 `json:"strings,omitempty"`
// Total reviewed progress across all languages, in percentage
ReviewedProgress *int32 `json:"reviewedProgress,omitempty"`
// Translation status per language
Languages []ProjectLocaleStatsDto `json:"languages,omitempty"`
}
// NewProjectStatusDto instantiates a new ProjectStatusDto object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewProjectStatusDto() *ProjectStatusDto {
this := ProjectStatusDto{}
return &this
}
// NewProjectStatusDtoWithDefaults instantiates a new ProjectStatusDto object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewProjectStatusDtoWithDefaults() *ProjectStatusDto {
this := ProjectStatusDto{}
return &this
}
// GetStrings returns the Strings field value if set, zero value otherwise.
func (o *ProjectStatusDto) GetStrings() int32 {
if o == nil || IsNil(o.Strings) {
var ret int32
return ret
}
return *o.Strings
}
// GetStringsOk returns a tuple with the Strings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectStatusDto) GetStringsOk() (*int32, bool) {
if o == nil || IsNil(o.Strings) {
return nil, false
}
return o.Strings, true
}
// HasStrings returns a boolean if a field has been set.
func (o *ProjectStatusDto) HasStrings() bool {
if o != nil && !IsNil(o.Strings) {
return true
}
return false
}
// SetStrings gets a reference to the given int32 and assigns it to the Strings field.
func (o *ProjectStatusDto) SetStrings(v int32) {
o.Strings = &v
}
// GetReviewedProgress returns the ReviewedProgress field value if set, zero value otherwise.
func (o *ProjectStatusDto) GetReviewedProgress() int32 {
if o == nil || IsNil(o.ReviewedProgress) {
var ret int32
return ret
}
return *o.ReviewedProgress
}
// GetReviewedProgressOk returns a tuple with the ReviewedProgress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectStatusDto) GetReviewedProgressOk() (*int32, bool) {
if o == nil || IsNil(o.ReviewedProgress) {
return nil, false
}
return o.ReviewedProgress, true
}
// HasReviewedProgress returns a boolean if a field has been set.
func (o *ProjectStatusDto) HasReviewedProgress() bool {
if o != nil && !IsNil(o.ReviewedProgress) {
return true
}
return false
}
// SetReviewedProgress gets a reference to the given int32 and assigns it to the ReviewedProgress field.
func (o *ProjectStatusDto) SetReviewedProgress(v int32) {
o.ReviewedProgress = &v
}
// GetLanguages returns the Languages field value if set, zero value otherwise.
func (o *ProjectStatusDto) GetLanguages() []ProjectLocaleStatsDto {
if o == nil || IsNil(o.Languages) {
var ret []ProjectLocaleStatsDto
return ret
}
return o.Languages
}
// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectStatusDto) GetLanguagesOk() ([]ProjectLocaleStatsDto, bool) {
if o == nil || IsNil(o.Languages) {
return nil, false
}
return o.Languages, true
}
// HasLanguages returns a boolean if a field has been set.
func (o *ProjectStatusDto) HasLanguages() bool {
if o != nil && !IsNil(o.Languages) {
return true
}
return false
}
// SetLanguages gets a reference to the given []ProjectLocaleStatsDto and assigns it to the Languages field.
func (o *ProjectStatusDto) SetLanguages(v []ProjectLocaleStatsDto) {
o.Languages = v
}
func (o ProjectStatusDto) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectStatusDto) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Strings) {
toSerialize["strings"] = o.Strings
}
if !IsNil(o.ReviewedProgress) {
toSerialize["reviewedProgress"] = o.ReviewedProgress
}
if !IsNil(o.Languages) {
toSerialize["languages"] = o.Languages
}
return toSerialize, nil
}
type NullableProjectStatusDto struct {
value *ProjectStatusDto
isSet bool
}
func (v NullableProjectStatusDto) Get() *ProjectStatusDto {
return v.value
}
func (v *NullableProjectStatusDto) Set(val *ProjectStatusDto) {
v.value = val
v.isSet = true
}
func (v NullableProjectStatusDto) IsSet() bool {
return v.isSet
}
func (v *NullableProjectStatusDto) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectStatusDto(val *ProjectStatusDto) *NullableProjectStatusDto {
return &NullableProjectStatusDto{value: val, isSet: true}
}
func (v NullableProjectStatusDto) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectStatusDto) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}