Files
sdk/model_meet_recording.go

383 lines
11 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"
)
// checks if the MeetRecording type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MeetRecording{}
// MeetRecording struct for MeetRecording
type MeetRecording struct {
// Bucket is the object store bucket the recording is written to. It is stated beside the key rather than folded into one URI so a client reads two facts instead of splitting a string.
Bucket *string `json:"bucket,omitempty"`
// Error is the media server's reason when a recording failed, and empty otherwise.
Error *string `json:"error,omitempty"`
// ID is the media server's egress id — the handle a later read names.
Id *string `json:"id,omitempty"`
// Object is the key inside that bucket. Empty only while the media server has not named a file yet. It says WHERE the recording is, not how to fetch it. Reading one back is a separate decision this surface deliberately does not make: a link to a private conversation needs its own answer about who may follow it and for how long, and inventing a short one here would be worse than not having it.
Object *string `json:"object,omitempty"`
// Room is the room this recording is of.
Room *string `json:"room,omitempty"`
// Started is when the recording began, as the media server reports it: its own `started_at`, verbatim and unconverted. LiveKit's egress service sets that field from UnixNano, and a conversion this side cannot check against the running server would be a number that looks right and is wrong by a factor of a billion. 0 means it has not started.
Started *int64 `json:"started,omitempty"`
// Status is the media server's own state name: EGRESS_STARTING, EGRESS_ACTIVE, EGRESS_ENDING, EGRESS_COMPLETE, EGRESS_FAILED, EGRESS_ABORTED or EGRESS_LIMIT_REACHED. It is passed through rather than folded into a vocabulary of ours, so the answer cannot mean something the media server did not say.
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _MeetRecording MeetRecording
// NewMeetRecording instantiates a new MeetRecording 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 NewMeetRecording() *MeetRecording {
this := MeetRecording{}
return &this
}
// NewMeetRecordingWithDefaults instantiates a new MeetRecording 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 NewMeetRecordingWithDefaults() *MeetRecording {
this := MeetRecording{}
return &this
}
// GetBucket returns the Bucket field value if set, zero value otherwise.
func (o *MeetRecording) GetBucket() string {
if o == nil || IsNil(o.Bucket) {
var ret string
return ret
}
return *o.Bucket
}
// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetBucketOk() (*string, bool) {
if o == nil || IsNil(o.Bucket) {
return nil, false
}
return o.Bucket, true
}
// HasBucket returns a boolean if a field has been set.
func (o *MeetRecording) HasBucket() bool {
if o != nil && !IsNil(o.Bucket) {
return true
}
return false
}
// SetBucket gets a reference to the given string and assigns it to the Bucket field.
func (o *MeetRecording) SetBucket(v string) {
o.Bucket = &v
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *MeetRecording) GetError() string {
if o == nil || IsNil(o.Error) {
var ret string
return ret
}
return *o.Error
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetErrorOk() (*string, bool) {
if o == nil || IsNil(o.Error) {
return nil, false
}
return o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *MeetRecording) HasError() bool {
if o != nil && !IsNil(o.Error) {
return true
}
return false
}
// SetError gets a reference to the given string and assigns it to the Error field.
func (o *MeetRecording) SetError(v string) {
o.Error = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *MeetRecording) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *MeetRecording) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *MeetRecording) SetId(v string) {
o.Id = &v
}
// GetObject returns the Object field value if set, zero value otherwise.
func (o *MeetRecording) GetObject() string {
if o == nil || IsNil(o.Object) {
var ret string
return ret
}
return *o.Object
}
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetObjectOk() (*string, bool) {
if o == nil || IsNil(o.Object) {
return nil, false
}
return o.Object, true
}
// HasObject returns a boolean if a field has been set.
func (o *MeetRecording) HasObject() bool {
if o != nil && !IsNil(o.Object) {
return true
}
return false
}
// SetObject gets a reference to the given string and assigns it to the Object field.
func (o *MeetRecording) SetObject(v string) {
o.Object = &v
}
// GetRoom returns the Room field value if set, zero value otherwise.
func (o *MeetRecording) GetRoom() string {
if o == nil || IsNil(o.Room) {
var ret string
return ret
}
return *o.Room
}
// GetRoomOk returns a tuple with the Room field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetRoomOk() (*string, bool) {
if o == nil || IsNil(o.Room) {
return nil, false
}
return o.Room, true
}
// HasRoom returns a boolean if a field has been set.
func (o *MeetRecording) HasRoom() bool {
if o != nil && !IsNil(o.Room) {
return true
}
return false
}
// SetRoom gets a reference to the given string and assigns it to the Room field.
func (o *MeetRecording) SetRoom(v string) {
o.Room = &v
}
// GetStarted returns the Started field value if set, zero value otherwise.
func (o *MeetRecording) GetStarted() int64 {
if o == nil || IsNil(o.Started) {
var ret int64
return ret
}
return *o.Started
}
// GetStartedOk returns a tuple with the Started field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetStartedOk() (*int64, bool) {
if o == nil || IsNil(o.Started) {
return nil, false
}
return o.Started, true
}
// HasStarted returns a boolean if a field has been set.
func (o *MeetRecording) HasStarted() bool {
if o != nil && !IsNil(o.Started) {
return true
}
return false
}
// SetStarted gets a reference to the given int64 and assigns it to the Started field.
func (o *MeetRecording) SetStarted(v int64) {
o.Started = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *MeetRecording) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeetRecording) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *MeetRecording) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *MeetRecording) SetStatus(v string) {
o.Status = &v
}
func (o MeetRecording) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MeetRecording) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Bucket) {
toSerialize["bucket"] = o.Bucket
}
if !IsNil(o.Error) {
toSerialize["error"] = o.Error
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Object) {
toSerialize["object"] = o.Object
}
if !IsNil(o.Room) {
toSerialize["room"] = o.Room
}
if !IsNil(o.Started) {
toSerialize["started"] = o.Started
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *MeetRecording) UnmarshalJSON(data []byte) (err error) {
varMeetRecording := _MeetRecording{}
err = json.Unmarshal(data, &varMeetRecording)
if err != nil {
return err
}
*o = MeetRecording(varMeetRecording)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "bucket")
delete(additionalProperties, "error")
delete(additionalProperties, "id")
delete(additionalProperties, "object")
delete(additionalProperties, "room")
delete(additionalProperties, "started")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableMeetRecording struct {
value *MeetRecording
isSet bool
}
func (v NullableMeetRecording) Get() *MeetRecording {
return v.value
}
func (v *NullableMeetRecording) Set(val *MeetRecording) {
v.value = val
v.isSet = true
}
func (v NullableMeetRecording) IsSet() bool {
return v.isSet
}
func (v *NullableMeetRecording) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMeetRecording(val *MeetRecording) *NullableMeetRecording {
return &NullableMeetRecording{value: val, isSet: true}
}
func (v NullableMeetRecording) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMeetRecording) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}