github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_connected_device_result.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  // ConnectedDeviceResult struct for ConnectedDeviceResult
    18  type ConnectedDeviceResult struct {
    19  	Name *string `json:"name,omitempty"`
    20  	DeviceNumber *string `json:"device_number,omitempty"`
    21  	DeviceType *string `json:"device_type,omitempty"`
    22  	Timestamp *string `json:"timestamp,omitempty"`
    23  	Status *string `json:"status,omitempty"`
    24  	ErrorMessage *string `json:"error_message,omitempty"`
    25  	CustomItems *string `json:"custom_items,omitempty"`
    26  }
    27  
    28  // NewConnectedDeviceResult instantiates a new ConnectedDeviceResult object
    29  // This constructor will assign default values to properties that have it defined,
    30  // and makes sure properties required by API are set, but the set of arguments
    31  // will change when the set of required properties is changed
    32  func NewConnectedDeviceResult() *ConnectedDeviceResult {
    33  	this := ConnectedDeviceResult{}
    34  	return &this
    35  }
    36  
    37  // NewConnectedDeviceResultWithDefaults instantiates a new ConnectedDeviceResult object
    38  // This constructor will only assign default values to properties that have it defined,
    39  // but it doesn't guarantee that properties required by API are set
    40  func NewConnectedDeviceResultWithDefaults() *ConnectedDeviceResult {
    41  	this := ConnectedDeviceResult{}
    42  	return &this
    43  }
    44  
    45  // GetName returns the Name field value if set, zero value otherwise.
    46  func (o *ConnectedDeviceResult) GetName() string {
    47  	if o == nil || o.Name == nil {
    48  		var ret string
    49  		return ret
    50  	}
    51  	return *o.Name
    52  }
    53  
    54  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
    55  // and a boolean to check if the value has been set.
    56  func (o *ConnectedDeviceResult) GetNameOk() (*string, bool) {
    57  	if o == nil || o.Name == nil {
    58  		return nil, false
    59  	}
    60  	return o.Name, true
    61  }
    62  
    63  // HasName returns a boolean if a field has been set.
    64  func (o *ConnectedDeviceResult) HasName() bool {
    65  	if o != nil && o.Name != nil {
    66  		return true
    67  	}
    68  
    69  	return false
    70  }
    71  
    72  // SetName gets a reference to the given string and assigns it to the Name field.
    73  func (o *ConnectedDeviceResult) SetName(v string) {
    74  	o.Name = &v
    75  }
    76  
    77  // GetDeviceNumber returns the DeviceNumber field value if set, zero value otherwise.
    78  func (o *ConnectedDeviceResult) GetDeviceNumber() string {
    79  	if o == nil || o.DeviceNumber == nil {
    80  		var ret string
    81  		return ret
    82  	}
    83  	return *o.DeviceNumber
    84  }
    85  
    86  // GetDeviceNumberOk returns a tuple with the DeviceNumber field value if set, nil otherwise
    87  // and a boolean to check if the value has been set.
    88  func (o *ConnectedDeviceResult) GetDeviceNumberOk() (*string, bool) {
    89  	if o == nil || o.DeviceNumber == nil {
    90  		return nil, false
    91  	}
    92  	return o.DeviceNumber, true
    93  }
    94  
    95  // HasDeviceNumber returns a boolean if a field has been set.
    96  func (o *ConnectedDeviceResult) HasDeviceNumber() bool {
    97  	if o != nil && o.DeviceNumber != nil {
    98  		return true
    99  	}
   100  
   101  	return false
   102  }
   103  
   104  // SetDeviceNumber gets a reference to the given string and assigns it to the DeviceNumber field.
   105  func (o *ConnectedDeviceResult) SetDeviceNumber(v string) {
   106  	o.DeviceNumber = &v
   107  }
   108  
   109  // GetDeviceType returns the DeviceType field value if set, zero value otherwise.
   110  func (o *ConnectedDeviceResult) GetDeviceType() string {
   111  	if o == nil || o.DeviceType == nil {
   112  		var ret string
   113  		return ret
   114  	}
   115  	return *o.DeviceType
   116  }
   117  
   118  // GetDeviceTypeOk returns a tuple with the DeviceType field value if set, nil otherwise
   119  // and a boolean to check if the value has been set.
   120  func (o *ConnectedDeviceResult) GetDeviceTypeOk() (*string, bool) {
   121  	if o == nil || o.DeviceType == nil {
   122  		return nil, false
   123  	}
   124  	return o.DeviceType, true
   125  }
   126  
   127  // HasDeviceType returns a boolean if a field has been set.
   128  func (o *ConnectedDeviceResult) HasDeviceType() bool {
   129  	if o != nil && o.DeviceType != nil {
   130  		return true
   131  	}
   132  
   133  	return false
   134  }
   135  
   136  // SetDeviceType gets a reference to the given string and assigns it to the DeviceType field.
   137  func (o *ConnectedDeviceResult) SetDeviceType(v string) {
   138  	o.DeviceType = &v
   139  }
   140  
   141  // GetTimestamp returns the Timestamp field value if set, zero value otherwise.
   142  func (o *ConnectedDeviceResult) GetTimestamp() string {
   143  	if o == nil || o.Timestamp == nil {
   144  		var ret string
   145  		return ret
   146  	}
   147  	return *o.Timestamp
   148  }
   149  
   150  // GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
   151  // and a boolean to check if the value has been set.
   152  func (o *ConnectedDeviceResult) GetTimestampOk() (*string, bool) {
   153  	if o == nil || o.Timestamp == nil {
   154  		return nil, false
   155  	}
   156  	return o.Timestamp, true
   157  }
   158  
   159  // HasTimestamp returns a boolean if a field has been set.
   160  func (o *ConnectedDeviceResult) HasTimestamp() bool {
   161  	if o != nil && o.Timestamp != nil {
   162  		return true
   163  	}
   164  
   165  	return false
   166  }
   167  
   168  // SetTimestamp gets a reference to the given string and assigns it to the Timestamp field.
   169  func (o *ConnectedDeviceResult) SetTimestamp(v string) {
   170  	o.Timestamp = &v
   171  }
   172  
   173  // GetStatus returns the Status field value if set, zero value otherwise.
   174  func (o *ConnectedDeviceResult) GetStatus() string {
   175  	if o == nil || o.Status == nil {
   176  		var ret string
   177  		return ret
   178  	}
   179  	return *o.Status
   180  }
   181  
   182  // GetStatusOk returns a tuple with the Status field value if set, nil otherwise
   183  // and a boolean to check if the value has been set.
   184  func (o *ConnectedDeviceResult) GetStatusOk() (*string, bool) {
   185  	if o == nil || o.Status == nil {
   186  		return nil, false
   187  	}
   188  	return o.Status, true
   189  }
   190  
   191  // HasStatus returns a boolean if a field has been set.
   192  func (o *ConnectedDeviceResult) HasStatus() bool {
   193  	if o != nil && o.Status != nil {
   194  		return true
   195  	}
   196  
   197  	return false
   198  }
   199  
   200  // SetStatus gets a reference to the given string and assigns it to the Status field.
   201  func (o *ConnectedDeviceResult) SetStatus(v string) {
   202  	o.Status = &v
   203  }
   204  
   205  // GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise.
   206  func (o *ConnectedDeviceResult) GetErrorMessage() string {
   207  	if o == nil || o.ErrorMessage == nil {
   208  		var ret string
   209  		return ret
   210  	}
   211  	return *o.ErrorMessage
   212  }
   213  
   214  // GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise
   215  // and a boolean to check if the value has been set.
   216  func (o *ConnectedDeviceResult) GetErrorMessageOk() (*string, bool) {
   217  	if o == nil || o.ErrorMessage == nil {
   218  		return nil, false
   219  	}
   220  	return o.ErrorMessage, true
   221  }
   222  
   223  // HasErrorMessage returns a boolean if a field has been set.
   224  func (o *ConnectedDeviceResult) HasErrorMessage() bool {
   225  	if o != nil && o.ErrorMessage != nil {
   226  		return true
   227  	}
   228  
   229  	return false
   230  }
   231  
   232  // SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.
   233  func (o *ConnectedDeviceResult) SetErrorMessage(v string) {
   234  	o.ErrorMessage = &v
   235  }
   236  
   237  // GetCustomItems returns the CustomItems field value if set, zero value otherwise.
   238  func (o *ConnectedDeviceResult) GetCustomItems() string {
   239  	if o == nil || o.CustomItems == nil {
   240  		var ret string
   241  		return ret
   242  	}
   243  	return *o.CustomItems
   244  }
   245  
   246  // GetCustomItemsOk returns a tuple with the CustomItems field value if set, nil otherwise
   247  // and a boolean to check if the value has been set.
   248  func (o *ConnectedDeviceResult) GetCustomItemsOk() (*string, bool) {
   249  	if o == nil || o.CustomItems == nil {
   250  		return nil, false
   251  	}
   252  	return o.CustomItems, true
   253  }
   254  
   255  // HasCustomItems returns a boolean if a field has been set.
   256  func (o *ConnectedDeviceResult) HasCustomItems() bool {
   257  	if o != nil && o.CustomItems != nil {
   258  		return true
   259  	}
   260  
   261  	return false
   262  }
   263  
   264  // SetCustomItems gets a reference to the given string and assigns it to the CustomItems field.
   265  func (o *ConnectedDeviceResult) SetCustomItems(v string) {
   266  	o.CustomItems = &v
   267  }
   268  
   269  func (o ConnectedDeviceResult) MarshalJSON() ([]byte, error) {
   270  	toSerialize := map[string]interface{}{}
   271  	if o.Name != nil {
   272  		toSerialize["name"] = o.Name
   273  	}
   274  	if o.DeviceNumber != nil {
   275  		toSerialize["device_number"] = o.DeviceNumber
   276  	}
   277  	if o.DeviceType != nil {
   278  		toSerialize["device_type"] = o.DeviceType
   279  	}
   280  	if o.Timestamp != nil {
   281  		toSerialize["timestamp"] = o.Timestamp
   282  	}
   283  	if o.Status != nil {
   284  		toSerialize["status"] = o.Status
   285  	}
   286  	if o.ErrorMessage != nil {
   287  		toSerialize["error_message"] = o.ErrorMessage
   288  	}
   289  	if o.CustomItems != nil {
   290  		toSerialize["custom_items"] = o.CustomItems
   291  	}
   292  	return json.Marshal(toSerialize)
   293  }
   294  
   295  type NullableConnectedDeviceResult struct {
   296  	value *ConnectedDeviceResult
   297  	isSet bool
   298  }
   299  
   300  func (v NullableConnectedDeviceResult) Get() *ConnectedDeviceResult {
   301  	return v.value
   302  }
   303  
   304  func (v *NullableConnectedDeviceResult) Set(val *ConnectedDeviceResult) {
   305  	v.value = val
   306  	v.isSet = true
   307  }
   308  
   309  func (v NullableConnectedDeviceResult) IsSet() bool {
   310  	return v.isSet
   311  }
   312  
   313  func (v *NullableConnectedDeviceResult) Unset() {
   314  	v.value = nil
   315  	v.isSet = false
   316  }
   317  
   318  func NewNullableConnectedDeviceResult(val *ConnectedDeviceResult) *NullableConnectedDeviceResult {
   319  	return &NullableConnectedDeviceResult{value: val, isSet: true}
   320  }
   321  
   322  func (v NullableConnectedDeviceResult) MarshalJSON() ([]byte, error) {
   323  	return json.Marshal(v.value)
   324  }
   325  
   326  func (v *NullableConnectedDeviceResult) UnmarshalJSON(src []byte) error {
   327  	v.isSet = true
   328  	return json.Unmarshal(src, &v.value)
   329  }
   330  
   331