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

419 lines
11 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 SchemaGetRevisionResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaGetRevisionResp{}
// SchemaGetRevisionResp struct for SchemaGetRevisionResp
type SchemaGetRevisionResp struct {
// content parsed
Content map[string]interface{} `json:"content,omitempty"`
CreateAt *int32 `json:"create_at,omitempty"`
// id
Id *string `json:"id,omitempty"`
// object id
ObjectId *string `json:"object_id,omitempty"`
Reason *string `json:"reason,omitempty"`
// revision status(normal: 1; delete 2)
Status *int32 `json:"status,omitempty"`
// title
Title *string `json:"title,omitempty"`
// user id
UseId *string `json:"use_id,omitempty"`
UserInfo *SchemaUserBasicInfo `json:"user_info,omitempty"`
}
// NewSchemaGetRevisionResp instantiates a new SchemaGetRevisionResp 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 NewSchemaGetRevisionResp() *SchemaGetRevisionResp {
this := SchemaGetRevisionResp{}
return &this
}
// NewSchemaGetRevisionRespWithDefaults instantiates a new SchemaGetRevisionResp 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 NewSchemaGetRevisionRespWithDefaults() *SchemaGetRevisionResp {
this := SchemaGetRevisionResp{}
return &this
}
// GetContent returns the Content field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetContent() map[string]interface{} {
if o == nil || IsNil(o.Content) {
var ret map[string]interface{}
return ret
}
return o.Content
}
// GetContentOk returns a tuple with the Content field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetContentOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Content) {
return map[string]interface{}{}, false
}
return o.Content, true
}
// HasContent returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasContent() bool {
if o != nil && !IsNil(o.Content) {
return true
}
return false
}
// SetContent gets a reference to the given map[string]interface{} and assigns it to the Content field.
func (o *SchemaGetRevisionResp) SetContent(v map[string]interface{}) {
o.Content = v
}
// GetCreateAt returns the CreateAt field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetCreateAt() int32 {
if o == nil || IsNil(o.CreateAt) {
var ret int32
return ret
}
return *o.CreateAt
}
// GetCreateAtOk returns a tuple with the CreateAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetCreateAtOk() (*int32, bool) {
if o == nil || IsNil(o.CreateAt) {
return nil, false
}
return o.CreateAt, true
}
// HasCreateAt returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasCreateAt() bool {
if o != nil && !IsNil(o.CreateAt) {
return true
}
return false
}
// SetCreateAt gets a reference to the given int32 and assigns it to the CreateAt field.
func (o *SchemaGetRevisionResp) SetCreateAt(v int32) {
o.CreateAt = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
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 *SchemaGetRevisionResp) GetIdOk() (*string, 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 *SchemaGetRevisionResp) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *SchemaGetRevisionResp) SetId(v string) {
o.Id = &v
}
// GetObjectId returns the ObjectId field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetObjectId() string {
if o == nil || IsNil(o.ObjectId) {
var ret string
return ret
}
return *o.ObjectId
}
// GetObjectIdOk returns a tuple with the ObjectId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetObjectIdOk() (*string, bool) {
if o == nil || IsNil(o.ObjectId) {
return nil, false
}
return o.ObjectId, true
}
// HasObjectId returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasObjectId() bool {
if o != nil && !IsNil(o.ObjectId) {
return true
}
return false
}
// SetObjectId gets a reference to the given string and assigns it to the ObjectId field.
func (o *SchemaGetRevisionResp) SetObjectId(v string) {
o.ObjectId = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *SchemaGetRevisionResp) SetReason(v string) {
o.Reason = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetStatus() int32 {
if o == nil || IsNil(o.Status) {
var ret int32
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetStatusOk() (*int32, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given int32 and assigns it to the Status field.
func (o *SchemaGetRevisionResp) SetStatus(v int32) {
o.Status = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) 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 *SchemaGetRevisionResp) 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 *SchemaGetRevisionResp) 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 *SchemaGetRevisionResp) SetTitle(v string) {
o.Title = &v
}
// GetUseId returns the UseId field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetUseId() string {
if o == nil || IsNil(o.UseId) {
var ret string
return ret
}
return *o.UseId
}
// GetUseIdOk returns a tuple with the UseId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetUseIdOk() (*string, bool) {
if o == nil || IsNil(o.UseId) {
return nil, false
}
return o.UseId, true
}
// HasUseId returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasUseId() bool {
if o != nil && !IsNil(o.UseId) {
return true
}
return false
}
// SetUseId gets a reference to the given string and assigns it to the UseId field.
func (o *SchemaGetRevisionResp) SetUseId(v string) {
o.UseId = &v
}
// GetUserInfo returns the UserInfo field value if set, zero value otherwise.
func (o *SchemaGetRevisionResp) GetUserInfo() SchemaUserBasicInfo {
if o == nil || IsNil(o.UserInfo) {
var ret SchemaUserBasicInfo
return ret
}
return *o.UserInfo
}
// GetUserInfoOk returns a tuple with the UserInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaGetRevisionResp) GetUserInfoOk() (*SchemaUserBasicInfo, bool) {
if o == nil || IsNil(o.UserInfo) {
return nil, false
}
return o.UserInfo, true
}
// HasUserInfo returns a boolean if a field has been set.
func (o *SchemaGetRevisionResp) HasUserInfo() bool {
if o != nil && !IsNil(o.UserInfo) {
return true
}
return false
}
// SetUserInfo gets a reference to the given SchemaUserBasicInfo and assigns it to the UserInfo field.
func (o *SchemaGetRevisionResp) SetUserInfo(v SchemaUserBasicInfo) {
o.UserInfo = &v
}
func (o SchemaGetRevisionResp) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaGetRevisionResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Content) {
toSerialize["content"] = o.Content
}
if !IsNil(o.CreateAt) {
toSerialize["create_at"] = o.CreateAt
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.ObjectId) {
toSerialize["object_id"] = o.ObjectId
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.UseId) {
toSerialize["use_id"] = o.UseId
}
if !IsNil(o.UserInfo) {
toSerialize["user_info"] = o.UserInfo
}
return toSerialize, nil
}
type NullableSchemaGetRevisionResp struct {
value *SchemaGetRevisionResp
isSet bool
}
func (v NullableSchemaGetRevisionResp) Get() *SchemaGetRevisionResp {
return v.value
}
func (v *NullableSchemaGetRevisionResp) Set(val *SchemaGetRevisionResp) {
v.value = val
v.isSet = true
}
func (v NullableSchemaGetRevisionResp) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaGetRevisionResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaGetRevisionResp(val *SchemaGetRevisionResp) *NullableSchemaGetRevisionResp {
return &NullableSchemaGetRevisionResp{value: val, isSet: true}
}
func (v NullableSchemaGetRevisionResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaGetRevisionResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}