github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device_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  // DeviceInfo struct for DeviceInfo
    18  type DeviceInfo struct {
    19  	ResourceOwnerId string `json:"resource_owner_id"`
    20  	Name *string `json:"name,omitempty"`
    21  	IdNumber *string `json:"id_number,omitempty"`
    22  	Description *string `json:"description,omitempty"`
    23  	DisplayInfo *[]DisplayInfo `json:"display_info,omitempty"`
    24  	// クライアントIDリスト。デバイスコンテキストのクライアントが必要な場合(is_managedをmanagedかfull_managedに設定する場合)、対応するエージェント等、デバイス上で動作させるクライアントのIDと公開鍵を指定する。複数ある場合、すべて登録すること。
    25  	ClientIdList *[]string `json:"client_id_list,omitempty"`
    26  	// 該当デバイスの管理方法についての区分。  管理外:unmanaged ・・・該当デバイス情報に情報を持たせるのみの場合、こちらを選択。 一部管理:managed ・・・該当デバイス情報に情報を持たせ、かつ当サービス以外システム(アプリ)にて管理される場合、こちらを選択。 完全管理:full_managed(次期対応検討内容) ・・・該当デバイス情報に情報を持たせ、かつ当サービス以外システム(アプリ)およびデバイスエージェント(キッティング、ファームウェアアップデート等行う機構)にて管理される場合、こちらを選択。
    27  	IsManaged *string `json:"is_managed,omitempty"`
    28  	// RSAの公開鍵をPEM形式で設定する。クライアントIDを指定する場合必須。
    29  	RsaPublickey *string `json:"rsa_publickey,omitempty"`
    30  	// 付帯情報リスト
    31  	CustomInventory *[]interface{} `json:"custom_inventory,omitempty"`
    32  }
    33  
    34  // NewDeviceInfo instantiates a new DeviceInfo object
    35  // This constructor will assign default values to properties that have it defined,
    36  // and makes sure properties required by API are set, but the set of arguments
    37  // will change when the set of required properties is changed
    38  func NewDeviceInfo(resourceOwnerId string, ) *DeviceInfo {
    39  	this := DeviceInfo{}
    40  	this.ResourceOwnerId = resourceOwnerId
    41  	return &this
    42  }
    43  
    44  // NewDeviceInfoWithDefaults instantiates a new DeviceInfo object
    45  // This constructor will only assign default values to properties that have it defined,
    46  // but it doesn't guarantee that properties required by API are set
    47  func NewDeviceInfoWithDefaults() *DeviceInfo {
    48  	this := DeviceInfo{}
    49  	return &this
    50  }
    51  
    52  // GetResourceOwnerId returns the ResourceOwnerId field value
    53  func (o *DeviceInfo) GetResourceOwnerId() string {
    54  	if o == nil  {
    55  		var ret string
    56  		return ret
    57  	}
    58  
    59  	return o.ResourceOwnerId
    60  }
    61  
    62  // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value
    63  // and a boolean to check if the value has been set.
    64  func (o *DeviceInfo) GetResourceOwnerIdOk() (*string, bool) {
    65  	if o == nil  {
    66  		return nil, false
    67  	}
    68  	return &o.ResourceOwnerId, true
    69  }
    70  
    71  // SetResourceOwnerId sets field value
    72  func (o *DeviceInfo) SetResourceOwnerId(v string) {
    73  	o.ResourceOwnerId = v
    74  }
    75  
    76  // GetName returns the Name field value if set, zero value otherwise.
    77  func (o *DeviceInfo) GetName() string {
    78  	if o == nil || o.Name == nil {
    79  		var ret string
    80  		return ret
    81  	}
    82  	return *o.Name
    83  }
    84  
    85  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
    86  // and a boolean to check if the value has been set.
    87  func (o *DeviceInfo) GetNameOk() (*string, bool) {
    88  	if o == nil || o.Name == nil {
    89  		return nil, false
    90  	}
    91  	return o.Name, true
    92  }
    93  
    94  // HasName returns a boolean if a field has been set.
    95  func (o *DeviceInfo) HasName() bool {
    96  	if o != nil && o.Name != nil {
    97  		return true
    98  	}
    99  
   100  	return false
   101  }
   102  
   103  // SetName gets a reference to the given string and assigns it to the Name field.
   104  func (o *DeviceInfo) SetName(v string) {
   105  	o.Name = &v
   106  }
   107  
   108  // GetIdNumber returns the IdNumber field value if set, zero value otherwise.
   109  func (o *DeviceInfo) GetIdNumber() string {
   110  	if o == nil || o.IdNumber == nil {
   111  		var ret string
   112  		return ret
   113  	}
   114  	return *o.IdNumber
   115  }
   116  
   117  // GetIdNumberOk returns a tuple with the IdNumber field value if set, nil otherwise
   118  // and a boolean to check if the value has been set.
   119  func (o *DeviceInfo) GetIdNumberOk() (*string, bool) {
   120  	if o == nil || o.IdNumber == nil {
   121  		return nil, false
   122  	}
   123  	return o.IdNumber, true
   124  }
   125  
   126  // HasIdNumber returns a boolean if a field has been set.
   127  func (o *DeviceInfo) HasIdNumber() bool {
   128  	if o != nil && o.IdNumber != nil {
   129  		return true
   130  	}
   131  
   132  	return false
   133  }
   134  
   135  // SetIdNumber gets a reference to the given string and assigns it to the IdNumber field.
   136  func (o *DeviceInfo) SetIdNumber(v string) {
   137  	o.IdNumber = &v
   138  }
   139  
   140  // GetDescription returns the Description field value if set, zero value otherwise.
   141  func (o *DeviceInfo) GetDescription() string {
   142  	if o == nil || o.Description == nil {
   143  		var ret string
   144  		return ret
   145  	}
   146  	return *o.Description
   147  }
   148  
   149  // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
   150  // and a boolean to check if the value has been set.
   151  func (o *DeviceInfo) GetDescriptionOk() (*string, bool) {
   152  	if o == nil || o.Description == nil {
   153  		return nil, false
   154  	}
   155  	return o.Description, true
   156  }
   157  
   158  // HasDescription returns a boolean if a field has been set.
   159  func (o *DeviceInfo) HasDescription() bool {
   160  	if o != nil && o.Description != nil {
   161  		return true
   162  	}
   163  
   164  	return false
   165  }
   166  
   167  // SetDescription gets a reference to the given string and assigns it to the Description field.
   168  func (o *DeviceInfo) SetDescription(v string) {
   169  	o.Description = &v
   170  }
   171  
   172  // GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise.
   173  func (o *DeviceInfo) GetDisplayInfo() []DisplayInfo {
   174  	if o == nil || o.DisplayInfo == nil {
   175  		var ret []DisplayInfo
   176  		return ret
   177  	}
   178  	return *o.DisplayInfo
   179  }
   180  
   181  // GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise
   182  // and a boolean to check if the value has been set.
   183  func (o *DeviceInfo) GetDisplayInfoOk() (*[]DisplayInfo, bool) {
   184  	if o == nil || o.DisplayInfo == nil {
   185  		return nil, false
   186  	}
   187  	return o.DisplayInfo, true
   188  }
   189  
   190  // HasDisplayInfo returns a boolean if a field has been set.
   191  func (o *DeviceInfo) HasDisplayInfo() bool {
   192  	if o != nil && o.DisplayInfo != nil {
   193  		return true
   194  	}
   195  
   196  	return false
   197  }
   198  
   199  // SetDisplayInfo gets a reference to the given []DisplayInfo and assigns it to the DisplayInfo field.
   200  func (o *DeviceInfo) SetDisplayInfo(v []DisplayInfo) {
   201  	o.DisplayInfo = &v
   202  }
   203  
   204  // GetClientIdList returns the ClientIdList field value if set, zero value otherwise.
   205  func (o *DeviceInfo) GetClientIdList() []string {
   206  	if o == nil || o.ClientIdList == nil {
   207  		var ret []string
   208  		return ret
   209  	}
   210  	return *o.ClientIdList
   211  }
   212  
   213  // GetClientIdListOk returns a tuple with the ClientIdList field value if set, nil otherwise
   214  // and a boolean to check if the value has been set.
   215  func (o *DeviceInfo) GetClientIdListOk() (*[]string, bool) {
   216  	if o == nil || o.ClientIdList == nil {
   217  		return nil, false
   218  	}
   219  	return o.ClientIdList, true
   220  }
   221  
   222  // HasClientIdList returns a boolean if a field has been set.
   223  func (o *DeviceInfo) HasClientIdList() bool {
   224  	if o != nil && o.ClientIdList != nil {
   225  		return true
   226  	}
   227  
   228  	return false
   229  }
   230  
   231  // SetClientIdList gets a reference to the given []string and assigns it to the ClientIdList field.
   232  func (o *DeviceInfo) SetClientIdList(v []string) {
   233  	o.ClientIdList = &v
   234  }
   235  
   236  // GetIsManaged returns the IsManaged field value if set, zero value otherwise.
   237  func (o *DeviceInfo) GetIsManaged() string {
   238  	if o == nil || o.IsManaged == nil {
   239  		var ret string
   240  		return ret
   241  	}
   242  	return *o.IsManaged
   243  }
   244  
   245  // GetIsManagedOk returns a tuple with the IsManaged field value if set, nil otherwise
   246  // and a boolean to check if the value has been set.
   247  func (o *DeviceInfo) GetIsManagedOk() (*string, bool) {
   248  	if o == nil || o.IsManaged == nil {
   249  		return nil, false
   250  	}
   251  	return o.IsManaged, true
   252  }
   253  
   254  // HasIsManaged returns a boolean if a field has been set.
   255  func (o *DeviceInfo) HasIsManaged() bool {
   256  	if o != nil && o.IsManaged != nil {
   257  		return true
   258  	}
   259  
   260  	return false
   261  }
   262  
   263  // SetIsManaged gets a reference to the given string and assigns it to the IsManaged field.
   264  func (o *DeviceInfo) SetIsManaged(v string) {
   265  	o.IsManaged = &v
   266  }
   267  
   268  // GetRsaPublickey returns the RsaPublickey field value if set, zero value otherwise.
   269  func (o *DeviceInfo) GetRsaPublickey() string {
   270  	if o == nil || o.RsaPublickey == nil {
   271  		var ret string
   272  		return ret
   273  	}
   274  	return *o.RsaPublickey
   275  }
   276  
   277  // GetRsaPublickeyOk returns a tuple with the RsaPublickey field value if set, nil otherwise
   278  // and a boolean to check if the value has been set.
   279  func (o *DeviceInfo) GetRsaPublickeyOk() (*string, bool) {
   280  	if o == nil || o.RsaPublickey == nil {
   281  		return nil, false
   282  	}
   283  	return o.RsaPublickey, true
   284  }
   285  
   286  // HasRsaPublickey returns a boolean if a field has been set.
   287  func (o *DeviceInfo) HasRsaPublickey() bool {
   288  	if o != nil && o.RsaPublickey != nil {
   289  		return true
   290  	}
   291  
   292  	return false
   293  }
   294  
   295  // SetRsaPublickey gets a reference to the given string and assigns it to the RsaPublickey field.
   296  func (o *DeviceInfo) SetRsaPublickey(v string) {
   297  	o.RsaPublickey = &v
   298  }
   299  
   300  // GetCustomInventory returns the CustomInventory field value if set, zero value otherwise.
   301  func (o *DeviceInfo) GetCustomInventory() []interface{} {
   302  	if o == nil || o.CustomInventory == nil {
   303  		var ret []interface{}
   304  		return ret
   305  	}
   306  	return *o.CustomInventory
   307  }
   308  
   309  // GetCustomInventoryOk returns a tuple with the CustomInventory field value if set, nil otherwise
   310  // and a boolean to check if the value has been set.
   311  func (o *DeviceInfo) GetCustomInventoryOk() (*[]interface{}, bool) {
   312  	if o == nil || o.CustomInventory == nil {
   313  		return nil, false
   314  	}
   315  	return o.CustomInventory, true
   316  }
   317  
   318  // HasCustomInventory returns a boolean if a field has been set.
   319  func (o *DeviceInfo) HasCustomInventory() bool {
   320  	if o != nil && o.CustomInventory != nil {
   321  		return true
   322  	}
   323  
   324  	return false
   325  }
   326  
   327  // SetCustomInventory gets a reference to the given []interface{} and assigns it to the CustomInventory field.
   328  func (o *DeviceInfo) SetCustomInventory(v []interface{}) {
   329  	o.CustomInventory = &v
   330  }
   331  
   332  func (o DeviceInfo) MarshalJSON() ([]byte, error) {
   333  	toSerialize := map[string]interface{}{}
   334  	if true {
   335  		toSerialize["resource_owner_id"] = o.ResourceOwnerId
   336  	}
   337  	if o.Name != nil {
   338  		toSerialize["name"] = o.Name
   339  	}
   340  	if o.IdNumber != nil {
   341  		toSerialize["id_number"] = o.IdNumber
   342  	}
   343  	if o.Description != nil {
   344  		toSerialize["description"] = o.Description
   345  	}
   346  	if o.DisplayInfo != nil {
   347  		toSerialize["display_info"] = o.DisplayInfo
   348  	}
   349  	if o.ClientIdList != nil {
   350  		toSerialize["client_id_list"] = o.ClientIdList
   351  	}
   352  	if o.IsManaged != nil {
   353  		toSerialize["is_managed"] = o.IsManaged
   354  	}
   355  	if o.RsaPublickey != nil {
   356  		toSerialize["rsa_publickey"] = o.RsaPublickey
   357  	}
   358  	if o.CustomInventory != nil {
   359  		toSerialize["custom_inventory"] = o.CustomInventory
   360  	}
   361  	return json.Marshal(toSerialize)
   362  }
   363  
   364  type NullableDeviceInfo struct {
   365  	value *DeviceInfo
   366  	isSet bool
   367  }
   368  
   369  func (v NullableDeviceInfo) Get() *DeviceInfo {
   370  	return v.value
   371  }
   372  
   373  func (v *NullableDeviceInfo) Set(val *DeviceInfo) {
   374  	v.value = val
   375  	v.isSet = true
   376  }
   377  
   378  func (v NullableDeviceInfo) IsSet() bool {
   379  	return v.isSet
   380  }
   381  
   382  func (v *NullableDeviceInfo) Unset() {
   383  	v.value = nil
   384  	v.isSet = false
   385  }
   386  
   387  func NewNullableDeviceInfo(val *DeviceInfo) *NullableDeviceInfo {
   388  	return &NullableDeviceInfo{value: val, isSet: true}
   389  }
   390  
   391  func (v NullableDeviceInfo) MarshalJSON() ([]byte, error) {
   392  	return json.Marshal(v.value)
   393  }
   394  
   395  func (v *NullableDeviceInfo) UnmarshalJSON(src []byte) error {
   396  	v.isSet = true
   397  	return json.Unmarshal(src, &v.value)
   398  }
   399  
   400