...

Source file src/go.formulabun.club/translator/client/utils.go

Documentation: go.formulabun.club/translator/client

     1  /*
     2  Translator service between a srb2kart server and json
     3  
     4  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5  
     6  API version: 0.0.1
     7  */
     8  
     9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
    10  
    11  package openapi
    12  
    13  import (
    14  	"encoding/json"
    15  	"time"
    16  )
    17  
    18  // PtrBool is a helper routine that returns a pointer to given boolean value.
    19  func PtrBool(v bool) *bool { return &v }
    20  
    21  // PtrInt is a helper routine that returns a pointer to given integer value.
    22  func PtrInt(v int) *int { return &v }
    23  
    24  // PtrInt32 is a helper routine that returns a pointer to given integer value.
    25  func PtrInt32(v int32) *int32 { return &v }
    26  
    27  // PtrInt64 is a helper routine that returns a pointer to given integer value.
    28  func PtrInt64(v int64) *int64 { return &v }
    29  
    30  // PtrFloat32 is a helper routine that returns a pointer to given float value.
    31  func PtrFloat32(v float32) *float32 { return &v }
    32  
    33  // PtrFloat64 is a helper routine that returns a pointer to given float value.
    34  func PtrFloat64(v float64) *float64 { return &v }
    35  
    36  // PtrString is a helper routine that returns a pointer to given string value.
    37  func PtrString(v string) *string { return &v }
    38  
    39  // PtrTime is helper routine that returns a pointer to given Time value.
    40  func PtrTime(v time.Time) *time.Time { return &v }
    41  
    42  type NullableBool struct {
    43  	value *bool
    44  	isSet bool
    45  }
    46  
    47  func (v NullableBool) Get() *bool {
    48  	return v.value
    49  }
    50  
    51  func (v *NullableBool) Set(val *bool) {
    52  	v.value = val
    53  	v.isSet = true
    54  }
    55  
    56  func (v NullableBool) IsSet() bool {
    57  	return v.isSet
    58  }
    59  
    60  func (v *NullableBool) Unset() {
    61  	v.value = nil
    62  	v.isSet = false
    63  }
    64  
    65  func NewNullableBool(val *bool) *NullableBool {
    66  	return &NullableBool{value: val, isSet: true}
    67  }
    68  
    69  func (v NullableBool) MarshalJSON() ([]byte, error) {
    70  	return json.Marshal(v.value)
    71  }
    72  
    73  func (v *NullableBool) UnmarshalJSON(src []byte) error {
    74  	v.isSet = true
    75  	return json.Unmarshal(src, &v.value)
    76  }
    77  
    78  type NullableInt struct {
    79  	value *int
    80  	isSet bool
    81  }
    82  
    83  func (v NullableInt) Get() *int {
    84  	return v.value
    85  }
    86  
    87  func (v *NullableInt) Set(val *int) {
    88  	v.value = val
    89  	v.isSet = true
    90  }
    91  
    92  func (v NullableInt) IsSet() bool {
    93  	return v.isSet
    94  }
    95  
    96  func (v *NullableInt) Unset() {
    97  	v.value = nil
    98  	v.isSet = false
    99  }
   100  
   101  func NewNullableInt(val *int) *NullableInt {
   102  	return &NullableInt{value: val, isSet: true}
   103  }
   104  
   105  func (v NullableInt) MarshalJSON() ([]byte, error) {
   106  	return json.Marshal(v.value)
   107  }
   108  
   109  func (v *NullableInt) UnmarshalJSON(src []byte) error {
   110  	v.isSet = true
   111  	return json.Unmarshal(src, &v.value)
   112  }
   113  
   114  type NullableInt32 struct {
   115  	value *int32
   116  	isSet bool
   117  }
   118  
   119  func (v NullableInt32) Get() *int32 {
   120  	return v.value
   121  }
   122  
   123  func (v *NullableInt32) Set(val *int32) {
   124  	v.value = val
   125  	v.isSet = true
   126  }
   127  
   128  func (v NullableInt32) IsSet() bool {
   129  	return v.isSet
   130  }
   131  
   132  func (v *NullableInt32) Unset() {
   133  	v.value = nil
   134  	v.isSet = false
   135  }
   136  
   137  func NewNullableInt32(val *int32) *NullableInt32 {
   138  	return &NullableInt32{value: val, isSet: true}
   139  }
   140  
   141  func (v NullableInt32) MarshalJSON() ([]byte, error) {
   142  	return json.Marshal(v.value)
   143  }
   144  
   145  func (v *NullableInt32) UnmarshalJSON(src []byte) error {
   146  	v.isSet = true
   147  	return json.Unmarshal(src, &v.value)
   148  }
   149  
   150  type NullableInt64 struct {
   151  	value *int64
   152  	isSet bool
   153  }
   154  
   155  func (v NullableInt64) Get() *int64 {
   156  	return v.value
   157  }
   158  
   159  func (v *NullableInt64) Set(val *int64) {
   160  	v.value = val
   161  	v.isSet = true
   162  }
   163  
   164  func (v NullableInt64) IsSet() bool {
   165  	return v.isSet
   166  }
   167  
   168  func (v *NullableInt64) Unset() {
   169  	v.value = nil
   170  	v.isSet = false
   171  }
   172  
   173  func NewNullableInt64(val *int64) *NullableInt64 {
   174  	return &NullableInt64{value: val, isSet: true}
   175  }
   176  
   177  func (v NullableInt64) MarshalJSON() ([]byte, error) {
   178  	return json.Marshal(v.value)
   179  }
   180  
   181  func (v *NullableInt64) UnmarshalJSON(src []byte) error {
   182  	v.isSet = true
   183  	return json.Unmarshal(src, &v.value)
   184  }
   185  
   186  type NullableFloat32 struct {
   187  	value *float32
   188  	isSet bool
   189  }
   190  
   191  func (v NullableFloat32) Get() *float32 {
   192  	return v.value
   193  }
   194  
   195  func (v *NullableFloat32) Set(val *float32) {
   196  	v.value = val
   197  	v.isSet = true
   198  }
   199  
   200  func (v NullableFloat32) IsSet() bool {
   201  	return v.isSet
   202  }
   203  
   204  func (v *NullableFloat32) Unset() {
   205  	v.value = nil
   206  	v.isSet = false
   207  }
   208  
   209  func NewNullableFloat32(val *float32) *NullableFloat32 {
   210  	return &NullableFloat32{value: val, isSet: true}
   211  }
   212  
   213  func (v NullableFloat32) MarshalJSON() ([]byte, error) {
   214  	return json.Marshal(v.value)
   215  }
   216  
   217  func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
   218  	v.isSet = true
   219  	return json.Unmarshal(src, &v.value)
   220  }
   221  
   222  type NullableFloat64 struct {
   223  	value *float64
   224  	isSet bool
   225  }
   226  
   227  func (v NullableFloat64) Get() *float64 {
   228  	return v.value
   229  }
   230  
   231  func (v *NullableFloat64) Set(val *float64) {
   232  	v.value = val
   233  	v.isSet = true
   234  }
   235  
   236  func (v NullableFloat64) IsSet() bool {
   237  	return v.isSet
   238  }
   239  
   240  func (v *NullableFloat64) Unset() {
   241  	v.value = nil
   242  	v.isSet = false
   243  }
   244  
   245  func NewNullableFloat64(val *float64) *NullableFloat64 {
   246  	return &NullableFloat64{value: val, isSet: true}
   247  }
   248  
   249  func (v NullableFloat64) MarshalJSON() ([]byte, error) {
   250  	return json.Marshal(v.value)
   251  }
   252  
   253  func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
   254  	v.isSet = true
   255  	return json.Unmarshal(src, &v.value)
   256  }
   257  
   258  type NullableString struct {
   259  	value *string
   260  	isSet bool
   261  }
   262  
   263  func (v NullableString) Get() *string {
   264  	return v.value
   265  }
   266  
   267  func (v *NullableString) Set(val *string) {
   268  	v.value = val
   269  	v.isSet = true
   270  }
   271  
   272  func (v NullableString) IsSet() bool {
   273  	return v.isSet
   274  }
   275  
   276  func (v *NullableString) Unset() {
   277  	v.value = nil
   278  	v.isSet = false
   279  }
   280  
   281  func NewNullableString(val *string) *NullableString {
   282  	return &NullableString{value: val, isSet: true}
   283  }
   284  
   285  func (v NullableString) MarshalJSON() ([]byte, error) {
   286  	return json.Marshal(v.value)
   287  }
   288  
   289  func (v *NullableString) UnmarshalJSON(src []byte) error {
   290  	v.isSet = true
   291  	return json.Unmarshal(src, &v.value)
   292  }
   293  
   294  type NullableTime struct {
   295  	value *time.Time
   296  	isSet bool
   297  }
   298  
   299  func (v NullableTime) Get() *time.Time {
   300  	return v.value
   301  }
   302  
   303  func (v *NullableTime) Set(val *time.Time) {
   304  	v.value = val
   305  	v.isSet = true
   306  }
   307  
   308  func (v NullableTime) IsSet() bool {
   309  	return v.isSet
   310  }
   311  
   312  func (v *NullableTime) Unset() {
   313  	v.value = nil
   314  	v.isSet = false
   315  }
   316  
   317  func NewNullableTime(val *time.Time) *NullableTime {
   318  	return &NullableTime{value: val, isSet: true}
   319  }
   320  
   321  func (v NullableTime) MarshalJSON() ([]byte, error) {
   322  	return v.value.MarshalJSON()
   323  }
   324  
   325  func (v *NullableTime) UnmarshalJSON(src []byte) error {
   326  	v.isSet = true
   327  	return json.Unmarshal(src, &v.value)
   328  }
   329  

View as plain text