diff --git a/isp/.openapi-generator/FILES b/isp/.openapi-generator/FILES index 862ee4b..ecd63ab 100644 --- a/isp/.openapi-generator/FILES +++ b/isp/.openapi-generator/FILES @@ -180,9 +180,9 @@ model_make_clip_response.go model_make_mp4_response.go model_mp4_url_response.go model_org_summary.go -model_patch_org_channel_request2.go -model_patch_org_channel_request2_ingest.go -model_patch_org_channel_request_inner.go +model_patch_org_channel_request.go +model_patch_org_channel_request2_inner.go +model_patch_org_channel_request_ingest.go model_pin_source_request.go model_play_url_response.go model_post_clip_archive_request.go diff --git a/isp/api_channels_for_organization.go b/isp/api_channels_for_organization.go index 7563ebc..84fb6da 100644 --- a/isp/api_channels_for_organization.go +++ b/isp/api_channels_for_organization.go @@ -1005,7 +1005,7 @@ type ApiPatchOrgChannelRequest struct { ifNoneMatch *[]string ifModifiedSince *time.Time ifUnmodifiedSince *time.Time - patchOrgChannelRequestInner *[]PatchOrgChannelRequestInner + patchOrgChannelRequest2Inner *[]PatchOrgChannelRequest2Inner } // Validate request but do not otherwise process it @@ -1038,8 +1038,8 @@ func (r ApiPatchOrgChannelRequest) IfUnmodifiedSince(ifUnmodifiedSince time.Time return r } -func (r ApiPatchOrgChannelRequest) PatchOrgChannelRequestInner(patchOrgChannelRequestInner []PatchOrgChannelRequestInner) ApiPatchOrgChannelRequest { - r.patchOrgChannelRequestInner = &patchOrgChannelRequestInner +func (r ApiPatchOrgChannelRequest) PatchOrgChannelRequest2Inner(patchOrgChannelRequest2Inner []PatchOrgChannelRequest2Inner) ApiPatchOrgChannelRequest { + r.patchOrgChannelRequest2Inner = &patchOrgChannelRequest2Inner return r } @@ -1123,7 +1123,7 @@ func (a *ChannelsForOrganizationApiService) PatchOrgChannelExecute(r ApiPatchOrg localVarHeaderParams["If-Unmodified-Since"] = parameterToString(*r.ifUnmodifiedSince, "") } // body params - localVarPostBody = r.patchOrgChannelRequestInner + localVarPostBody = r.patchOrgChannelRequest2Inner req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err diff --git a/isp/convenience.go b/isp/convenience.go index 4f08f45..f326e87 100644 --- a/isp/convenience.go +++ b/isp/convenience.go @@ -9,7 +9,6 @@ import ( "net/http/httputil" "net/url" "reflect" - "time" link "github.com/tent/http-link-go" "golang.org/x/oauth2/clientcredentials" @@ -246,17 +245,6 @@ func NewWithAuthHeader(header string) *HighLevelClient { // TODO: remove this... for some reason it is missing in the generated output. // At some point we need to switch to a less wonky code generator. -func parameterToString(v interface{}, _ string) string { - // Special-case time.Time and *time.Time to ensure RFC3339Nano formatting. - switch val := v.(type) { - case time.Time: - return val.UTC().Format(time.RFC3339Nano) - case *time.Time: - if val == nil { - return "" - } - return val.UTC().Format(time.RFC3339Nano) - default: - return fmt.Sprintf("%v", v) - } +func parameterToString(v interface{}, s string) string { + return fmt.Sprintf("%v", v) } diff --git a/isp/model_patch_org_channel_request2.go b/isp/model_patch_org_channel_request2.go deleted file mode 100644 index 73cce53..0000000 --- a/isp/model_patch_org_channel_request2.go +++ /dev/null @@ -1,786 +0,0 @@ -/* - * WBD Aventus Channels API - * - * API version: 0.0.0 - * Contact: live-control-plane-devs@wbd.com - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package isp - -import ( - "encoding/json" - "time" -) - -// checks if the PatchOrgChannelRequest2 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchOrgChannelRequest2{} - -// PatchOrgChannelRequest2 struct for PatchOrgChannelRequest2 -type PatchOrgChannelRequest2 struct { - // An optional URL to a JSON Schema document describing this resource - Schema *string `json:"$schema,omitempty" format:"uri" doc:"An optional URL to a JSON Schema document describing this resource"` - // Date and time the channel was created. - Created *time.Time `json:"created,omitempty" format:"date-time" doc:"Date and time the channel was created."` - // A human-readable description of the channel. - Description *string `json:"description,omitempty" doc:"A human-readable description of the channel."` - // Desired running state for a channel. - DesiredState *string `json:"desired_state,omitempty" enum:"ON,OFF" doc:"Desired running state for a channel."` - // Indicates whether the channel's transcoder needs to run in a designated IP range. - EnableByoip *bool `json:"enable_byoip,omitempty" doc:"Indicates whether the channel's transcoder needs to run in a designated IP range."` - // External Channel ID provided at channel creation time - Id *string `json:"id,omitempty" minLength:"1" pattern:"/^([a-z0-9]+(-*[a-z0-9]+)*)$/" doc:"External Channel ID provided at channel creation time"` - Ingest *PatchOrgChannelRequest2Ingest `json:"ingest,omitempty"` - // Optional labels for a channel. Any included labels must be at least 1 character long, but no greater than 256 characters. The maximum number of labels is 50. - Labels []string `json:"labels,omitempty" maxItems:"50" doc:"Optional labels for a channel. Any included labels must be at least 1 character long, but no greater than 256 characters. The maximum number of labels is 50."` - // Date and time the channel was last modified. - Modified *time.Time `json:"modified,omitempty" format:"date-time" doc:"Date and time the channel was last modified."` - // A friendly human-readable name for the channel. This will get displayed in user interfaces. - Name *string `json:"name,omitempty" doc:"A friendly human-readable name for the channel. This will get displayed in user interfaces."` - Organization *string `json:"organization,omitempty" minLength:"1"` - Packaging *ChannelPackaging `json:"packaging,omitempty"` - Publishing *ChannelPublishing `json:"publishing,omitempty"` - // Region represents the general geolocation for transcoding and stream egress from iStreamPlanet. If no region is provided at channel creation time, then 'US_WEST' is used. - Region *string `json:"region,omitempty" enum:"US_WEST,US_EAST" doc:"Region represents the general geolocation for transcoding and stream egress from iStreamPlanet. If no region is provided at channel creation time, then 'US_WEST' is used."` - // If the ResourceClass is unspecified the channel will default to run in the 'DYNAMIC' ResourceClass. Note that changing the ResourceClass for a running channel is supported and will be performed with no downtime. - ResourceClass *string `json:"resource_class,omitempty" enum:"DYNAMIC,STATIC" doc:"If the ResourceClass is unspecified the channel will default to run in the 'DYNAMIC' ResourceClass. Note that changing the ResourceClass for a running channel is supported and will be performed with no downtime."` - // Self link for the channel. - Self *string `json:"self,omitempty" format:"uri-reference" doc:"Self link for the channel."` - Signaling *ChannelSignaling `json:"signaling,omitempty"` - Tags *ChannelTags `json:"tags,omitempty"` - Transcode *ChannelTranscode `json:"transcode,omitempty"` -} - -// NewPatchOrgChannelRequest2 instantiates a new PatchOrgChannelRequest2 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 NewPatchOrgChannelRequest2() *PatchOrgChannelRequest2 { - this := PatchOrgChannelRequest2{} - return &this -} - -// NewPatchOrgChannelRequest2WithDefaults instantiates a new PatchOrgChannelRequest2 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 NewPatchOrgChannelRequest2WithDefaults() *PatchOrgChannelRequest2 { - this := PatchOrgChannelRequest2{} - return &this -} - -// GetSchema returns the Schema field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetSchema() string { - if o == nil || IsNil(o.Schema) { - var ret string - return ret - } - return *o.Schema -} - -// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetSchemaOk() (*string, bool) { - if o == nil || IsNil(o.Schema) { - return nil, false - } - return o.Schema, true -} - -// HasSchema returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasSchema() bool { - if o != nil && !IsNil(o.Schema) { - return true - } - - return false -} - -// SetSchema gets a reference to the given string and assigns it to the Schema field. -func (o *PatchOrgChannelRequest2) SetSchema(v string) { - o.Schema = &v -} - -// GetCreated returns the Created field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetCreated() time.Time { - if o == nil || IsNil(o.Created) { - var ret time.Time - return ret - } - return *o.Created -} - -// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetCreatedOk() (*time.Time, bool) { - if o == nil || IsNil(o.Created) { - return nil, false - } - return o.Created, true -} - -// HasCreated returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasCreated() bool { - if o != nil && !IsNil(o.Created) { - return true - } - - return false -} - -// SetCreated gets a reference to the given time.Time and assigns it to the Created field. -func (o *PatchOrgChannelRequest2) SetCreated(v time.Time) { - o.Created = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *PatchOrgChannelRequest2) SetDescription(v string) { - o.Description = &v -} - -// GetDesiredState returns the DesiredState field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetDesiredState() string { - if o == nil || IsNil(o.DesiredState) { - var ret string - return ret - } - return *o.DesiredState -} - -// GetDesiredStateOk returns a tuple with the DesiredState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetDesiredStateOk() (*string, bool) { - if o == nil || IsNil(o.DesiredState) { - return nil, false - } - return o.DesiredState, true -} - -// HasDesiredState returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasDesiredState() bool { - if o != nil && !IsNil(o.DesiredState) { - return true - } - - return false -} - -// SetDesiredState gets a reference to the given string and assigns it to the DesiredState field. -func (o *PatchOrgChannelRequest2) SetDesiredState(v string) { - o.DesiredState = &v -} - -// GetEnableByoip returns the EnableByoip field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetEnableByoip() bool { - if o == nil || IsNil(o.EnableByoip) { - var ret bool - return ret - } - return *o.EnableByoip -} - -// GetEnableByoipOk returns a tuple with the EnableByoip field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetEnableByoipOk() (*bool, bool) { - if o == nil || IsNil(o.EnableByoip) { - return nil, false - } - return o.EnableByoip, true -} - -// HasEnableByoip returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasEnableByoip() bool { - if o != nil && !IsNil(o.EnableByoip) { - return true - } - - return false -} - -// SetEnableByoip gets a reference to the given bool and assigns it to the EnableByoip field. -func (o *PatchOrgChannelRequest2) SetEnableByoip(v bool) { - o.EnableByoip = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) 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 *PatchOrgChannelRequest2) 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 *PatchOrgChannelRequest2) 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 *PatchOrgChannelRequest2) SetId(v string) { - o.Id = &v -} - -// GetIngest returns the Ingest field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetIngest() PatchOrgChannelRequest2Ingest { - if o == nil || IsNil(o.Ingest) { - var ret PatchOrgChannelRequest2Ingest - return ret - } - return *o.Ingest -} - -// GetIngestOk returns a tuple with the Ingest field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetIngestOk() (*PatchOrgChannelRequest2Ingest, bool) { - if o == nil || IsNil(o.Ingest) { - return nil, false - } - return o.Ingest, true -} - -// HasIngest returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasIngest() bool { - if o != nil && !IsNil(o.Ingest) { - return true - } - - return false -} - -// SetIngest gets a reference to the given PatchOrgChannelRequest2Ingest and assigns it to the Ingest field. -func (o *PatchOrgChannelRequest2) SetIngest(v PatchOrgChannelRequest2Ingest) { - o.Ingest = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetLabels() []string { - if o == nil || IsNil(o.Labels) { - var ret []string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *PatchOrgChannelRequest2) SetLabels(v []string) { - o.Labels = v -} - -// GetModified returns the Modified field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetModified() time.Time { - if o == nil || IsNil(o.Modified) { - var ret time.Time - return ret - } - return *o.Modified -} - -// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetModifiedOk() (*time.Time, bool) { - if o == nil || IsNil(o.Modified) { - return nil, false - } - return o.Modified, true -} - -// HasModified returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasModified() bool { - if o != nil && !IsNil(o.Modified) { - return true - } - - return false -} - -// SetModified gets a reference to the given time.Time and assigns it to the Modified field. -func (o *PatchOrgChannelRequest2) SetModified(v time.Time) { - o.Modified = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PatchOrgChannelRequest2) SetName(v string) { - o.Name = &v -} - -// GetOrganization returns the Organization field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetOrganization() string { - if o == nil || IsNil(o.Organization) { - var ret string - return ret - } - return *o.Organization -} - -// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetOrganizationOk() (*string, bool) { - if o == nil || IsNil(o.Organization) { - return nil, false - } - return o.Organization, true -} - -// HasOrganization returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasOrganization() bool { - if o != nil && !IsNil(o.Organization) { - return true - } - - return false -} - -// SetOrganization gets a reference to the given string and assigns it to the Organization field. -func (o *PatchOrgChannelRequest2) SetOrganization(v string) { - o.Organization = &v -} - -// GetPackaging returns the Packaging field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetPackaging() ChannelPackaging { - if o == nil || IsNil(o.Packaging) { - var ret ChannelPackaging - return ret - } - return *o.Packaging -} - -// GetPackagingOk returns a tuple with the Packaging field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetPackagingOk() (*ChannelPackaging, bool) { - if o == nil || IsNil(o.Packaging) { - return nil, false - } - return o.Packaging, true -} - -// HasPackaging returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasPackaging() bool { - if o != nil && !IsNil(o.Packaging) { - return true - } - - return false -} - -// SetPackaging gets a reference to the given ChannelPackaging and assigns it to the Packaging field. -func (o *PatchOrgChannelRequest2) SetPackaging(v ChannelPackaging) { - o.Packaging = &v -} - -// GetPublishing returns the Publishing field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetPublishing() ChannelPublishing { - if o == nil || IsNil(o.Publishing) { - var ret ChannelPublishing - return ret - } - return *o.Publishing -} - -// GetPublishingOk returns a tuple with the Publishing field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetPublishingOk() (*ChannelPublishing, bool) { - if o == nil || IsNil(o.Publishing) { - return nil, false - } - return o.Publishing, true -} - -// HasPublishing returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasPublishing() bool { - if o != nil && !IsNil(o.Publishing) { - return true - } - - return false -} - -// SetPublishing gets a reference to the given ChannelPublishing and assigns it to the Publishing field. -func (o *PatchOrgChannelRequest2) SetPublishing(v ChannelPublishing) { - o.Publishing = &v -} - -// GetRegion returns the Region field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetRegion() string { - if o == nil || IsNil(o.Region) { - var ret string - return ret - } - return *o.Region -} - -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetRegionOk() (*string, bool) { - if o == nil || IsNil(o.Region) { - return nil, false - } - return o.Region, true -} - -// HasRegion returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasRegion() bool { - if o != nil && !IsNil(o.Region) { - return true - } - - return false -} - -// SetRegion gets a reference to the given string and assigns it to the Region field. -func (o *PatchOrgChannelRequest2) SetRegion(v string) { - o.Region = &v -} - -// GetResourceClass returns the ResourceClass field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetResourceClass() string { - if o == nil || IsNil(o.ResourceClass) { - var ret string - return ret - } - return *o.ResourceClass -} - -// GetResourceClassOk returns a tuple with the ResourceClass field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetResourceClassOk() (*string, bool) { - if o == nil || IsNil(o.ResourceClass) { - return nil, false - } - return o.ResourceClass, true -} - -// HasResourceClass returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasResourceClass() bool { - if o != nil && !IsNil(o.ResourceClass) { - return true - } - - return false -} - -// SetResourceClass gets a reference to the given string and assigns it to the ResourceClass field. -func (o *PatchOrgChannelRequest2) SetResourceClass(v string) { - o.ResourceClass = &v -} - -// GetSelf returns the Self field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetSelf() string { - if o == nil || IsNil(o.Self) { - var ret string - return ret - } - return *o.Self -} - -// GetSelfOk returns a tuple with the Self field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetSelfOk() (*string, bool) { - if o == nil || IsNil(o.Self) { - return nil, false - } - return o.Self, true -} - -// HasSelf returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasSelf() bool { - if o != nil && !IsNil(o.Self) { - return true - } - - return false -} - -// SetSelf gets a reference to the given string and assigns it to the Self field. -func (o *PatchOrgChannelRequest2) SetSelf(v string) { - o.Self = &v -} - -// GetSignaling returns the Signaling field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetSignaling() ChannelSignaling { - if o == nil || IsNil(o.Signaling) { - var ret ChannelSignaling - return ret - } - return *o.Signaling -} - -// GetSignalingOk returns a tuple with the Signaling field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetSignalingOk() (*ChannelSignaling, bool) { - if o == nil || IsNil(o.Signaling) { - return nil, false - } - return o.Signaling, true -} - -// HasSignaling returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasSignaling() bool { - if o != nil && !IsNil(o.Signaling) { - return true - } - - return false -} - -// SetSignaling gets a reference to the given ChannelSignaling and assigns it to the Signaling field. -func (o *PatchOrgChannelRequest2) SetSignaling(v ChannelSignaling) { - o.Signaling = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetTags() ChannelTags { - if o == nil || IsNil(o.Tags) { - var ret ChannelTags - return ret - } - return *o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetTagsOk() (*ChannelTags, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given ChannelTags and assigns it to the Tags field. -func (o *PatchOrgChannelRequest2) SetTags(v ChannelTags) { - o.Tags = &v -} - -// GetTranscode returns the Transcode field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2) GetTranscode() ChannelTranscode { - if o == nil || IsNil(o.Transcode) { - var ret ChannelTranscode - return ret - } - return *o.Transcode -} - -// GetTranscodeOk returns a tuple with the Transcode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2) GetTranscodeOk() (*ChannelTranscode, bool) { - if o == nil || IsNil(o.Transcode) { - return nil, false - } - return o.Transcode, true -} - -// HasTranscode returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2) HasTranscode() bool { - if o != nil && !IsNil(o.Transcode) { - return true - } - - return false -} - -// SetTranscode gets a reference to the given ChannelTranscode and assigns it to the Transcode field. -func (o *PatchOrgChannelRequest2) SetTranscode(v ChannelTranscode) { - o.Transcode = &v -} - -func (o PatchOrgChannelRequest2) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchOrgChannelRequest2) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Schema) { - toSerialize["$schema"] = o.Schema - } - if !IsNil(o.Created) { - toSerialize["created"] = o.Created - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DesiredState) { - toSerialize["desired_state"] = o.DesiredState - } - if !IsNil(o.EnableByoip) { - toSerialize["enable_byoip"] = o.EnableByoip - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Ingest) { - toSerialize["ingest"] = o.Ingest - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Modified) { - toSerialize["modified"] = o.Modified - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Organization) { - toSerialize["organization"] = o.Organization - } - if !IsNil(o.Packaging) { - toSerialize["packaging"] = o.Packaging - } - if !IsNil(o.Publishing) { - toSerialize["publishing"] = o.Publishing - } - if !IsNil(o.Region) { - toSerialize["region"] = o.Region - } - if !IsNil(o.ResourceClass) { - toSerialize["resource_class"] = o.ResourceClass - } - if !IsNil(o.Self) { - toSerialize["self"] = o.Self - } - if !IsNil(o.Signaling) { - toSerialize["signaling"] = o.Signaling - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - if !IsNil(o.Transcode) { - toSerialize["transcode"] = o.Transcode - } - return toSerialize, nil -} - -type NullablePatchOrgChannelRequest2 struct { - value *PatchOrgChannelRequest2 - isSet bool -} - -func (v NullablePatchOrgChannelRequest2) Get() *PatchOrgChannelRequest2 { - return v.value -} - -func (v *NullablePatchOrgChannelRequest2) Set(val *PatchOrgChannelRequest2) { - v.value = val - v.isSet = true -} - -func (v NullablePatchOrgChannelRequest2) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchOrgChannelRequest2) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchOrgChannelRequest2(val *PatchOrgChannelRequest2) *NullablePatchOrgChannelRequest2 { - return &NullablePatchOrgChannelRequest2{value: val, isSet: true} -} - -func (v NullablePatchOrgChannelRequest2) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchOrgChannelRequest2) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/isp/model_patch_org_channel_request2_ingest.go b/isp/model_patch_org_channel_request2_ingest.go deleted file mode 100644 index 808c7b1..0000000 --- a/isp/model_patch_org_channel_request2_ingest.go +++ /dev/null @@ -1,161 +0,0 @@ -/* - * WBD Aventus Channels API - * - * API version: 0.0.0 - * Contact: live-control-plane-devs@wbd.com - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package isp - -import ( - "encoding/json" -) - -// checks if the PatchOrgChannelRequest2Ingest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchOrgChannelRequest2Ingest{} - -// PatchOrgChannelRequest2Ingest Ingest configures inputs for the transcoder. -type PatchOrgChannelRequest2Ingest struct { - Slate *ChannelIngestSlate `json:"slate,omitempty"` - Source *ChannelIngestSource `json:"source,omitempty"` -} - -// NewPatchOrgChannelRequest2Ingest instantiates a new PatchOrgChannelRequest2Ingest 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 NewPatchOrgChannelRequest2Ingest() *PatchOrgChannelRequest2Ingest { - this := PatchOrgChannelRequest2Ingest{} - return &this -} - -// NewPatchOrgChannelRequest2IngestWithDefaults instantiates a new PatchOrgChannelRequest2Ingest 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 NewPatchOrgChannelRequest2IngestWithDefaults() *PatchOrgChannelRequest2Ingest { - this := PatchOrgChannelRequest2Ingest{} - return &this -} - -// GetSlate returns the Slate field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2Ingest) GetSlate() ChannelIngestSlate { - if o == nil || IsNil(o.Slate) { - var ret ChannelIngestSlate - return ret - } - return *o.Slate -} - -// GetSlateOk returns a tuple with the Slate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2Ingest) GetSlateOk() (*ChannelIngestSlate, bool) { - if o == nil || IsNil(o.Slate) { - return nil, false - } - return o.Slate, true -} - -// HasSlate returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2Ingest) HasSlate() bool { - if o != nil && !IsNil(o.Slate) { - return true - } - - return false -} - -// SetSlate gets a reference to the given ChannelIngestSlate and assigns it to the Slate field. -func (o *PatchOrgChannelRequest2Ingest) SetSlate(v ChannelIngestSlate) { - o.Slate = &v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *PatchOrgChannelRequest2Ingest) GetSource() ChannelIngestSource { - if o == nil || IsNil(o.Source) { - var ret ChannelIngestSource - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequest2Ingest) GetSourceOk() (*ChannelIngestSource, bool) { - if o == nil || IsNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *PatchOrgChannelRequest2Ingest) HasSource() bool { - if o != nil && !IsNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given ChannelIngestSource and assigns it to the Source field. -func (o *PatchOrgChannelRequest2Ingest) SetSource(v ChannelIngestSource) { - o.Source = &v -} - -func (o PatchOrgChannelRequest2Ingest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchOrgChannelRequest2Ingest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Slate) { - toSerialize["slate"] = o.Slate - } - if !IsNil(o.Source) { - toSerialize["source"] = o.Source - } - return toSerialize, nil -} - -type NullablePatchOrgChannelRequest2Ingest struct { - value *PatchOrgChannelRequest2Ingest - isSet bool -} - -func (v NullablePatchOrgChannelRequest2Ingest) Get() *PatchOrgChannelRequest2Ingest { - return v.value -} - -func (v *NullablePatchOrgChannelRequest2Ingest) Set(val *PatchOrgChannelRequest2Ingest) { - v.value = val - v.isSet = true -} - -func (v NullablePatchOrgChannelRequest2Ingest) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchOrgChannelRequest2Ingest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchOrgChannelRequest2Ingest(val *PatchOrgChannelRequest2Ingest) *NullablePatchOrgChannelRequest2Ingest { - return &NullablePatchOrgChannelRequest2Ingest{value: val, isSet: true} -} - -func (v NullablePatchOrgChannelRequest2Ingest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchOrgChannelRequest2Ingest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/isp/model_patch_org_channel_request_inner.go b/isp/model_patch_org_channel_request_inner.go deleted file mode 100644 index 6d7c0c7..0000000 --- a/isp/model_patch_org_channel_request_inner.go +++ /dev/null @@ -1,220 +0,0 @@ -/* - * WBD Aventus Channels API - * - * API version: 0.0.0 - * Contact: live-control-plane-devs@wbd.com - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package isp - -import ( - "encoding/json" -) - -// checks if the PatchOrgChannelRequestInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchOrgChannelRequestInner{} - -// PatchOrgChannelRequestInner struct for PatchOrgChannelRequestInner -type PatchOrgChannelRequestInner struct { - // JSON Pointer for the source of a move or copy - From *string `json:"from,omitempty" doc:"JSON Pointer for the source of a move or copy"` - // Operation name - Op string `json:"op" enum:"add,remove,replace,move,copy,test" doc:"Operation name"` - // JSON Pointer to the field being operated on, or the destination of a move/copy operation - Path string `json:"path" doc:"JSON Pointer to the field being operated on, or the destination of a move/copy operation"` - // The value to set - Value interface{} `json:"value,omitempty" doc:"The value to set"` -} - -// NewPatchOrgChannelRequestInner instantiates a new PatchOrgChannelRequestInner 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 NewPatchOrgChannelRequestInner(op string, path string) *PatchOrgChannelRequestInner { - this := PatchOrgChannelRequestInner{} - this.Op = op - this.Path = path - return &this -} - -// NewPatchOrgChannelRequestInnerWithDefaults instantiates a new PatchOrgChannelRequestInner 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 NewPatchOrgChannelRequestInnerWithDefaults() *PatchOrgChannelRequestInner { - this := PatchOrgChannelRequestInner{} - return &this -} - -// GetFrom returns the From field value if set, zero value otherwise. -func (o *PatchOrgChannelRequestInner) GetFrom() string { - if o == nil || IsNil(o.From) { - var ret string - return ret - } - return *o.From -} - -// GetFromOk returns a tuple with the From field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequestInner) GetFromOk() (*string, bool) { - if o == nil || IsNil(o.From) { - return nil, false - } - return o.From, true -} - -// HasFrom returns a boolean if a field has been set. -func (o *PatchOrgChannelRequestInner) HasFrom() bool { - if o != nil && !IsNil(o.From) { - return true - } - - return false -} - -// SetFrom gets a reference to the given string and assigns it to the From field. -func (o *PatchOrgChannelRequestInner) SetFrom(v string) { - o.From = &v -} - -// GetOp returns the Op field value -func (o *PatchOrgChannelRequestInner) GetOp() string { - if o == nil { - var ret string - return ret - } - - return o.Op -} - -// GetOpOk returns a tuple with the Op field value -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequestInner) GetOpOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Op, true -} - -// SetOp sets field value -func (o *PatchOrgChannelRequestInner) SetOp(v string) { - o.Op = v -} - -// GetPath returns the Path field value -func (o *PatchOrgChannelRequestInner) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *PatchOrgChannelRequestInner) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *PatchOrgChannelRequestInner) SetPath(v string) { - o.Path = v -} - -// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PatchOrgChannelRequestInner) GetValue() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PatchOrgChannelRequestInner) GetValueOk() (*interface{}, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return &o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *PatchOrgChannelRequestInner) HasValue() bool { - if o != nil && IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given interface{} and assigns it to the Value field. -func (o *PatchOrgChannelRequestInner) SetValue(v interface{}) { - o.Value = v -} - -func (o PatchOrgChannelRequestInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PatchOrgChannelRequestInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.From) { - toSerialize["from"] = o.From - } - toSerialize["op"] = o.Op - toSerialize["path"] = o.Path - if o.Value != nil { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullablePatchOrgChannelRequestInner struct { - value *PatchOrgChannelRequestInner - isSet bool -} - -func (v NullablePatchOrgChannelRequestInner) Get() *PatchOrgChannelRequestInner { - return v.value -} - -func (v *NullablePatchOrgChannelRequestInner) Set(val *PatchOrgChannelRequestInner) { - v.value = val - v.isSet = true -} - -func (v NullablePatchOrgChannelRequestInner) IsSet() bool { - return v.isSet -} - -func (v *NullablePatchOrgChannelRequestInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePatchOrgChannelRequestInner(val *PatchOrgChannelRequestInner) *NullablePatchOrgChannelRequestInner { - return &NullablePatchOrgChannelRequestInner{value: val, isSet: true} -} - -func (v NullablePatchOrgChannelRequestInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePatchOrgChannelRequestInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -