first version
This commit is contained in:
220
model_schema_add_comment_req.go
Normal file
220
model_schema_add_comment_req.go
Normal file
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
answer
|
||||
|
||||
answer api
|
||||
|
||||
API version: v0.0.1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the SchemaAddCommentReq type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaAddCommentReq{}
|
||||
|
||||
// SchemaAddCommentReq struct for SchemaAddCommentReq
|
||||
type SchemaAddCommentReq struct {
|
||||
// @ user id list
|
||||
MentionUsernameList []string `json:"mention_username_list,omitempty"`
|
||||
// object id
|
||||
ObjectId string `json:"object_id"`
|
||||
// original comment content
|
||||
OriginalText string `json:"original_text"`
|
||||
// reply comment id
|
||||
ReplyCommentId *string `json:"reply_comment_id,omitempty"`
|
||||
}
|
||||
|
||||
// NewSchemaAddCommentReq instantiates a new SchemaAddCommentReq 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 NewSchemaAddCommentReq(objectId string, originalText string) *SchemaAddCommentReq {
|
||||
this := SchemaAddCommentReq{}
|
||||
this.ObjectId = objectId
|
||||
this.OriginalText = originalText
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaAddCommentReqWithDefaults instantiates a new SchemaAddCommentReq 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 NewSchemaAddCommentReqWithDefaults() *SchemaAddCommentReq {
|
||||
this := SchemaAddCommentReq{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetMentionUsernameList returns the MentionUsernameList field value if set, zero value otherwise.
|
||||
func (o *SchemaAddCommentReq) GetMentionUsernameList() []string {
|
||||
if o == nil || IsNil(o.MentionUsernameList) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.MentionUsernameList
|
||||
}
|
||||
|
||||
// GetMentionUsernameListOk returns a tuple with the MentionUsernameList field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaAddCommentReq) GetMentionUsernameListOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.MentionUsernameList) {
|
||||
return nil, false
|
||||
}
|
||||
return o.MentionUsernameList, true
|
||||
}
|
||||
|
||||
// HasMentionUsernameList returns a boolean if a field has been set.
|
||||
func (o *SchemaAddCommentReq) HasMentionUsernameList() bool {
|
||||
if o != nil && !IsNil(o.MentionUsernameList) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMentionUsernameList gets a reference to the given []string and assigns it to the MentionUsernameList field.
|
||||
func (o *SchemaAddCommentReq) SetMentionUsernameList(v []string) {
|
||||
o.MentionUsernameList = v
|
||||
}
|
||||
|
||||
// GetObjectId returns the ObjectId field value
|
||||
func (o *SchemaAddCommentReq) 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 *SchemaAddCommentReq) GetObjectIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.ObjectId, true
|
||||
}
|
||||
|
||||
// SetObjectId sets field value
|
||||
func (o *SchemaAddCommentReq) SetObjectId(v string) {
|
||||
o.ObjectId = v
|
||||
}
|
||||
|
||||
// GetOriginalText returns the OriginalText field value
|
||||
func (o *SchemaAddCommentReq) GetOriginalText() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.OriginalText
|
||||
}
|
||||
|
||||
// GetOriginalTextOk returns a tuple with the OriginalText field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaAddCommentReq) GetOriginalTextOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.OriginalText, true
|
||||
}
|
||||
|
||||
// SetOriginalText sets field value
|
||||
func (o *SchemaAddCommentReq) SetOriginalText(v string) {
|
||||
o.OriginalText = v
|
||||
}
|
||||
|
||||
// GetReplyCommentId returns the ReplyCommentId field value if set, zero value otherwise.
|
||||
func (o *SchemaAddCommentReq) GetReplyCommentId() string {
|
||||
if o == nil || IsNil(o.ReplyCommentId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ReplyCommentId
|
||||
}
|
||||
|
||||
// GetReplyCommentIdOk returns a tuple with the ReplyCommentId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaAddCommentReq) GetReplyCommentIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ReplyCommentId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ReplyCommentId, true
|
||||
}
|
||||
|
||||
// HasReplyCommentId returns a boolean if a field has been set.
|
||||
func (o *SchemaAddCommentReq) HasReplyCommentId() bool {
|
||||
if o != nil && !IsNil(o.ReplyCommentId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetReplyCommentId gets a reference to the given string and assigns it to the ReplyCommentId field.
|
||||
func (o *SchemaAddCommentReq) SetReplyCommentId(v string) {
|
||||
o.ReplyCommentId = &v
|
||||
}
|
||||
|
||||
func (o SchemaAddCommentReq) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaAddCommentReq) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.MentionUsernameList) {
|
||||
toSerialize["mention_username_list"] = o.MentionUsernameList
|
||||
}
|
||||
toSerialize["object_id"] = o.ObjectId
|
||||
toSerialize["original_text"] = o.OriginalText
|
||||
if !IsNil(o.ReplyCommentId) {
|
||||
toSerialize["reply_comment_id"] = o.ReplyCommentId
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaAddCommentReq struct {
|
||||
value *SchemaAddCommentReq
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaAddCommentReq) Get() *SchemaAddCommentReq {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaAddCommentReq) Set(val *SchemaAddCommentReq) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaAddCommentReq) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaAddCommentReq) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaAddCommentReq(val *SchemaAddCommentReq) *NullableSchemaAddCommentReq {
|
||||
return &NullableSchemaAddCommentReq{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaAddCommentReq) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaAddCommentReq) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user