Files
sdk/model_flag_activity_row.go

345 lines
8.9 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 FlagActivityRow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FlagActivityRow{}
// FlagActivityRow struct for FlagActivityRow
type FlagActivityRow struct {
// Action is one of created, updated, deleted.
Action *string `json:"action,omitempty"`
// Actor is the email of the principal who made the change. Empty for a write by an in-process composer; a project key can never appear here, because evaluating flags is all a key may do.
Actor *string `json:"actor,omitempty"`
// At is when the change was made, RFC 3339 UTC.
At *string `json:"at,omitempty"`
// Detail is free-form context about the change. Nothing writes it today, so it is absent from every row the store serves.
Detail *string `json:"detail,omitempty"`
// ID is the log's own sequence number, rising with each entry. The log is served newest-first, which is this descending.
Id *int64 `json:"id,omitempty"`
// Key is the flag that changed. It survives a delete, so the log still names flags the definition store no longer holds.
Key *string `json:"key,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FlagActivityRow FlagActivityRow
// NewFlagActivityRow instantiates a new FlagActivityRow 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 NewFlagActivityRow() *FlagActivityRow {
this := FlagActivityRow{}
return &this
}
// NewFlagActivityRowWithDefaults instantiates a new FlagActivityRow 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 NewFlagActivityRowWithDefaults() *FlagActivityRow {
this := FlagActivityRow{}
return &this
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *FlagActivityRow) GetAction() string {
if o == nil || IsNil(o.Action) {
var ret string
return ret
}
return *o.Action
}
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlagActivityRow) GetActionOk() (*string, bool) {
if o == nil || IsNil(o.Action) {
return nil, false
}
return o.Action, true
}
// HasAction returns a boolean if a field has been set.
func (o *FlagActivityRow) HasAction() bool {
if o != nil && !IsNil(o.Action) {
return true
}
return false
}
// SetAction gets a reference to the given string and assigns it to the Action field.
func (o *FlagActivityRow) SetAction(v string) {
o.Action = &v
}
// GetActor returns the Actor field value if set, zero value otherwise.
func (o *FlagActivityRow) GetActor() string {
if o == nil || IsNil(o.Actor) {
var ret string
return ret
}
return *o.Actor
}
// GetActorOk returns a tuple with the Actor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlagActivityRow) GetActorOk() (*string, bool) {
if o == nil || IsNil(o.Actor) {
return nil, false
}
return o.Actor, true
}
// HasActor returns a boolean if a field has been set.
func (o *FlagActivityRow) HasActor() bool {
if o != nil && !IsNil(o.Actor) {
return true
}
return false
}
// SetActor gets a reference to the given string and assigns it to the Actor field.
func (o *FlagActivityRow) SetActor(v string) {
o.Actor = &v
}
// GetAt returns the At field value if set, zero value otherwise.
func (o *FlagActivityRow) GetAt() string {
if o == nil || IsNil(o.At) {
var ret string
return ret
}
return *o.At
}
// GetAtOk returns a tuple with the At field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlagActivityRow) GetAtOk() (*string, bool) {
if o == nil || IsNil(o.At) {
return nil, false
}
return o.At, true
}
// HasAt returns a boolean if a field has been set.
func (o *FlagActivityRow) HasAt() bool {
if o != nil && !IsNil(o.At) {
return true
}
return false
}
// SetAt gets a reference to the given string and assigns it to the At field.
func (o *FlagActivityRow) SetAt(v string) {
o.At = &v
}
// GetDetail returns the Detail field value if set, zero value otherwise.
func (o *FlagActivityRow) GetDetail() string {
if o == nil || IsNil(o.Detail) {
var ret string
return ret
}
return *o.Detail
}
// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlagActivityRow) GetDetailOk() (*string, bool) {
if o == nil || IsNil(o.Detail) {
return nil, false
}
return o.Detail, true
}
// HasDetail returns a boolean if a field has been set.
func (o *FlagActivityRow) HasDetail() bool {
if o != nil && !IsNil(o.Detail) {
return true
}
return false
}
// SetDetail gets a reference to the given string and assigns it to the Detail field.
func (o *FlagActivityRow) SetDetail(v string) {
o.Detail = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *FlagActivityRow) GetId() int64 {
if o == nil || IsNil(o.Id) {
var ret int64
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlagActivityRow) GetIdOk() (*int64, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *FlagActivityRow) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *FlagActivityRow) SetId(v int64) {
o.Id = &v
}
// GetKey returns the Key field value if set, zero value otherwise.
func (o *FlagActivityRow) GetKey() string {
if o == nil || IsNil(o.Key) {
var ret string
return ret
}
return *o.Key
}
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FlagActivityRow) GetKeyOk() (*string, bool) {
if o == nil || IsNil(o.Key) {
return nil, false
}
return o.Key, true
}
// HasKey returns a boolean if a field has been set.
func (o *FlagActivityRow) HasKey() bool {
if o != nil && !IsNil(o.Key) {
return true
}
return false
}
// SetKey gets a reference to the given string and assigns it to the Key field.
func (o *FlagActivityRow) SetKey(v string) {
o.Key = &v
}
func (o FlagActivityRow) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FlagActivityRow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if !IsNil(o.Actor) {
toSerialize["actor"] = o.Actor
}
if !IsNil(o.At) {
toSerialize["at"] = o.At
}
if !IsNil(o.Detail) {
toSerialize["detail"] = o.Detail
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Key) {
toSerialize["key"] = o.Key
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FlagActivityRow) UnmarshalJSON(data []byte) (err error) {
varFlagActivityRow := _FlagActivityRow{}
err = json.Unmarshal(data, &varFlagActivityRow)
if err != nil {
return err
}
*o = FlagActivityRow(varFlagActivityRow)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "action")
delete(additionalProperties, "actor")
delete(additionalProperties, "at")
delete(additionalProperties, "detail")
delete(additionalProperties, "id")
delete(additionalProperties, "key")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFlagActivityRow struct {
value *FlagActivityRow
isSet bool
}
func (v NullableFlagActivityRow) Get() *FlagActivityRow {
return v.value
}
func (v *NullableFlagActivityRow) Set(val *FlagActivityRow) {
v.value = val
v.isSet = true
}
func (v NullableFlagActivityRow) IsSet() bool {
return v.isSet
}
func (v *NullableFlagActivityRow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFlagActivityRow(val *FlagActivityRow) *NullableFlagActivityRow {
return &NullableFlagActivityRow{value: val, isSet: true}
}
func (v NullableFlagActivityRow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFlagActivityRow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}