Files
sdk/model_social_org_app_write.go

231 lines
6.2 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 SocialOrgAppWrite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SocialOrgAppWrite{}
// SocialOrgAppWrite struct for SocialOrgAppWrite
type SocialOrgAppWrite struct {
// ClientID is the full app id, never a mask. Empty clears the app.
ClientId *string `json:"clientId,omitempty"`
// ClientSecret is the secret. Absent leaves the sealed value. An empty string clears it.
ClientSecret *string `json:"clientSecret,omitempty"`
// Provider is the network to write.
Provider *string `json:"provider,omitempty"`
AdditionalProperties map[string]interface{}
}
type _SocialOrgAppWrite SocialOrgAppWrite
// NewSocialOrgAppWrite instantiates a new SocialOrgAppWrite 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 NewSocialOrgAppWrite() *SocialOrgAppWrite {
this := SocialOrgAppWrite{}
return &this
}
// NewSocialOrgAppWriteWithDefaults instantiates a new SocialOrgAppWrite 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 NewSocialOrgAppWriteWithDefaults() *SocialOrgAppWrite {
this := SocialOrgAppWrite{}
return &this
}
// GetClientId returns the ClientId field value if set, zero value otherwise.
func (o *SocialOrgAppWrite) GetClientId() string {
if o == nil || IsNil(o.ClientId) {
var ret string
return ret
}
return *o.ClientId
}
// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SocialOrgAppWrite) GetClientIdOk() (*string, bool) {
if o == nil || IsNil(o.ClientId) {
return nil, false
}
return o.ClientId, true
}
// HasClientId returns a boolean if a field has been set.
func (o *SocialOrgAppWrite) HasClientId() bool {
if o != nil && !IsNil(o.ClientId) {
return true
}
return false
}
// SetClientId gets a reference to the given string and assigns it to the ClientId field.
func (o *SocialOrgAppWrite) SetClientId(v string) {
o.ClientId = &v
}
// GetClientSecret returns the ClientSecret field value if set, zero value otherwise.
func (o *SocialOrgAppWrite) GetClientSecret() string {
if o == nil || IsNil(o.ClientSecret) {
var ret string
return ret
}
return *o.ClientSecret
}
// GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SocialOrgAppWrite) GetClientSecretOk() (*string, bool) {
if o == nil || IsNil(o.ClientSecret) {
return nil, false
}
return o.ClientSecret, true
}
// HasClientSecret returns a boolean if a field has been set.
func (o *SocialOrgAppWrite) HasClientSecret() bool {
if o != nil && !IsNil(o.ClientSecret) {
return true
}
return false
}
// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field.
func (o *SocialOrgAppWrite) SetClientSecret(v string) {
o.ClientSecret = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *SocialOrgAppWrite) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SocialOrgAppWrite) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *SocialOrgAppWrite) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *SocialOrgAppWrite) SetProvider(v string) {
o.Provider = &v
}
func (o SocialOrgAppWrite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SocialOrgAppWrite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ClientId) {
toSerialize["clientId"] = o.ClientId
}
if !IsNil(o.ClientSecret) {
toSerialize["clientSecret"] = o.ClientSecret
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *SocialOrgAppWrite) UnmarshalJSON(data []byte) (err error) {
varSocialOrgAppWrite := _SocialOrgAppWrite{}
err = json.Unmarshal(data, &varSocialOrgAppWrite)
if err != nil {
return err
}
*o = SocialOrgAppWrite(varSocialOrgAppWrite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "clientId")
delete(additionalProperties, "clientSecret")
delete(additionalProperties, "provider")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableSocialOrgAppWrite struct {
value *SocialOrgAppWrite
isSet bool
}
func (v NullableSocialOrgAppWrite) Get() *SocialOrgAppWrite {
return v.value
}
func (v *NullableSocialOrgAppWrite) Set(val *SocialOrgAppWrite) {
v.value = val
v.isSet = true
}
func (v NullableSocialOrgAppWrite) IsSet() bool {
return v.isSet
}
func (v *NullableSocialOrgAppWrite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSocialOrgAppWrite(val *SocialOrgAppWrite) *NullableSocialOrgAppWrite {
return &NullableSocialOrgAppWrite{value: val, isSet: true}
}
func (v NullableSocialOrgAppWrite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSocialOrgAppWrite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}