145 lines
3.7 KiB
Go
145 lines
3.7 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 SchemaUpdateUserRoleReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaUpdateUserRoleReq{}
|
|
|
|
// SchemaUpdateUserRoleReq struct for SchemaUpdateUserRoleReq
|
|
type SchemaUpdateUserRoleReq struct {
|
|
// role id
|
|
RoleId int32 `json:"role_id"`
|
|
// user id
|
|
UserId string `json:"user_id"`
|
|
}
|
|
|
|
// NewSchemaUpdateUserRoleReq instantiates a new SchemaUpdateUserRoleReq 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 NewSchemaUpdateUserRoleReq(roleId int32, userId string) *SchemaUpdateUserRoleReq {
|
|
this := SchemaUpdateUserRoleReq{}
|
|
this.RoleId = roleId
|
|
this.UserId = userId
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaUpdateUserRoleReqWithDefaults instantiates a new SchemaUpdateUserRoleReq 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 NewSchemaUpdateUserRoleReqWithDefaults() *SchemaUpdateUserRoleReq {
|
|
this := SchemaUpdateUserRoleReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetRoleId returns the RoleId field value
|
|
func (o *SchemaUpdateUserRoleReq) GetRoleId() int32 {
|
|
if o == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
|
|
return o.RoleId
|
|
}
|
|
|
|
// GetRoleIdOk returns a tuple with the RoleId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateUserRoleReq) GetRoleIdOk() (*int32, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.RoleId, true
|
|
}
|
|
|
|
// SetRoleId sets field value
|
|
func (o *SchemaUpdateUserRoleReq) SetRoleId(v int32) {
|
|
o.RoleId = v
|
|
}
|
|
|
|
// GetUserId returns the UserId field value
|
|
func (o *SchemaUpdateUserRoleReq) GetUserId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.UserId
|
|
}
|
|
|
|
// GetUserIdOk returns a tuple with the UserId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateUserRoleReq) GetUserIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.UserId, true
|
|
}
|
|
|
|
// SetUserId sets field value
|
|
func (o *SchemaUpdateUserRoleReq) SetUserId(v string) {
|
|
o.UserId = v
|
|
}
|
|
|
|
func (o SchemaUpdateUserRoleReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaUpdateUserRoleReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["role_id"] = o.RoleId
|
|
toSerialize["user_id"] = o.UserId
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaUpdateUserRoleReq struct {
|
|
value *SchemaUpdateUserRoleReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaUpdateUserRoleReq) Get() *SchemaUpdateUserRoleReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateUserRoleReq) Set(val *SchemaUpdateUserRoleReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaUpdateUserRoleReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateUserRoleReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaUpdateUserRoleReq(val *SchemaUpdateUserRoleReq) *NullableSchemaUpdateUserRoleReq {
|
|
return &NullableSchemaUpdateUserRoleReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaUpdateUserRoleReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateUserRoleReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|