github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_display_info.go (about)

     1  /*
     2   * Cios Openapi
     3   *
     4   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5   *
     6   * API version: 1.0.1
     7   */
     8  
     9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
    10  
    11  package cios
    12  
    13  import (
    14  	"encoding/json"
    15  )
    16  
    17  // DisplayInfo struct for DisplayInfo
    18  type DisplayInfo struct {
    19  	Name string `json:"name"`
    20  	Description *string `json:"description,omitempty"`
    21  	Language string `json:"language"`
    22  	Script *string `json:"script,omitempty"`
    23  	Region *string `json:"region,omitempty"`
    24  	IsDefault bool `json:"is_default"`
    25  }
    26  
    27  // NewDisplayInfo instantiates a new DisplayInfo object
    28  // This constructor will assign default values to properties that have it defined,
    29  // and makes sure properties required by API are set, but the set of arguments
    30  // will change when the set of required properties is changed
    31  func NewDisplayInfo(name string, language string, isDefault bool, ) *DisplayInfo {
    32  	this := DisplayInfo{}
    33  	this.Name = name
    34  	this.Language = language
    35  	this.IsDefault = isDefault
    36  	return &this
    37  }
    38  
    39  // NewDisplayInfoWithDefaults instantiates a new DisplayInfo object
    40  // This constructor will only assign default values to properties that have it defined,
    41  // but it doesn't guarantee that properties required by API are set
    42  func NewDisplayInfoWithDefaults() *DisplayInfo {
    43  	this := DisplayInfo{}
    44  	return &this
    45  }
    46  
    47  // GetName returns the Name field value
    48  func (o *DisplayInfo) GetName() string {
    49  	if o == nil  {
    50  		var ret string
    51  		return ret
    52  	}
    53  
    54  	return o.Name
    55  }
    56  
    57  // GetNameOk returns a tuple with the Name field value
    58  // and a boolean to check if the value has been set.
    59  func (o *DisplayInfo) GetNameOk() (*string, bool) {
    60  	if o == nil  {
    61  		return nil, false
    62  	}
    63  	return &o.Name, true
    64  }
    65  
    66  // SetName sets field value
    67  func (o *DisplayInfo) SetName(v string) {
    68  	o.Name = v
    69  }
    70  
    71  // GetDescription returns the Description field value if set, zero value otherwise.
    72  func (o *DisplayInfo) GetDescription() string {
    73  	if o == nil || o.Description == nil {
    74  		var ret string
    75  		return ret
    76  	}
    77  	return *o.Description
    78  }
    79  
    80  // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
    81  // and a boolean to check if the value has been set.
    82  func (o *DisplayInfo) GetDescriptionOk() (*string, bool) {
    83  	if o == nil || o.Description == nil {
    84  		return nil, false
    85  	}
    86  	return o.Description, true
    87  }
    88  
    89  // HasDescription returns a boolean if a field has been set.
    90  func (o *DisplayInfo) HasDescription() bool {
    91  	if o != nil && o.Description != nil {
    92  		return true
    93  	}
    94  
    95  	return false
    96  }
    97  
    98  // SetDescription gets a reference to the given string and assigns it to the Description field.
    99  func (o *DisplayInfo) SetDescription(v string) {
   100  	o.Description = &v
   101  }
   102  
   103  // GetLanguage returns the Language field value
   104  func (o *DisplayInfo) GetLanguage() string {
   105  	if o == nil  {
   106  		var ret string
   107  		return ret
   108  	}
   109  
   110  	return o.Language
   111  }
   112  
   113  // GetLanguageOk returns a tuple with the Language field value
   114  // and a boolean to check if the value has been set.
   115  func (o *DisplayInfo) GetLanguageOk() (*string, bool) {
   116  	if o == nil  {
   117  		return nil, false
   118  	}
   119  	return &o.Language, true
   120  }
   121  
   122  // SetLanguage sets field value
   123  func (o *DisplayInfo) SetLanguage(v string) {
   124  	o.Language = v
   125  }
   126  
   127  // GetScript returns the Script field value if set, zero value otherwise.
   128  func (o *DisplayInfo) GetScript() string {
   129  	if o == nil || o.Script == nil {
   130  		var ret string
   131  		return ret
   132  	}
   133  	return *o.Script
   134  }
   135  
   136  // GetScriptOk returns a tuple with the Script field value if set, nil otherwise
   137  // and a boolean to check if the value has been set.
   138  func (o *DisplayInfo) GetScriptOk() (*string, bool) {
   139  	if o == nil || o.Script == nil {
   140  		return nil, false
   141  	}
   142  	return o.Script, true
   143  }
   144  
   145  // HasScript returns a boolean if a field has been set.
   146  func (o *DisplayInfo) HasScript() bool {
   147  	if o != nil && o.Script != nil {
   148  		return true
   149  	}
   150  
   151  	return false
   152  }
   153  
   154  // SetScript gets a reference to the given string and assigns it to the Script field.
   155  func (o *DisplayInfo) SetScript(v string) {
   156  	o.Script = &v
   157  }
   158  
   159  // GetRegion returns the Region field value if set, zero value otherwise.
   160  func (o *DisplayInfo) GetRegion() string {
   161  	if o == nil || o.Region == nil {
   162  		var ret string
   163  		return ret
   164  	}
   165  	return *o.Region
   166  }
   167  
   168  // GetRegionOk returns a tuple with the Region field value if set, nil otherwise
   169  // and a boolean to check if the value has been set.
   170  func (o *DisplayInfo) GetRegionOk() (*string, bool) {
   171  	if o == nil || o.Region == nil {
   172  		return nil, false
   173  	}
   174  	return o.Region, true
   175  }
   176  
   177  // HasRegion returns a boolean if a field has been set.
   178  func (o *DisplayInfo) HasRegion() bool {
   179  	if o != nil && o.Region != nil {
   180  		return true
   181  	}
   182  
   183  	return false
   184  }
   185  
   186  // SetRegion gets a reference to the given string and assigns it to the Region field.
   187  func (o *DisplayInfo) SetRegion(v string) {
   188  	o.Region = &v
   189  }
   190  
   191  // GetIsDefault returns the IsDefault field value
   192  func (o *DisplayInfo) GetIsDefault() bool {
   193  	if o == nil  {
   194  		var ret bool
   195  		return ret
   196  	}
   197  
   198  	return o.IsDefault
   199  }
   200  
   201  // GetIsDefaultOk returns a tuple with the IsDefault field value
   202  // and a boolean to check if the value has been set.
   203  func (o *DisplayInfo) GetIsDefaultOk() (*bool, bool) {
   204  	if o == nil  {
   205  		return nil, false
   206  	}
   207  	return &o.IsDefault, true
   208  }
   209  
   210  // SetIsDefault sets field value
   211  func (o *DisplayInfo) SetIsDefault(v bool) {
   212  	o.IsDefault = v
   213  }
   214  
   215  func (o DisplayInfo) MarshalJSON() ([]byte, error) {
   216  	toSerialize := map[string]interface{}{}
   217  	if true {
   218  		toSerialize["name"] = o.Name
   219  	}
   220  	if o.Description != nil {
   221  		toSerialize["description"] = o.Description
   222  	}
   223  	if true {
   224  		toSerialize["language"] = o.Language
   225  	}
   226  	if o.Script != nil {
   227  		toSerialize["script"] = o.Script
   228  	}
   229  	if o.Region != nil {
   230  		toSerialize["region"] = o.Region
   231  	}
   232  	if true {
   233  		toSerialize["is_default"] = o.IsDefault
   234  	}
   235  	return json.Marshal(toSerialize)
   236  }
   237  
   238  type NullableDisplayInfo struct {
   239  	value *DisplayInfo
   240  	isSet bool
   241  }
   242  
   243  func (v NullableDisplayInfo) Get() *DisplayInfo {
   244  	return v.value
   245  }
   246  
   247  func (v *NullableDisplayInfo) Set(val *DisplayInfo) {
   248  	v.value = val
   249  	v.isSet = true
   250  }
   251  
   252  func (v NullableDisplayInfo) IsSet() bool {
   253  	return v.isSet
   254  }
   255  
   256  func (v *NullableDisplayInfo) Unset() {
   257  	v.value = nil
   258  	v.isSet = false
   259  }
   260  
   261  func NewNullableDisplayInfo(val *DisplayInfo) *NullableDisplayInfo {
   262  	return &NullableDisplayInfo{value: val, isSet: true}
   263  }
   264  
   265  func (v NullableDisplayInfo) MarshalJSON() ([]byte, error) {
   266  	return json.Marshal(v.value)
   267  }
   268  
   269  func (v *NullableDisplayInfo) UnmarshalJSON(src []byte) error {
   270  	v.isSet = true
   271  	return json.Unmarshal(src, &v.value)
   272  }
   273  
   274