...

Source file src/go.formulabun.club/translator/client/model_file_needed_inner.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  )
    16  
    17  // FileNeededInner struct for FileNeededInner
    18  type FileNeededInner struct {
    19  	WillSend *bool `json:"WillSend,omitempty"`
    20  	TotalSize *float32 `json:"TotalSize,omitempty"`
    21  	FileName *string `json:"FileName,omitempty"`
    22  	MD5 []float32 `json:"MD5,omitempty"`
    23  }
    24  
    25  // NewFileNeededInner instantiates a new FileNeededInner object
    26  // This constructor will assign default values to properties that have it defined,
    27  // and makes sure properties required by API are set, but the set of arguments
    28  // will change when the set of required properties is changed
    29  func NewFileNeededInner() *FileNeededInner {
    30  	this := FileNeededInner{}
    31  	return &this
    32  }
    33  
    34  // NewFileNeededInnerWithDefaults instantiates a new FileNeededInner object
    35  // This constructor will only assign default values to properties that have it defined,
    36  // but it doesn't guarantee that properties required by API are set
    37  func NewFileNeededInnerWithDefaults() *FileNeededInner {
    38  	this := FileNeededInner{}
    39  	return &this
    40  }
    41  
    42  // GetWillSend returns the WillSend field value if set, zero value otherwise.
    43  func (o *FileNeededInner) GetWillSend() bool {
    44  	if o == nil || o.WillSend == nil {
    45  		var ret bool
    46  		return ret
    47  	}
    48  	return *o.WillSend
    49  }
    50  
    51  // GetWillSendOk returns a tuple with the WillSend field value if set, nil otherwise
    52  // and a boolean to check if the value has been set.
    53  func (o *FileNeededInner) GetWillSendOk() (*bool, bool) {
    54  	if o == nil || o.WillSend == nil {
    55  		return nil, false
    56  	}
    57  	return o.WillSend, true
    58  }
    59  
    60  // HasWillSend returns a boolean if a field has been set.
    61  func (o *FileNeededInner) HasWillSend() bool {
    62  	if o != nil && o.WillSend != nil {
    63  		return true
    64  	}
    65  
    66  	return false
    67  }
    68  
    69  // SetWillSend gets a reference to the given bool and assigns it to the WillSend field.
    70  func (o *FileNeededInner) SetWillSend(v bool) {
    71  	o.WillSend = &v
    72  }
    73  
    74  // GetTotalSize returns the TotalSize field value if set, zero value otherwise.
    75  func (o *FileNeededInner) GetTotalSize() float32 {
    76  	if o == nil || o.TotalSize == nil {
    77  		var ret float32
    78  		return ret
    79  	}
    80  	return *o.TotalSize
    81  }
    82  
    83  // GetTotalSizeOk returns a tuple with the TotalSize field value if set, nil otherwise
    84  // and a boolean to check if the value has been set.
    85  func (o *FileNeededInner) GetTotalSizeOk() (*float32, bool) {
    86  	if o == nil || o.TotalSize == nil {
    87  		return nil, false
    88  	}
    89  	return o.TotalSize, true
    90  }
    91  
    92  // HasTotalSize returns a boolean if a field has been set.
    93  func (o *FileNeededInner) HasTotalSize() bool {
    94  	if o != nil && o.TotalSize != nil {
    95  		return true
    96  	}
    97  
    98  	return false
    99  }
   100  
   101  // SetTotalSize gets a reference to the given float32 and assigns it to the TotalSize field.
   102  func (o *FileNeededInner) SetTotalSize(v float32) {
   103  	o.TotalSize = &v
   104  }
   105  
   106  // GetFileName returns the FileName field value if set, zero value otherwise.
   107  func (o *FileNeededInner) GetFileName() string {
   108  	if o == nil || o.FileName == nil {
   109  		var ret string
   110  		return ret
   111  	}
   112  	return *o.FileName
   113  }
   114  
   115  // GetFileNameOk returns a tuple with the FileName field value if set, nil otherwise
   116  // and a boolean to check if the value has been set.
   117  func (o *FileNeededInner) GetFileNameOk() (*string, bool) {
   118  	if o == nil || o.FileName == nil {
   119  		return nil, false
   120  	}
   121  	return o.FileName, true
   122  }
   123  
   124  // HasFileName returns a boolean if a field has been set.
   125  func (o *FileNeededInner) HasFileName() bool {
   126  	if o != nil && o.FileName != nil {
   127  		return true
   128  	}
   129  
   130  	return false
   131  }
   132  
   133  // SetFileName gets a reference to the given string and assigns it to the FileName field.
   134  func (o *FileNeededInner) SetFileName(v string) {
   135  	o.FileName = &v
   136  }
   137  
   138  // GetMD5 returns the MD5 field value if set, zero value otherwise.
   139  func (o *FileNeededInner) GetMD5() []float32 {
   140  	if o == nil || o.MD5 == nil {
   141  		var ret []float32
   142  		return ret
   143  	}
   144  	return o.MD5
   145  }
   146  
   147  // GetMD5Ok returns a tuple with the MD5 field value if set, nil otherwise
   148  // and a boolean to check if the value has been set.
   149  func (o *FileNeededInner) GetMD5Ok() ([]float32, bool) {
   150  	if o == nil || o.MD5 == nil {
   151  		return nil, false
   152  	}
   153  	return o.MD5, true
   154  }
   155  
   156  // HasMD5 returns a boolean if a field has been set.
   157  func (o *FileNeededInner) HasMD5() bool {
   158  	if o != nil && o.MD5 != nil {
   159  		return true
   160  	}
   161  
   162  	return false
   163  }
   164  
   165  // SetMD5 gets a reference to the given []float32 and assigns it to the MD5 field.
   166  func (o *FileNeededInner) SetMD5(v []float32) {
   167  	o.MD5 = v
   168  }
   169  
   170  func (o FileNeededInner) MarshalJSON() ([]byte, error) {
   171  	toSerialize := map[string]interface{}{}
   172  	if o.WillSend != nil {
   173  		toSerialize["WillSend"] = o.WillSend
   174  	}
   175  	if o.TotalSize != nil {
   176  		toSerialize["TotalSize"] = o.TotalSize
   177  	}
   178  	if o.FileName != nil {
   179  		toSerialize["FileName"] = o.FileName
   180  	}
   181  	if o.MD5 != nil {
   182  		toSerialize["MD5"] = o.MD5
   183  	}
   184  	return json.Marshal(toSerialize)
   185  }
   186  
   187  type NullableFileNeededInner struct {
   188  	value *FileNeededInner
   189  	isSet bool
   190  }
   191  
   192  func (v NullableFileNeededInner) Get() *FileNeededInner {
   193  	return v.value
   194  }
   195  
   196  func (v *NullableFileNeededInner) Set(val *FileNeededInner) {
   197  	v.value = val
   198  	v.isSet = true
   199  }
   200  
   201  func (v NullableFileNeededInner) IsSet() bool {
   202  	return v.isSet
   203  }
   204  
   205  func (v *NullableFileNeededInner) Unset() {
   206  	v.value = nil
   207  	v.isSet = false
   208  }
   209  
   210  func NewNullableFileNeededInner(val *FileNeededInner) *NullableFileNeededInner {
   211  	return &NullableFileNeededInner{value: val, isSet: true}
   212  }
   213  
   214  func (v NullableFileNeededInner) MarshalJSON() ([]byte, error) {
   215  	return json.Marshal(v.value)
   216  }
   217  
   218  func (v *NullableFileNeededInner) UnmarshalJSON(src []byte) error {
   219  	v.isSet = true
   220  	return json.Unmarshal(src, &v.value)
   221  }
   222  
   223  
   224  

View as plain text