terraform-provider-stackitp.../pkg/edgebeta/model_unauthorized_request.go

176 lines
5.3 KiB
Go

/*
STACKIT Edge Cloud API
This API provides endpoints for managing STACKIT Edge Cloud instances.
API version: 1beta1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package edgebeta
import (
"encoding/json"
)
// checks if the UnauthorizedRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UnauthorizedRequest{}
/*
types and functions for code
*/
// isNotNullableString
type UnauthorizedRequestGetCodeAttributeType = *string
func getUnauthorizedRequestGetCodeAttributeTypeOk(arg UnauthorizedRequestGetCodeAttributeType) (ret UnauthorizedRequestGetCodeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUnauthorizedRequestGetCodeAttributeType(arg *UnauthorizedRequestGetCodeAttributeType, val UnauthorizedRequestGetCodeRetType) {
*arg = &val
}
type UnauthorizedRequestGetCodeArgType = string
type UnauthorizedRequestGetCodeRetType = string
/*
types and functions for message
*/
// isNotNullableString
type UnauthorizedRequestGetMessageAttributeType = *string
func getUnauthorizedRequestGetMessageAttributeTypeOk(arg UnauthorizedRequestGetMessageAttributeType) (ret UnauthorizedRequestGetMessageRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUnauthorizedRequestGetMessageAttributeType(arg *UnauthorizedRequestGetMessageAttributeType, val UnauthorizedRequestGetMessageRetType) {
*arg = &val
}
type UnauthorizedRequestGetMessageArgType = string
type UnauthorizedRequestGetMessageRetType = string
// UnauthorizedRequest struct for UnauthorizedRequest
type UnauthorizedRequest struct {
Code UnauthorizedRequestGetCodeAttributeType `json:"code,omitempty"`
Message UnauthorizedRequestGetMessageAttributeType `json:"message,omitempty"`
}
// NewUnauthorizedRequest instantiates a new UnauthorizedRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewUnauthorizedRequest() *UnauthorizedRequest {
this := UnauthorizedRequest{}
return &this
}
// NewUnauthorizedRequestWithDefaults instantiates a new UnauthorizedRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewUnauthorizedRequestWithDefaults() *UnauthorizedRequest {
this := UnauthorizedRequest{}
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *UnauthorizedRequest) GetCode() (res UnauthorizedRequestGetCodeRetType) {
res, _ = o.GetCodeOk()
return
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UnauthorizedRequest) GetCodeOk() (ret UnauthorizedRequestGetCodeRetType, ok bool) {
return getUnauthorizedRequestGetCodeAttributeTypeOk(o.Code)
}
// HasCode returns a boolean if a field has been set.
func (o *UnauthorizedRequest) HasCode() bool {
_, ok := o.GetCodeOk()
return ok
}
// SetCode gets a reference to the given string and assigns it to the Code field.
func (o *UnauthorizedRequest) SetCode(v UnauthorizedRequestGetCodeRetType) {
setUnauthorizedRequestGetCodeAttributeType(&o.Code, v)
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *UnauthorizedRequest) GetMessage() (res UnauthorizedRequestGetMessageRetType) {
res, _ = o.GetMessageOk()
return
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UnauthorizedRequest) GetMessageOk() (ret UnauthorizedRequestGetMessageRetType, ok bool) {
return getUnauthorizedRequestGetMessageAttributeTypeOk(o.Message)
}
// HasMessage returns a boolean if a field has been set.
func (o *UnauthorizedRequest) HasMessage() bool {
_, ok := o.GetMessageOk()
return ok
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *UnauthorizedRequest) SetMessage(v UnauthorizedRequestGetMessageRetType) {
setUnauthorizedRequestGetMessageAttributeType(&o.Message, v)
}
func (o UnauthorizedRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUnauthorizedRequestGetCodeAttributeTypeOk(o.Code); ok {
toSerialize["Code"] = val
}
if val, ok := getUnauthorizedRequestGetMessageAttributeTypeOk(o.Message); ok {
toSerialize["Message"] = val
}
return toSerialize, nil
}
type NullableUnauthorizedRequest struct {
value *UnauthorizedRequest
isSet bool
}
func (v NullableUnauthorizedRequest) Get() *UnauthorizedRequest {
return v.value
}
func (v *NullableUnauthorizedRequest) Set(val *UnauthorizedRequest) {
v.value = val
v.isSet = true
}
func (v NullableUnauthorizedRequest) IsSet() bool {
return v.isSet
}
func (v *NullableUnauthorizedRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUnauthorizedRequest(val *UnauthorizedRequest) *NullableUnauthorizedRequest {
return &NullableUnauthorizedRequest{value: val, isSet: true}
}
func (v NullableUnauthorizedRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUnauthorizedRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}