Files
sdk/model_platform_drift_flag.go

231 lines
6.4 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the PlatformDriftFlag type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformDriftFlag{}
// PlatformDriftFlag struct for PlatformDriftFlag
type PlatformDriftFlag struct {
// Kind is which finding this is, one of stale, un-rolled, floating-declared, floating-running, no-release or zero-assets. It is what code matches on, and the kinds are independent — one row can carry several at once.
Kind *string `json:"kind,omitempty"`
// Message is the finding in words, naming the tags that produced it (\"running v1.2.3 has not rolled to declared v1.2.4\"). For display: match on Kind.
Message *string `json:"message,omitempty"`
// Severity is this ONE finding's weight — yellow for stale and un-rolled, red for the other four. It is a constant of the kind (severityOf), never a judgement about the row, so the same kind always weighs the same.
Severity *string `json:"severity,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformDriftFlag PlatformDriftFlag
// NewPlatformDriftFlag instantiates a new PlatformDriftFlag 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 NewPlatformDriftFlag() *PlatformDriftFlag {
this := PlatformDriftFlag{}
return &this
}
// NewPlatformDriftFlagWithDefaults instantiates a new PlatformDriftFlag 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 NewPlatformDriftFlagWithDefaults() *PlatformDriftFlag {
this := PlatformDriftFlag{}
return &this
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *PlatformDriftFlag) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDriftFlag) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *PlatformDriftFlag) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *PlatformDriftFlag) SetKind(v string) {
o.Kind = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *PlatformDriftFlag) GetMessage() string {
if o == nil || IsNil(o.Message) {
var ret string
return ret
}
return *o.Message
}
// 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 *PlatformDriftFlag) GetMessageOk() (*string, bool) {
if o == nil || IsNil(o.Message) {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *PlatformDriftFlag) HasMessage() bool {
if o != nil && !IsNil(o.Message) {
return true
}
return false
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *PlatformDriftFlag) SetMessage(v string) {
o.Message = &v
}
// GetSeverity returns the Severity field value if set, zero value otherwise.
func (o *PlatformDriftFlag) GetSeverity() string {
if o == nil || IsNil(o.Severity) {
var ret string
return ret
}
return *o.Severity
}
// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDriftFlag) GetSeverityOk() (*string, bool) {
if o == nil || IsNil(o.Severity) {
return nil, false
}
return o.Severity, true
}
// HasSeverity returns a boolean if a field has been set.
func (o *PlatformDriftFlag) HasSeverity() bool {
if o != nil && !IsNil(o.Severity) {
return true
}
return false
}
// SetSeverity gets a reference to the given string and assigns it to the Severity field.
func (o *PlatformDriftFlag) SetSeverity(v string) {
o.Severity = &v
}
func (o PlatformDriftFlag) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformDriftFlag) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Message) {
toSerialize["message"] = o.Message
}
if !IsNil(o.Severity) {
toSerialize["severity"] = o.Severity
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformDriftFlag) UnmarshalJSON(data []byte) (err error) {
varPlatformDriftFlag := _PlatformDriftFlag{}
err = json.Unmarshal(data, &varPlatformDriftFlag)
if err != nil {
return err
}
*o = PlatformDriftFlag(varPlatformDriftFlag)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "kind")
delete(additionalProperties, "message")
delete(additionalProperties, "severity")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformDriftFlag struct {
value *PlatformDriftFlag
isSet bool
}
func (v NullablePlatformDriftFlag) Get() *PlatformDriftFlag {
return v.value
}
func (v *NullablePlatformDriftFlag) Set(val *PlatformDriftFlag) {
v.value = val
v.isSet = true
}
func (v NullablePlatformDriftFlag) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformDriftFlag) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformDriftFlag(val *PlatformDriftFlag) *NullablePlatformDriftFlag {
return &NullablePlatformDriftFlag{value: val, isSet: true}
}
func (v NullablePlatformDriftFlag) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformDriftFlag) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}