227 lines
5.6 KiB
Go
227 lines
5.6 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 SchemaVoteReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaVoteReq{}
|
|
|
|
// SchemaVoteReq struct for SchemaVoteReq
|
|
type SchemaVoteReq struct {
|
|
CaptchaCode *string `json:"captcha_code,omitempty"`
|
|
// captcha_id
|
|
CaptchaId *string `json:"captcha_id,omitempty"`
|
|
// is cancel
|
|
IsCancel *bool `json:"is_cancel,omitempty"`
|
|
// id
|
|
ObjectId string `json:"object_id"`
|
|
}
|
|
|
|
// NewSchemaVoteReq instantiates a new SchemaVoteReq 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 NewSchemaVoteReq(objectId string) *SchemaVoteReq {
|
|
this := SchemaVoteReq{}
|
|
this.ObjectId = objectId
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaVoteReqWithDefaults instantiates a new SchemaVoteReq 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 NewSchemaVoteReqWithDefaults() *SchemaVoteReq {
|
|
this := SchemaVoteReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetCaptchaCode returns the CaptchaCode field value if set, zero value otherwise.
|
|
func (o *SchemaVoteReq) GetCaptchaCode() string {
|
|
if o == nil || IsNil(o.CaptchaCode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CaptchaCode
|
|
}
|
|
|
|
// GetCaptchaCodeOk returns a tuple with the CaptchaCode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaVoteReq) GetCaptchaCodeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CaptchaCode) {
|
|
return nil, false
|
|
}
|
|
return o.CaptchaCode, true
|
|
}
|
|
|
|
// HasCaptchaCode returns a boolean if a field has been set.
|
|
func (o *SchemaVoteReq) HasCaptchaCode() bool {
|
|
if o != nil && !IsNil(o.CaptchaCode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCaptchaCode gets a reference to the given string and assigns it to the CaptchaCode field.
|
|
func (o *SchemaVoteReq) SetCaptchaCode(v string) {
|
|
o.CaptchaCode = &v
|
|
}
|
|
|
|
// GetCaptchaId returns the CaptchaId field value if set, zero value otherwise.
|
|
func (o *SchemaVoteReq) GetCaptchaId() string {
|
|
if o == nil || IsNil(o.CaptchaId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CaptchaId
|
|
}
|
|
|
|
// GetCaptchaIdOk returns a tuple with the CaptchaId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaVoteReq) GetCaptchaIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CaptchaId) {
|
|
return nil, false
|
|
}
|
|
return o.CaptchaId, true
|
|
}
|
|
|
|
// HasCaptchaId returns a boolean if a field has been set.
|
|
func (o *SchemaVoteReq) HasCaptchaId() bool {
|
|
if o != nil && !IsNil(o.CaptchaId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCaptchaId gets a reference to the given string and assigns it to the CaptchaId field.
|
|
func (o *SchemaVoteReq) SetCaptchaId(v string) {
|
|
o.CaptchaId = &v
|
|
}
|
|
|
|
// GetIsCancel returns the IsCancel field value if set, zero value otherwise.
|
|
func (o *SchemaVoteReq) GetIsCancel() bool {
|
|
if o == nil || IsNil(o.IsCancel) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsCancel
|
|
}
|
|
|
|
// GetIsCancelOk returns a tuple with the IsCancel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaVoteReq) GetIsCancelOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsCancel) {
|
|
return nil, false
|
|
}
|
|
return o.IsCancel, true
|
|
}
|
|
|
|
// HasIsCancel returns a boolean if a field has been set.
|
|
func (o *SchemaVoteReq) HasIsCancel() bool {
|
|
if o != nil && !IsNil(o.IsCancel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsCancel gets a reference to the given bool and assigns it to the IsCancel field.
|
|
func (o *SchemaVoteReq) SetIsCancel(v bool) {
|
|
o.IsCancel = &v
|
|
}
|
|
|
|
// GetObjectId returns the ObjectId field value
|
|
func (o *SchemaVoteReq) GetObjectId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.ObjectId
|
|
}
|
|
|
|
// GetObjectIdOk returns a tuple with the ObjectId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaVoteReq) GetObjectIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ObjectId, true
|
|
}
|
|
|
|
// SetObjectId sets field value
|
|
func (o *SchemaVoteReq) SetObjectId(v string) {
|
|
o.ObjectId = v
|
|
}
|
|
|
|
func (o SchemaVoteReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaVoteReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CaptchaCode) {
|
|
toSerialize["captcha_code"] = o.CaptchaCode
|
|
}
|
|
if !IsNil(o.CaptchaId) {
|
|
toSerialize["captcha_id"] = o.CaptchaId
|
|
}
|
|
if !IsNil(o.IsCancel) {
|
|
toSerialize["is_cancel"] = o.IsCancel
|
|
}
|
|
toSerialize["object_id"] = o.ObjectId
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaVoteReq struct {
|
|
value *SchemaVoteReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaVoteReq) Get() *SchemaVoteReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaVoteReq) Set(val *SchemaVoteReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaVoteReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaVoteReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaVoteReq(val *SchemaVoteReq) *NullableSchemaVoteReq {
|
|
return &NullableSchemaVoteReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaVoteReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaVoteReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|