Files
sdk/model_compliance_act.go

231 lines
5.6 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 ComplianceAct type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ComplianceAct{}
// ComplianceAct struct for ComplianceAct
type ComplianceAct struct {
// Name is the operator's IAM username.
Name *string `json:"name,omitempty"`
// Owner is the org of the operator's IAM row: \"admin\" for a SuperAdmin.
Owner *string `json:"owner,omitempty"`
// Sub is the operator's IAM subject.
Sub *string `json:"sub,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ComplianceAct ComplianceAct
// NewComplianceAct instantiates a new ComplianceAct 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 NewComplianceAct() *ComplianceAct {
this := ComplianceAct{}
return &this
}
// NewComplianceActWithDefaults instantiates a new ComplianceAct 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 NewComplianceActWithDefaults() *ComplianceAct {
this := ComplianceAct{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ComplianceAct) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComplianceAct) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *ComplianceAct) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ComplianceAct) SetName(v string) {
o.Name = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *ComplianceAct) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComplianceAct) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *ComplianceAct) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *ComplianceAct) SetOwner(v string) {
o.Owner = &v
}
// GetSub returns the Sub field value if set, zero value otherwise.
func (o *ComplianceAct) GetSub() string {
if o == nil || IsNil(o.Sub) {
var ret string
return ret
}
return *o.Sub
}
// GetSubOk returns a tuple with the Sub field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComplianceAct) GetSubOk() (*string, bool) {
if o == nil || IsNil(o.Sub) {
return nil, false
}
return o.Sub, true
}
// HasSub returns a boolean if a field has been set.
func (o *ComplianceAct) HasSub() bool {
if o != nil && !IsNil(o.Sub) {
return true
}
return false
}
// SetSub gets a reference to the given string and assigns it to the Sub field.
func (o *ComplianceAct) SetSub(v string) {
o.Sub = &v
}
func (o ComplianceAct) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ComplianceAct) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Sub) {
toSerialize["sub"] = o.Sub
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ComplianceAct) UnmarshalJSON(data []byte) (err error) {
varComplianceAct := _ComplianceAct{}
err = json.Unmarshal(data, &varComplianceAct)
if err != nil {
return err
}
*o = ComplianceAct(varComplianceAct)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "owner")
delete(additionalProperties, "sub")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableComplianceAct struct {
value *ComplianceAct
isSet bool
}
func (v NullableComplianceAct) Get() *ComplianceAct {
return v.value
}
func (v *NullableComplianceAct) Set(val *ComplianceAct) {
v.value = val
v.isSet = true
}
func (v NullableComplianceAct) IsSet() bool {
return v.isSet
}
func (v *NullableComplianceAct) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableComplianceAct(val *ComplianceAct) *NullableComplianceAct {
return &NullableComplianceAct{value: val, isSet: true}
}
func (v NullableComplianceAct) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableComplianceAct) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}