Files
sdk/model_meet_record_in.go

168 lines
4.2 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
"fmt"
)
// checks if the MeetRecordIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MeetRecordIn{}
// MeetRecordIn struct for MeetRecordIn
type MeetRecordIn struct {
// Room is the LiveKit room, named the way the office client names one (`<space>_<name>_<id>`). Its leading segment is what binds the room to a tenant, and it is the segment the caller's membership is checked against.
Room string `json:"room"`
AdditionalProperties map[string]interface{}
}
type _MeetRecordIn MeetRecordIn
// NewMeetRecordIn instantiates a new MeetRecordIn 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 NewMeetRecordIn(room string) *MeetRecordIn {
this := MeetRecordIn{}
this.Room = room
return &this
}
// NewMeetRecordInWithDefaults instantiates a new MeetRecordIn 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 NewMeetRecordInWithDefaults() *MeetRecordIn {
this := MeetRecordIn{}
return &this
}
// GetRoom returns the Room field value
func (o *MeetRecordIn) GetRoom() string {
if o == nil {
var ret string
return ret
}
return o.Room
}
// GetRoomOk returns a tuple with the Room field value
// and a boolean to check if the value has been set.
func (o *MeetRecordIn) GetRoomOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Room, true
}
// SetRoom sets field value
func (o *MeetRecordIn) SetRoom(v string) {
o.Room = v
}
func (o MeetRecordIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MeetRecordIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["room"] = o.Room
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *MeetRecordIn) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"room",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varMeetRecordIn := _MeetRecordIn{}
err = json.Unmarshal(data, &varMeetRecordIn)
if err != nil {
return err
}
*o = MeetRecordIn(varMeetRecordIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "room")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableMeetRecordIn struct {
value *MeetRecordIn
isSet bool
}
func (v NullableMeetRecordIn) Get() *MeetRecordIn {
return v.value
}
func (v *NullableMeetRecordIn) Set(val *MeetRecordIn) {
v.value = val
v.isSet = true
}
func (v NullableMeetRecordIn) IsSet() bool {
return v.isSet
}
func (v *NullableMeetRecordIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMeetRecordIn(val *MeetRecordIn) *NullableMeetRecordIn {
return &NullableMeetRecordIn{value: val, isSet: true}
}
func (v NullableMeetRecordIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMeetRecordIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}