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