Files
sdk/model_eval_board_scope.go

231 lines
5.8 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 EvalBoardScope type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalBoardScope{}
// EvalBoardScope struct for EvalBoardScope
type EvalBoardScope struct {
// true when a platform admin is seeing every org at once
AllOrgs *bool `json:"allOrgs,omitempty"`
// the org the board covers; \"\" when it covers all of them
Org *string `json:"org,omitempty"`
// the sub-scope within the org; \"\" is the whole org
Project *string `json:"project,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalBoardScope EvalBoardScope
// NewEvalBoardScope instantiates a new EvalBoardScope 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 NewEvalBoardScope() *EvalBoardScope {
this := EvalBoardScope{}
return &this
}
// NewEvalBoardScopeWithDefaults instantiates a new EvalBoardScope 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 NewEvalBoardScopeWithDefaults() *EvalBoardScope {
this := EvalBoardScope{}
return &this
}
// GetAllOrgs returns the AllOrgs field value if set, zero value otherwise.
func (o *EvalBoardScope) GetAllOrgs() bool {
if o == nil || IsNil(o.AllOrgs) {
var ret bool
return ret
}
return *o.AllOrgs
}
// GetAllOrgsOk returns a tuple with the AllOrgs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoardScope) GetAllOrgsOk() (*bool, bool) {
if o == nil || IsNil(o.AllOrgs) {
return nil, false
}
return o.AllOrgs, true
}
// HasAllOrgs returns a boolean if a field has been set.
func (o *EvalBoardScope) HasAllOrgs() bool {
if o != nil && !IsNil(o.AllOrgs) {
return true
}
return false
}
// SetAllOrgs gets a reference to the given bool and assigns it to the AllOrgs field.
func (o *EvalBoardScope) SetAllOrgs(v bool) {
o.AllOrgs = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *EvalBoardScope) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoardScope) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *EvalBoardScope) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *EvalBoardScope) SetOrg(v string) {
o.Org = &v
}
// GetProject returns the Project field value if set, zero value otherwise.
func (o *EvalBoardScope) GetProject() string {
if o == nil || IsNil(o.Project) {
var ret string
return ret
}
return *o.Project
}
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoardScope) GetProjectOk() (*string, bool) {
if o == nil || IsNil(o.Project) {
return nil, false
}
return o.Project, true
}
// HasProject returns a boolean if a field has been set.
func (o *EvalBoardScope) HasProject() bool {
if o != nil && !IsNil(o.Project) {
return true
}
return false
}
// SetProject gets a reference to the given string and assigns it to the Project field.
func (o *EvalBoardScope) SetProject(v string) {
o.Project = &v
}
func (o EvalBoardScope) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalBoardScope) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AllOrgs) {
toSerialize["allOrgs"] = o.AllOrgs
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Project) {
toSerialize["project"] = o.Project
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EvalBoardScope) UnmarshalJSON(data []byte) (err error) {
varEvalBoardScope := _EvalBoardScope{}
err = json.Unmarshal(data, &varEvalBoardScope)
if err != nil {
return err
}
*o = EvalBoardScope(varEvalBoardScope)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "allOrgs")
delete(additionalProperties, "org")
delete(additionalProperties, "project")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalBoardScope struct {
value *EvalBoardScope
isSet bool
}
func (v NullableEvalBoardScope) Get() *EvalBoardScope {
return v.value
}
func (v *NullableEvalBoardScope) Set(val *EvalBoardScope) {
v.value = val
v.isSet = true
}
func (v NullableEvalBoardScope) IsSet() bool {
return v.isSet
}
func (v *NullableEvalBoardScope) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalBoardScope(val *EvalBoardScope) *NullableEvalBoardScope {
return &NullableEvalBoardScope{value: val, isSet: true}
}
func (v NullableEvalBoardScope) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalBoardScope) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}