first version
This commit is contained in:
183
model_schema_add_report_req.go
Normal file
183
model_schema_add_report_req.go
Normal file
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
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 SchemaAddReportReq type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaAddReportReq{}
|
||||
|
||||
// SchemaAddReportReq struct for SchemaAddReportReq
|
||||
type SchemaAddReportReq struct {
|
||||
// report content
|
||||
Content *string `json:"content,omitempty"`
|
||||
// object id
|
||||
ObjectId string `json:"object_id"`
|
||||
// report type
|
||||
ReportType int32 `json:"report_type"`
|
||||
}
|
||||
|
||||
// NewSchemaAddReportReq instantiates a new SchemaAddReportReq 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 NewSchemaAddReportReq(objectId string, reportType int32) *SchemaAddReportReq {
|
||||
this := SchemaAddReportReq{}
|
||||
this.ObjectId = objectId
|
||||
this.ReportType = reportType
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaAddReportReqWithDefaults instantiates a new SchemaAddReportReq 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 NewSchemaAddReportReqWithDefaults() *SchemaAddReportReq {
|
||||
this := SchemaAddReportReq{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetContent returns the Content field value if set, zero value otherwise.
|
||||
func (o *SchemaAddReportReq) GetContent() string {
|
||||
if o == nil || IsNil(o.Content) {
|
||||
var ret string
|
||||
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 *SchemaAddReportReq) GetContentOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Content) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Content, true
|
||||
}
|
||||
|
||||
// HasContent returns a boolean if a field has been set.
|
||||
func (o *SchemaAddReportReq) HasContent() bool {
|
||||
if o != nil && !IsNil(o.Content) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetContent gets a reference to the given string and assigns it to the Content field.
|
||||
func (o *SchemaAddReportReq) SetContent(v string) {
|
||||
o.Content = &v
|
||||
}
|
||||
|
||||
// GetObjectId returns the ObjectId field value
|
||||
func (o *SchemaAddReportReq) 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 *SchemaAddReportReq) GetObjectIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.ObjectId, true
|
||||
}
|
||||
|
||||
// SetObjectId sets field value
|
||||
func (o *SchemaAddReportReq) SetObjectId(v string) {
|
||||
o.ObjectId = v
|
||||
}
|
||||
|
||||
// GetReportType returns the ReportType field value
|
||||
func (o *SchemaAddReportReq) GetReportType() int32 {
|
||||
if o == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.ReportType
|
||||
}
|
||||
|
||||
// GetReportTypeOk returns a tuple with the ReportType field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaAddReportReq) GetReportTypeOk() (*int32, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.ReportType, true
|
||||
}
|
||||
|
||||
// SetReportType sets field value
|
||||
func (o *SchemaAddReportReq) SetReportType(v int32) {
|
||||
o.ReportType = v
|
||||
}
|
||||
|
||||
func (o SchemaAddReportReq) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaAddReportReq) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Content) {
|
||||
toSerialize["content"] = o.Content
|
||||
}
|
||||
toSerialize["object_id"] = o.ObjectId
|
||||
toSerialize["report_type"] = o.ReportType
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaAddReportReq struct {
|
||||
value *SchemaAddReportReq
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaAddReportReq) Get() *SchemaAddReportReq {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaAddReportReq) Set(val *SchemaAddReportReq) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaAddReportReq) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaAddReportReq) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaAddReportReq(val *SchemaAddReportReq) *NullableSchemaAddReportReq {
|
||||
return &NullableSchemaAddReportReq{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaAddReportReq) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaAddReportReq) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user