model_get_zone_response.go raw

   1  /*
   2  Intelligent DNS API
   3  
   4  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
   5  
   6  API version: 1.0.0
   7  */
   8  
   9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
  10  
  11  package idns
  12  
  13  import (
  14  	"encoding/json"
  15  )
  16  
  17  // checks if the GetZoneResponse type satisfies the MappedNullable interface at compile time
  18  var _ MappedNullable = &GetZoneResponse{}
  19  
  20  // GetZoneResponse Object returned by get zone
  21  type GetZoneResponse struct {
  22  	// The schema version
  23  	SchemaVersion *int32 `json:"schema_version,omitempty"`
  24  	Results *Zone `json:"results,omitempty"`
  25  }
  26  
  27  // NewGetZoneResponse instantiates a new GetZoneResponse 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 NewGetZoneResponse() *GetZoneResponse {
  32  	this := GetZoneResponse{}
  33  	return &this
  34  }
  35  
  36  // NewGetZoneResponseWithDefaults instantiates a new GetZoneResponse object
  37  // This constructor will only assign default values to properties that have it defined,
  38  // but it doesn't guarantee that properties required by API are set
  39  func NewGetZoneResponseWithDefaults() *GetZoneResponse {
  40  	this := GetZoneResponse{}
  41  	return &this
  42  }
  43  
  44  // GetSchemaVersion returns the SchemaVersion field value if set, zero value otherwise.
  45  func (o *GetZoneResponse) GetSchemaVersion() int32 {
  46  	if o == nil || IsNil(o.SchemaVersion) {
  47  		var ret int32
  48  		return ret
  49  	}
  50  	return *o.SchemaVersion
  51  }
  52  
  53  // GetSchemaVersionOk returns a tuple with the SchemaVersion field value if set, nil otherwise
  54  // and a boolean to check if the value has been set.
  55  func (o *GetZoneResponse) GetSchemaVersionOk() (*int32, bool) {
  56  	if o == nil || IsNil(o.SchemaVersion) {
  57  		return nil, false
  58  	}
  59  	return o.SchemaVersion, true
  60  }
  61  
  62  // HasSchemaVersion returns a boolean if a field has been set.
  63  func (o *GetZoneResponse) HasSchemaVersion() bool {
  64  	if o != nil && !IsNil(o.SchemaVersion) {
  65  		return true
  66  	}
  67  
  68  	return false
  69  }
  70  
  71  // SetSchemaVersion gets a reference to the given int32 and assigns it to the SchemaVersion field.
  72  func (o *GetZoneResponse) SetSchemaVersion(v int32) {
  73  	o.SchemaVersion = &v
  74  }
  75  
  76  // GetResults returns the Results field value if set, zero value otherwise.
  77  func (o *GetZoneResponse) GetResults() Zone {
  78  	if o == nil || IsNil(o.Results) {
  79  		var ret Zone
  80  		return ret
  81  	}
  82  	return *o.Results
  83  }
  84  
  85  // GetResultsOk returns a tuple with the Results field value if set, nil otherwise
  86  // and a boolean to check if the value has been set.
  87  func (o *GetZoneResponse) GetResultsOk() (*Zone, bool) {
  88  	if o == nil || IsNil(o.Results) {
  89  		return nil, false
  90  	}
  91  	return o.Results, true
  92  }
  93  
  94  // HasResults returns a boolean if a field has been set.
  95  func (o *GetZoneResponse) HasResults() bool {
  96  	if o != nil && !IsNil(o.Results) {
  97  		return true
  98  	}
  99  
 100  	return false
 101  }
 102  
 103  // SetResults gets a reference to the given Zone and assigns it to the Results field.
 104  func (o *GetZoneResponse) SetResults(v Zone) {
 105  	o.Results = &v
 106  }
 107  
 108  func (o GetZoneResponse) MarshalJSON() ([]byte, error) {
 109  	toSerialize,err := o.ToMap()
 110  	if err != nil {
 111  		return []byte{}, err
 112  	}
 113  	return json.Marshal(toSerialize)
 114  }
 115  
 116  func (o GetZoneResponse) ToMap() (map[string]interface{}, error) {
 117  	toSerialize := map[string]interface{}{}
 118  	if !IsNil(o.SchemaVersion) {
 119  		toSerialize["schema_version"] = o.SchemaVersion
 120  	}
 121  	if !IsNil(o.Results) {
 122  		toSerialize["results"] = o.Results
 123  	}
 124  	return toSerialize, nil
 125  }
 126  
 127  type NullableGetZoneResponse struct {
 128  	value *GetZoneResponse
 129  	isSet bool
 130  }
 131  
 132  func (v NullableGetZoneResponse) Get() *GetZoneResponse {
 133  	return v.value
 134  }
 135  
 136  func (v *NullableGetZoneResponse) Set(val *GetZoneResponse) {
 137  	v.value = val
 138  	v.isSet = true
 139  }
 140  
 141  func (v NullableGetZoneResponse) IsSet() bool {
 142  	return v.isSet
 143  }
 144  
 145  func (v *NullableGetZoneResponse) Unset() {
 146  	v.value = nil
 147  	v.isSet = false
 148  }
 149  
 150  func NewNullableGetZoneResponse(val *GetZoneResponse) *NullableGetZoneResponse {
 151  	return &NullableGetZoneResponse{value: val, isSet: true}
 152  }
 153  
 154  func (v NullableGetZoneResponse) MarshalJSON() ([]byte, error) {
 155  	return json.Marshal(v.value)
 156  }
 157  
 158  func (v *NullableGetZoneResponse) UnmarshalJSON(src []byte) error {
 159  	v.isSet = true
 160  	return json.Unmarshal(src, &v.value)
 161  }
 162  
 163  
 164