Files
sdk/model_git_workspace_view.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 GitWorkspaceView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GitWorkspaceView{}
// GitWorkspaceView struct for GitWorkspaceView
type GitWorkspaceView struct {
// Login is the caller's forge account in a made workspace.
Login *string `json:"login,omitempty"`
// Made says the platform made it for the org; false is the estate's.
Made *bool `json:"made,omitempty"`
// Owner is the forge namespace.
Owner *string `json:"owner,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GitWorkspaceView GitWorkspaceView
// NewGitWorkspaceView instantiates a new GitWorkspaceView 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 NewGitWorkspaceView() *GitWorkspaceView {
this := GitWorkspaceView{}
return &this
}
// NewGitWorkspaceViewWithDefaults instantiates a new GitWorkspaceView 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 NewGitWorkspaceViewWithDefaults() *GitWorkspaceView {
this := GitWorkspaceView{}
return &this
}
// GetLogin returns the Login field value if set, zero value otherwise.
func (o *GitWorkspaceView) GetLogin() string {
if o == nil || IsNil(o.Login) {
var ret string
return ret
}
return *o.Login
}
// GetLoginOk returns a tuple with the Login field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitWorkspaceView) GetLoginOk() (*string, bool) {
if o == nil || IsNil(o.Login) {
return nil, false
}
return o.Login, true
}
// HasLogin returns a boolean if a field has been set.
func (o *GitWorkspaceView) HasLogin() bool {
if o != nil && !IsNil(o.Login) {
return true
}
return false
}
// SetLogin gets a reference to the given string and assigns it to the Login field.
func (o *GitWorkspaceView) SetLogin(v string) {
o.Login = &v
}
// GetMade returns the Made field value if set, zero value otherwise.
func (o *GitWorkspaceView) GetMade() bool {
if o == nil || IsNil(o.Made) {
var ret bool
return ret
}
return *o.Made
}
// GetMadeOk returns a tuple with the Made field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GitWorkspaceView) GetMadeOk() (*bool, bool) {
if o == nil || IsNil(o.Made) {
return nil, false
}
return o.Made, true
}
// HasMade returns a boolean if a field has been set.
func (o *GitWorkspaceView) HasMade() bool {
if o != nil && !IsNil(o.Made) {
return true
}
return false
}
// SetMade gets a reference to the given bool and assigns it to the Made field.
func (o *GitWorkspaceView) SetMade(v bool) {
o.Made = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *GitWorkspaceView) 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 *GitWorkspaceView) 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 *GitWorkspaceView) 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 *GitWorkspaceView) SetOwner(v string) {
o.Owner = &v
}
func (o GitWorkspaceView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GitWorkspaceView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Login) {
toSerialize["login"] = o.Login
}
if !IsNil(o.Made) {
toSerialize["made"] = o.Made
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GitWorkspaceView) UnmarshalJSON(data []byte) (err error) {
varGitWorkspaceView := _GitWorkspaceView{}
err = json.Unmarshal(data, &varGitWorkspaceView)
if err != nil {
return err
}
*o = GitWorkspaceView(varGitWorkspaceView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "login")
delete(additionalProperties, "made")
delete(additionalProperties, "owner")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGitWorkspaceView struct {
value *GitWorkspaceView
isSet bool
}
func (v NullableGitWorkspaceView) Get() *GitWorkspaceView {
return v.value
}
func (v *NullableGitWorkspaceView) Set(val *GitWorkspaceView) {
v.value = val
v.isSet = true
}
func (v NullableGitWorkspaceView) IsSet() bool {
return v.isSet
}
func (v *NullableGitWorkspaceView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGitWorkspaceView(val *GitWorkspaceView) *NullableGitWorkspaceView {
return &NullableGitWorkspaceView{value: val, isSet: true}
}
func (v NullableGitWorkspaceView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGitWorkspaceView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}