Files
openapi-go-answer/model_schema_act_object_info.go
2023-09-26 16:20:01 +08:00

341 lines
9.2 KiB
Go

/*
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package answer_sdk
import (
"encoding/json"
)
// checks if the SchemaActObjectInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaActObjectInfo{}
// SchemaActObjectInfo struct for SchemaActObjectInfo
type SchemaActObjectInfo struct {
AnswerId *string `json:"answer_id,omitempty"`
DisplayName *string `json:"display_name,omitempty"`
MainTagSlugName *string `json:"main_tag_slug_name,omitempty"`
ObjectType *string `json:"object_type,omitempty"`
QuestionId *string `json:"question_id,omitempty"`
Title *string `json:"title,omitempty"`
Username *string `json:"username,omitempty"`
}
// NewSchemaActObjectInfo instantiates a new SchemaActObjectInfo 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 NewSchemaActObjectInfo() *SchemaActObjectInfo {
this := SchemaActObjectInfo{}
return &this
}
// NewSchemaActObjectInfoWithDefaults instantiates a new SchemaActObjectInfo 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 NewSchemaActObjectInfoWithDefaults() *SchemaActObjectInfo {
this := SchemaActObjectInfo{}
return &this
}
// GetAnswerId returns the AnswerId field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetAnswerId() string {
if o == nil || IsNil(o.AnswerId) {
var ret string
return ret
}
return *o.AnswerId
}
// GetAnswerIdOk returns a tuple with the AnswerId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetAnswerIdOk() (*string, bool) {
if o == nil || IsNil(o.AnswerId) {
return nil, false
}
return o.AnswerId, true
}
// HasAnswerId returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasAnswerId() bool {
if o != nil && !IsNil(o.AnswerId) {
return true
}
return false
}
// SetAnswerId gets a reference to the given string and assigns it to the AnswerId field.
func (o *SchemaActObjectInfo) SetAnswerId(v string) {
o.AnswerId = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *SchemaActObjectInfo) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetMainTagSlugName returns the MainTagSlugName field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetMainTagSlugName() string {
if o == nil || IsNil(o.MainTagSlugName) {
var ret string
return ret
}
return *o.MainTagSlugName
}
// GetMainTagSlugNameOk returns a tuple with the MainTagSlugName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetMainTagSlugNameOk() (*string, bool) {
if o == nil || IsNil(o.MainTagSlugName) {
return nil, false
}
return o.MainTagSlugName, true
}
// HasMainTagSlugName returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasMainTagSlugName() bool {
if o != nil && !IsNil(o.MainTagSlugName) {
return true
}
return false
}
// SetMainTagSlugName gets a reference to the given string and assigns it to the MainTagSlugName field.
func (o *SchemaActObjectInfo) SetMainTagSlugName(v string) {
o.MainTagSlugName = &v
}
// GetObjectType returns the ObjectType field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetObjectType() string {
if o == nil || IsNil(o.ObjectType) {
var ret string
return ret
}
return *o.ObjectType
}
// GetObjectTypeOk returns a tuple with the ObjectType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetObjectTypeOk() (*string, bool) {
if o == nil || IsNil(o.ObjectType) {
return nil, false
}
return o.ObjectType, true
}
// HasObjectType returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasObjectType() bool {
if o != nil && !IsNil(o.ObjectType) {
return true
}
return false
}
// SetObjectType gets a reference to the given string and assigns it to the ObjectType field.
func (o *SchemaActObjectInfo) SetObjectType(v string) {
o.ObjectType = &v
}
// GetQuestionId returns the QuestionId field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetQuestionId() string {
if o == nil || IsNil(o.QuestionId) {
var ret string
return ret
}
return *o.QuestionId
}
// GetQuestionIdOk returns a tuple with the QuestionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetQuestionIdOk() (*string, bool) {
if o == nil || IsNil(o.QuestionId) {
return nil, false
}
return o.QuestionId, true
}
// HasQuestionId returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasQuestionId() bool {
if o != nil && !IsNil(o.QuestionId) {
return true
}
return false
}
// SetQuestionId gets a reference to the given string and assigns it to the QuestionId field.
func (o *SchemaActObjectInfo) SetQuestionId(v string) {
o.QuestionId = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *SchemaActObjectInfo) SetTitle(v string) {
o.Title = &v
}
// GetUsername returns the Username field value if set, zero value otherwise.
func (o *SchemaActObjectInfo) GetUsername() string {
if o == nil || IsNil(o.Username) {
var ret string
return ret
}
return *o.Username
}
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaActObjectInfo) GetUsernameOk() (*string, bool) {
if o == nil || IsNil(o.Username) {
return nil, false
}
return o.Username, true
}
// HasUsername returns a boolean if a field has been set.
func (o *SchemaActObjectInfo) HasUsername() bool {
if o != nil && !IsNil(o.Username) {
return true
}
return false
}
// SetUsername gets a reference to the given string and assigns it to the Username field.
func (o *SchemaActObjectInfo) SetUsername(v string) {
o.Username = &v
}
func (o SchemaActObjectInfo) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaActObjectInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AnswerId) {
toSerialize["answer_id"] = o.AnswerId
}
if !IsNil(o.DisplayName) {
toSerialize["display_name"] = o.DisplayName
}
if !IsNil(o.MainTagSlugName) {
toSerialize["main_tag_slug_name"] = o.MainTagSlugName
}
if !IsNil(o.ObjectType) {
toSerialize["object_type"] = o.ObjectType
}
if !IsNil(o.QuestionId) {
toSerialize["question_id"] = o.QuestionId
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Username) {
toSerialize["username"] = o.Username
}
return toSerialize, nil
}
type NullableSchemaActObjectInfo struct {
value *SchemaActObjectInfo
isSet bool
}
func (v NullableSchemaActObjectInfo) Get() *SchemaActObjectInfo {
return v.value
}
func (v *NullableSchemaActObjectInfo) Set(val *SchemaActObjectInfo) {
v.value = val
v.isSet = true
}
func (v NullableSchemaActObjectInfo) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaActObjectInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaActObjectInfo(val *SchemaActObjectInfo) *NullableSchemaActObjectInfo {
return &NullableSchemaActObjectInfo{value: val, isSet: true}
}
func (v NullableSchemaActObjectInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaActObjectInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}