diff --git a/.gitignore b/.gitignore index 3142232..daf913b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,3 @@ _testmain.go *.exe *.test *.prof - -vendor diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..a2768ee --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,28 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + + +git_push.sh +.travis.yml +.github-ci.yml diff --git a/README.md b/README.md index 65e82df..d0906ca 100644 --- a/README.md +++ b/README.md @@ -1,122 +1,278 @@ -![Mux Go Banner](https://banner.mux.dev/?image=go) +# Go API client for muxgo -![](https://github.com/muxinc/mux-go/workflows/Integration%20Test/badge.svg) -[![GoDoc](https://godoc.org/github.com/muxinc/mux-go?status.svg)](https://godoc.org/github.com/muxinc/mux-go) +Mux is how developers build online video. This API encompasses both +Mux Video and Mux Data functionality to help you build your video-related +projects better and faster than ever before. -# Mux Go -Official Mux API wrapper for golang projects, supporting both Mux Data and Mux Video. +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -[Mux Video](https://mux.com/video) is an API-first platform, powered by data and designed by video experts to make beautiful video possible for every development team. - -[Mux Data](https://mux.com/data) is a platform for monitoring your video streaming performance with just a few lines of code. Get in-depth quality of service analytics on web, mobile, and OTT devices. - -Not familiar with Mux? Check out https://mux.com/ for more information. +- API version: v1 +- Package version: 1.0.0-rc.1 +- Build package: org.openapitools.codegen.languages.GoClientCodegen ## Installation -``` -go get github.com/muxinc/mux-go -``` - -## Getting Started - -### Overview - -Mux Go is a code generated lightweight wrapper around the Mux REST API and reflects them accurately. This has a few consequences you should watch out for: - -1) For almost all API responses, the object you're looking for will be in the `data` field on the API response object, as in the example below. This is because we designed our APIs with similar concepts to the [JSON:API](https://jsonapi.org/) standard. This means we'll be able to return more metadata from our API calls (such as related entities) without the need to make breaking changes to our APIs. We've decided not to hide that in this library. - -2) We don't use a lot of object orientation. For example API calls that happen on a single asset don't exist in the asset class, but are API calls in the AssetsApi which require an asset ID. - -### Authentication - -To use the Mux API, you'll need an access token and a secret. [Details on obtaining these can be found here in the Mux documentation.](https://docs.mux.com/docs#section-1-get-an-api-access-token) - -Its up to you to manage your token and secret. In our examples, we read them from `MUX_TOKEN_ID` and `MUX_TOKEN_SECRET` in your environment. - -### Example Usage +Install the following dependencies: -Below is a quick example of using mux-go to list the Video assets stored in your Mux account. - -Be sure to also checkout the [exmples directory](examples/). - -```go -package main - -import ( - "fmt" - "os" - - "github.com/muxinc/mux-go" -) +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +``` -func main() { - // API Client Init - client := muxgo.NewAPIClient( - muxgo.NewConfiguration( - muxgo.WithBasicAuth(os.Getenv("MUX_TOKEN_ID"), os.Getenv("MUX_TOKEN_SECRET")), - )) +Put the package under your project folder and add the following in import: - // List Assets - fmt.Println("Listing Assets...\n") - r, err := client.AssetsApi.ListAssets() - if err != nil { - fmt.Printf("err: %s \n\n", err) - os.Exit(255) - } - for _, asset := range r.Data { - fmt.Printf("Asset ID: %s\n", asset.Id) - fmt.Printf("Status: %s\n", asset.Status) - fmt.Printf("Duration: %f\n\n", asset.Duration) - } -} +```golang +import sw "./muxgo" ``` -## Errors & Error Handling - -All API calls return an err as their final return value. Below is documented the errors you might want to check for. You can check `error.Body` on all errors to see the full HTTP response. +To use a proxy, set the environment variable `HTTP_PROXY`: -### BadRequestError +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` -`BadRequestError` is returned when a you make a bad request to Mux, this likely means you've passed in an invalid parameter to the API call. +## Configuration of Server URL -### UnauthorizedError +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. -`UnauthorizedError` is returned when Mux cannot authenticate your request. [You should check you have configured your credentials correctly.](#authentication) +### Select Server Configuration -### ForbiddenError +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. -`ForbiddenError` is returned you don't have permission to access that resource. [You should check you have configured your credentials correctly.](#authentication) +```golang +ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +``` -### NotFoundError +### Templated Server URL -`NotFoundError` is returned when a resource is not found. This is useful when trying to get an entity by its ID. +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. -### TooManyRequestsError +```golang +ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` -`TooManyRequestsError` is returned when you exceed the maximum number of requests allowed for a given time period. Please get in touch with [support@mux.com](mailto:support@mux.com) if you need to talk about this limit. +Note, enum values are always validated and all unused variables are silently ignored. -### ServiceError +### URLs Configuration per Operation -`ServiceError` is returned when Mux returns a HTTP 5XX Status Code. If you encounter this reproducibly, please get in touch with [support@mux.com](mailto:support@mux.com). +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identifield by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. -### GenericOpenAPIError +``` +ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` -`GenericOpenAPIError` is a fallback Error which may be returned in some edge cases. This will be deprecated in a later release but remains present for API compatibility. +## Documentation for API Endpoints + +All URIs are relative to *https://api.mux.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AssetsApi* | [**CreateAsset**](docs/AssetsApi.md#createasset) | **Post** /video/v1/assets | Create an asset +*AssetsApi* | [**CreateAssetPlaybackId**](docs/AssetsApi.md#createassetplaybackid) | **Post** /video/v1/assets/{ASSET_ID}/playback-ids | Create a playback ID +*AssetsApi* | [**CreateAssetTrack**](docs/AssetsApi.md#createassettrack) | **Post** /video/v1/assets/{ASSET_ID}/tracks | Create an asset track +*AssetsApi* | [**DeleteAsset**](docs/AssetsApi.md#deleteasset) | **Delete** /video/v1/assets/{ASSET_ID} | Delete an asset +*AssetsApi* | [**DeleteAssetPlaybackId**](docs/AssetsApi.md#deleteassetplaybackid) | **Delete** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Delete a playback ID +*AssetsApi* | [**DeleteAssetTrack**](docs/AssetsApi.md#deleteassettrack) | **Delete** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID} | Delete an asset track +*AssetsApi* | [**GetAsset**](docs/AssetsApi.md#getasset) | **Get** /video/v1/assets/{ASSET_ID} | Retrieve an asset +*AssetsApi* | [**GetAssetInputInfo**](docs/AssetsApi.md#getassetinputinfo) | **Get** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info +*AssetsApi* | [**GetAssetPlaybackId**](docs/AssetsApi.md#getassetplaybackid) | **Get** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID +*AssetsApi* | [**ListAssets**](docs/AssetsApi.md#listassets) | **Get** /video/v1/assets | List assets +*AssetsApi* | [**UpdateAssetMasterAccess**](docs/AssetsApi.md#updateassetmasteraccess) | **Put** /video/v1/assets/{ASSET_ID}/master-access | Update master access +*AssetsApi* | [**UpdateAssetMp4Support**](docs/AssetsApi.md#updateassetmp4support) | **Put** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support +*DeliveryUsageApi* | [**ListDeliveryUsage**](docs/DeliveryUsageApi.md#listdeliveryusage) | **Get** /video/v1/delivery-usage | List Usage +*DimensionsApi* | [**ListDimensionValues**](docs/DimensionsApi.md#listdimensionvalues) | **Get** /data/v1/dimensions/{DIMENSION_ID} | Lists the values for a specific dimension +*DimensionsApi* | [**ListDimensions**](docs/DimensionsApi.md#listdimensions) | **Get** /data/v1/dimensions | List Dimensions +*DirectUploadsApi* | [**CancelDirectUpload**](docs/DirectUploadsApi.md#canceldirectupload) | **Put** /video/v1/uploads/{UPLOAD_ID}/cancel | Cancel a direct upload +*DirectUploadsApi* | [**CreateDirectUpload**](docs/DirectUploadsApi.md#createdirectupload) | **Post** /video/v1/uploads | Create a new direct upload URL +*DirectUploadsApi* | [**GetDirectUpload**](docs/DirectUploadsApi.md#getdirectupload) | **Get** /video/v1/uploads/{UPLOAD_ID} | Retrieve a single direct upload's info +*DirectUploadsApi* | [**ListDirectUploads**](docs/DirectUploadsApi.md#listdirectuploads) | **Get** /video/v1/uploads | List direct uploads +*ErrorsApi* | [**ListErrors**](docs/ErrorsApi.md#listerrors) | **Get** /data/v1/errors | List Errors +*ExportsApi* | [**ListExports**](docs/ExportsApi.md#listexports) | **Get** /data/v1/exports | List property video view export links +*FiltersApi* | [**ListFilterValues**](docs/FiltersApi.md#listfiltervalues) | **Get** /data/v1/filters/{FILTER_ID} | Lists values for a specific filter +*FiltersApi* | [**ListFilters**](docs/FiltersApi.md#listfilters) | **Get** /data/v1/filters | List Filters +*IncidentsApi* | [**GetIncident**](docs/IncidentsApi.md#getincident) | **Get** /data/v1/incidents/{INCIDENT_ID} | Get an Incident +*IncidentsApi* | [**ListIncidents**](docs/IncidentsApi.md#listincidents) | **Get** /data/v1/incidents | List Incidents +*IncidentsApi* | [**ListRelatedIncidents**](docs/IncidentsApi.md#listrelatedincidents) | **Get** /data/v1/incidents/{INCIDENT_ID}/related | List Related Incidents +*LiveStreamsApi* | [**CreateLiveStream**](docs/LiveStreamsApi.md#createlivestream) | **Post** /video/v1/live-streams | Create a live stream +*LiveStreamsApi* | [**CreateLiveStreamPlaybackId**](docs/LiveStreamsApi.md#createlivestreamplaybackid) | **Post** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids | Create a live stream playback ID +*LiveStreamsApi* | [**CreateLiveStreamSimulcastTarget**](docs/LiveStreamsApi.md#createlivestreamsimulcasttarget) | **Post** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target +*LiveStreamsApi* | [**DeleteLiveStream**](docs/LiveStreamsApi.md#deletelivestream) | **Delete** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream +*LiveStreamsApi* | [**DeleteLiveStreamPlaybackId**](docs/LiveStreamsApi.md#deletelivestreamplaybackid) | **Delete** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID +*LiveStreamsApi* | [**DeleteLiveStreamSimulcastTarget**](docs/LiveStreamsApi.md#deletelivestreamsimulcasttarget) | **Delete** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target +*LiveStreamsApi* | [**DisableLiveStream**](docs/LiveStreamsApi.md#disablelivestream) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream +*LiveStreamsApi* | [**EnableLiveStream**](docs/LiveStreamsApi.md#enablelivestream) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream +*LiveStreamsApi* | [**GetLiveStream**](docs/LiveStreamsApi.md#getlivestream) | **Get** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream +*LiveStreamsApi* | [**GetLiveStreamSimulcastTarget**](docs/LiveStreamsApi.md#getlivestreamsimulcasttarget) | **Get** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target +*LiveStreamsApi* | [**ListLiveStreams**](docs/LiveStreamsApi.md#listlivestreams) | **Get** /video/v1/live-streams | List live streams +*LiveStreamsApi* | [**ResetStreamKey**](docs/LiveStreamsApi.md#resetstreamkey) | **Post** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream’s stream key +*LiveStreamsApi* | [**SignalLiveStreamComplete**](docs/LiveStreamsApi.md#signallivestreamcomplete) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished +*MetricsApi* | [**GetMetricTimeseriesData**](docs/MetricsApi.md#getmetrictimeseriesdata) | **Get** /data/v1/metrics/{METRIC_ID}/timeseries | Get metric timeseries data +*MetricsApi* | [**GetOverallValues**](docs/MetricsApi.md#getoverallvalues) | **Get** /data/v1/metrics/{METRIC_ID}/overall | Get Overall values +*MetricsApi* | [**ListAllMetricValues**](docs/MetricsApi.md#listallmetricvalues) | **Get** /data/v1/metrics/comparison | List all metric values +*MetricsApi* | [**ListBreakdownValues**](docs/MetricsApi.md#listbreakdownvalues) | **Get** /data/v1/metrics/{METRIC_ID}/breakdown | List breakdown values +*MetricsApi* | [**ListInsights**](docs/MetricsApi.md#listinsights) | **Get** /data/v1/metrics/{METRIC_ID}/insights | List Insights +*PlaybackIDApi* | [**GetAssetOrLivestreamId**](docs/PlaybackIDApi.md#getassetorlivestreamid) | **Get** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an Asset or Live Stream ID +*RealTimeApi* | [**GetRealtimeBreakdown**](docs/RealTimeApi.md#getrealtimebreakdown) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown | Get Real-Time Breakdown +*RealTimeApi* | [**GetRealtimeHistogramTimeseries**](docs/RealTimeApi.md#getrealtimehistogramtimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_HISTOGRAM_METRIC_ID}/histogram-timeseries | Get Real-Time Histogram Timeseries +*RealTimeApi* | [**GetRealtimeTimeseries**](docs/RealTimeApi.md#getrealtimetimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries | Get Real-Time Timeseries +*RealTimeApi* | [**ListRealtimeDimensions**](docs/RealTimeApi.md#listrealtimedimensions) | **Get** /data/v1/realtime/dimensions | List Real-Time Dimensions +*RealTimeApi* | [**ListRealtimeMetrics**](docs/RealTimeApi.md#listrealtimemetrics) | **Get** /data/v1/realtime/metrics | List Real-Time Metrics +*URLSigningKeysApi* | [**CreateUrlSigningKey**](docs/URLSigningKeysApi.md#createurlsigningkey) | **Post** /video/v1/signing-keys | Create a URL signing key +*URLSigningKeysApi* | [**DeleteUrlSigningKey**](docs/URLSigningKeysApi.md#deleteurlsigningkey) | **Delete** /video/v1/signing-keys/{SIGNING_KEY_ID} | Delete a URL signing key +*URLSigningKeysApi* | [**GetUrlSigningKey**](docs/URLSigningKeysApi.md#geturlsigningkey) | **Get** /video/v1/signing-keys/{SIGNING_KEY_ID} | Retrieve a URL signing key +*URLSigningKeysApi* | [**ListUrlSigningKeys**](docs/URLSigningKeysApi.md#listurlsigningkeys) | **Get** /video/v1/signing-keys | List URL signing keys +*VideoViewsApi* | [**GetVideoView**](docs/VideoViewsApi.md#getvideoview) | **Get** /data/v1/video-views/{VIDEO_VIEW_ID} | Get a Video View +*VideoViewsApi* | [**ListVideoViews**](docs/VideoViewsApi.md#listvideoviews) | **Get** /data/v1/video-views | List Video Views + + +## Documentation For Models + + - [AbridgedVideoView](docs/AbridgedVideoView.md) + - [Asset](docs/Asset.md) + - [AssetErrors](docs/AssetErrors.md) + - [AssetMaster](docs/AssetMaster.md) + - [AssetNonStandardInputReasons](docs/AssetNonStandardInputReasons.md) + - [AssetRecordingTimes](docs/AssetRecordingTimes.md) + - [AssetResponse](docs/AssetResponse.md) + - [AssetStaticRenditions](docs/AssetStaticRenditions.md) + - [AssetStaticRenditionsFiles](docs/AssetStaticRenditionsFiles.md) + - [BreakdownValue](docs/BreakdownValue.md) + - [CreateAssetRequest](docs/CreateAssetRequest.md) + - [CreateLiveStreamRequest](docs/CreateLiveStreamRequest.md) + - [CreatePlaybackIDRequest](docs/CreatePlaybackIDRequest.md) + - [CreatePlaybackIDResponse](docs/CreatePlaybackIDResponse.md) + - [CreateSimulcastTargetRequest](docs/CreateSimulcastTargetRequest.md) + - [CreateTrackRequest](docs/CreateTrackRequest.md) + - [CreateTrackResponse](docs/CreateTrackResponse.md) + - [CreateUploadRequest](docs/CreateUploadRequest.md) + - [DeliveryReport](docs/DeliveryReport.md) + - [DimensionValue](docs/DimensionValue.md) + - [DisableLiveStreamResponse](docs/DisableLiveStreamResponse.md) + - [EnableLiveStreamResponse](docs/EnableLiveStreamResponse.md) + - [Error](docs/Error.md) + - [FilterValue](docs/FilterValue.md) + - [GetAssetInputInfoResponse](docs/GetAssetInputInfoResponse.md) + - [GetAssetOrLiveStreamIdResponse](docs/GetAssetOrLiveStreamIdResponse.md) + - [GetAssetOrLiveStreamIdResponseData](docs/GetAssetOrLiveStreamIdResponseData.md) + - [GetAssetOrLiveStreamIdResponseDataObject](docs/GetAssetOrLiveStreamIdResponseDataObject.md) + - [GetAssetPlaybackIDResponse](docs/GetAssetPlaybackIDResponse.md) + - [GetMetricTimeseriesDataResponse](docs/GetMetricTimeseriesDataResponse.md) + - [GetOverallValuesResponse](docs/GetOverallValuesResponse.md) + - [GetRealTimeBreakdownResponse](docs/GetRealTimeBreakdownResponse.md) + - [GetRealTimeHistogramTimeseriesResponse](docs/GetRealTimeHistogramTimeseriesResponse.md) + - [GetRealTimeHistogramTimeseriesResponseMeta](docs/GetRealTimeHistogramTimeseriesResponseMeta.md) + - [GetRealTimeTimeseriesResponse](docs/GetRealTimeTimeseriesResponse.md) + - [Incident](docs/Incident.md) + - [IncidentBreakdown](docs/IncidentBreakdown.md) + - [IncidentNotification](docs/IncidentNotification.md) + - [IncidentNotificationRule](docs/IncidentNotificationRule.md) + - [IncidentResponse](docs/IncidentResponse.md) + - [InputFile](docs/InputFile.md) + - [InputInfo](docs/InputInfo.md) + - [InputSettings](docs/InputSettings.md) + - [InputSettingsOverlaySettings](docs/InputSettingsOverlaySettings.md) + - [InputTrack](docs/InputTrack.md) + - [Insight](docs/Insight.md) + - [ListAllMetricValuesResponse](docs/ListAllMetricValuesResponse.md) + - [ListAssetsResponse](docs/ListAssetsResponse.md) + - [ListBreakdownValuesResponse](docs/ListBreakdownValuesResponse.md) + - [ListDeliveryUsageResponse](docs/ListDeliveryUsageResponse.md) + - [ListDimensionValuesResponse](docs/ListDimensionValuesResponse.md) + - [ListDimensionsResponse](docs/ListDimensionsResponse.md) + - [ListErrorsResponse](docs/ListErrorsResponse.md) + - [ListExportsResponse](docs/ListExportsResponse.md) + - [ListFilterValuesResponse](docs/ListFilterValuesResponse.md) + - [ListFiltersResponse](docs/ListFiltersResponse.md) + - [ListFiltersResponseData](docs/ListFiltersResponseData.md) + - [ListIncidentsResponse](docs/ListIncidentsResponse.md) + - [ListInsightsResponse](docs/ListInsightsResponse.md) + - [ListLiveStreamsResponse](docs/ListLiveStreamsResponse.md) + - [ListRealTimeDimensionsResponse](docs/ListRealTimeDimensionsResponse.md) + - [ListRealTimeDimensionsResponseData](docs/ListRealTimeDimensionsResponseData.md) + - [ListRealTimeMetricsResponse](docs/ListRealTimeMetricsResponse.md) + - [ListRelatedIncidentsResponse](docs/ListRelatedIncidentsResponse.md) + - [ListSigningKeysResponse](docs/ListSigningKeysResponse.md) + - [ListUploadsResponse](docs/ListUploadsResponse.md) + - [ListVideoViewsResponse](docs/ListVideoViewsResponse.md) + - [LiveStream](docs/LiveStream.md) + - [LiveStreamResponse](docs/LiveStreamResponse.md) + - [Metric](docs/Metric.md) + - [NotificationRule](docs/NotificationRule.md) + - [OverallValues](docs/OverallValues.md) + - [PlaybackID](docs/PlaybackID.md) + - [PlaybackPolicy](docs/PlaybackPolicy.md) + - [RealTimeBreakdownValue](docs/RealTimeBreakdownValue.md) + - [RealTimeHistogramTimeseriesBucket](docs/RealTimeHistogramTimeseriesBucket.md) + - [RealTimeHistogramTimeseriesBucketValues](docs/RealTimeHistogramTimeseriesBucketValues.md) + - [RealTimeHistogramTimeseriesDatapoint](docs/RealTimeHistogramTimeseriesDatapoint.md) + - [RealTimeTimeseriesDatapoint](docs/RealTimeTimeseriesDatapoint.md) + - [Score](docs/Score.md) + - [SignalLiveStreamCompleteResponse](docs/SignalLiveStreamCompleteResponse.md) + - [SigningKey](docs/SigningKey.md) + - [SigningKeyResponse](docs/SigningKeyResponse.md) + - [SimulcastTarget](docs/SimulcastTarget.md) + - [SimulcastTargetResponse](docs/SimulcastTargetResponse.md) + - [Track](docs/Track.md) + - [UpdateAssetMP4SupportRequest](docs/UpdateAssetMP4SupportRequest.md) + - [UpdateAssetMasterAccessRequest](docs/UpdateAssetMasterAccessRequest.md) + - [Upload](docs/Upload.md) + - [UploadError](docs/UploadError.md) + - [UploadResponse](docs/UploadResponse.md) + - [VideoView](docs/VideoView.md) + - [VideoViewEvent](docs/VideoViewEvent.md) + - [VideoViewResponse](docs/VideoViewResponse.md) + + +## Documentation For Authorization + + + +### accessToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` -## Documentation -[Be sure to check out the documentation in the `docs` directory.](docs/) +## Documentation for Utility Methods -## Issues +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: -If you run into problems, [please raise a GitHub issue,](https://github.com/muxinc/mux-go/issues) filling in the issue template. We'll take a look as soon as possible. +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` -## Contributing +## Author -Please do not submit PRs against this package. It is generated from our OpenAPI definitions - [Please open an issue instead!](https://github.com/muxinc/mux-go/issues) -## License -[MIT License.](LICENSE) Copyright 2019 Mux, Inc. diff --git a/api_assets.go b/api_assets.go index b3d311b..58ae6b0 100644 --- a/api_assets.go +++ b/api_assets.go @@ -1,21 +1,68 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" ) +// Linger please +var ( + _ _context.Context +) + +// AssetsApiService AssetsApi service type AssetsApiService service -func (a *AssetsApiService) CreateAsset(createAssetRequest CreateAssetRequest, opts ...APIOption) (AssetResponse, error) { +type ApiCreateAssetRequest struct { + ctx _context.Context + ApiService *AssetsApiService + createAssetRequest *CreateAssetRequest +} + +func (r ApiCreateAssetRequest) CreateAssetRequest(createAssetRequest CreateAssetRequest) ApiCreateAssetRequest { + r.createAssetRequest = &createAssetRequest + return r +} + +func (r ApiCreateAssetRequest) Execute() (AssetResponse, *_nethttp.Response, error) { + return r.ApiService.CreateAssetExecute(r) +} + +/* + * CreateAsset Create an asset + * Create a new Mux Video asset. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateAssetRequest + */ +func (a *AssetsApiService) CreateAsset(ctx _context.Context) ApiCreateAssetRequest { + return ApiCreateAssetRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return AssetResponse + */ +func (a *AssetsApiService) CreateAssetExecute(r ApiCreateAssetRequest) (AssetResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,152 +70,228 @@ func (a *AssetsApiService) CreateAsset(createAssetRequest CreateAssetRequest, op localVarReturnValue AssetResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.CreateAsset") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets" + localVarPath := localBasePath + "/video/v1/assets" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createAssetRequest == nil { + return localVarReturnValue, nil, reportError("createAssetRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createAssetRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createAssetRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAssetPlaybackIdRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + createPlaybackIDRequest *CreatePlaybackIDRequest +} + +func (r ApiCreateAssetPlaybackIdRequest) CreatePlaybackIDRequest(createPlaybackIDRequest CreatePlaybackIDRequest) ApiCreateAssetPlaybackIdRequest { + r.createPlaybackIDRequest = &createPlaybackIDRequest + return r } -func (a *AssetsApiService) CreateAssetPlaybackId(aSSETID string, createPlaybackIdRequest CreatePlaybackIdRequest, opts ...APIOption) (CreatePlaybackIdResponse, error) { +func (r ApiCreateAssetPlaybackIdRequest) Execute() (CreatePlaybackIDResponse, *_nethttp.Response, error) { + return r.ApiService.CreateAssetPlaybackIdExecute(r) +} + +/* + * CreateAssetPlaybackId Create a playback ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiCreateAssetPlaybackIdRequest + */ +func (a *AssetsApiService) CreateAssetPlaybackId(ctx _context.Context, aSSETID string) ApiCreateAssetPlaybackIdRequest { + return ApiCreateAssetPlaybackIdRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } +} + +/* + * Execute executes the request + * @return CreatePlaybackIDResponse + */ +func (a *AssetsApiService) CreateAssetPlaybackIdExecute(r ApiCreateAssetPlaybackIdRequest) (CreatePlaybackIDResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue CreatePlaybackIdResponse + localVarReturnValue CreatePlaybackIDResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.CreateAssetPlaybackId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/playback-ids" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/playback-ids" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createPlaybackIDRequest == nil { + return localVarReturnValue, nil, reportError("createPlaybackIDRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createPlaybackIdRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createPlaybackIDRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -func (a *AssetsApiService) CreateAssetTrack(aSSETID string, createTrackRequest CreateTrackRequest, opts ...APIOption) (CreateTrackResponse, error) { +type ApiCreateAssetTrackRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + createTrackRequest *CreateTrackRequest +} + +func (r ApiCreateAssetTrackRequest) CreateTrackRequest(createTrackRequest CreateTrackRequest) ApiCreateAssetTrackRequest { + r.createTrackRequest = &createTrackRequest + return r +} + +func (r ApiCreateAssetTrackRequest) Execute() (CreateTrackResponse, *_nethttp.Response, error) { + return r.ApiService.CreateAssetTrackExecute(r) +} + +/* + * CreateAssetTrack Create an asset track + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiCreateAssetTrackRequest + */ +func (a *AssetsApiService) CreateAssetTrack(ctx _context.Context, aSSETID string) ApiCreateAssetTrackRequest { + return ApiCreateAssetTrackRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } +} + +/* + * Execute executes the request + * @return CreateTrackResponse + */ +func (a *AssetsApiService) CreateAssetTrackExecute(r ApiCreateAssetTrackRequest) (CreateTrackResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -176,273 +299,402 @@ func (a *AssetsApiService) CreateAssetTrack(aSSETID string, createTrackRequest C localVarReturnValue CreateTrackResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.CreateAssetTrack") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/tracks" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/tracks" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createTrackRequest == nil { + return localVarReturnValue, nil, reportError("createTrackRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createTrackRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createTrackRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAssetRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string +} + + +func (r ApiDeleteAssetRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAssetExecute(r) } -func (a *AssetsApiService) DeleteAsset(aSSETID string, opts ...APIOption) error { +/* + * DeleteAsset Delete an asset + * Deletes a video asset and all its data + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiDeleteAssetRequest + */ +func (a *AssetsApiService) DeleteAsset(ctx _context.Context, aSSETID string) ApiDeleteAssetRequest { + return ApiDeleteAssetRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } +} + +/* + * Execute executes the request + */ +func (a *AssetsApiService) DeleteAssetExecute(r ApiDeleteAssetRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.DeleteAsset") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil +} + +type ApiDeleteAssetPlaybackIdRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + pLAYBACKID string +} + + +func (r ApiDeleteAssetPlaybackIdRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAssetPlaybackIdExecute(r) +} + +/* + * DeleteAssetPlaybackId Delete a playback ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @param pLAYBACKID The live stream's playback ID. + * @return ApiDeleteAssetPlaybackIdRequest + */ +func (a *AssetsApiService) DeleteAssetPlaybackId(ctx _context.Context, aSSETID string, pLAYBACKID string) ApiDeleteAssetPlaybackIdRequest { + return ApiDeleteAssetPlaybackIdRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + pLAYBACKID: pLAYBACKID, + } } -func (a *AssetsApiService) DeleteAssetPlaybackId(aSSETID string, pLAYBACKID string, opts ...APIOption) error { +/* + * Execute executes the request + */ +func (a *AssetsApiService) DeleteAssetPlaybackIdExecute(r ApiDeleteAssetPlaybackIdRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.DeleteAssetPlaybackId") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) - localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", fmt.Sprintf("%v", pLAYBACKID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", _neturl.PathEscape(parameterToString(r.pLAYBACKID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil } -func (a *AssetsApiService) DeleteAssetTrack(aSSETID string, tRACKID string, opts ...APIOption) error { +type ApiDeleteAssetTrackRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + tRACKID string +} + + +func (r ApiDeleteAssetTrackRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteAssetTrackExecute(r) +} + +/* + * DeleteAssetTrack Delete an asset track + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @param tRACKID The track ID. + * @return ApiDeleteAssetTrackRequest + */ +func (a *AssetsApiService) DeleteAssetTrack(ctx _context.Context, aSSETID string, tRACKID string) ApiDeleteAssetTrackRequest { + return ApiDeleteAssetTrackRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + tRACKID: tRACKID, + } +} + +/* + * Execute executes the request + */ +func (a *AssetsApiService) DeleteAssetTrackExecute(r ApiDeleteAssetTrackRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.DeleteAssetTrack") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) - localVarPath = strings.Replace(localVarPath, "{"+"TRACK_ID"+"}", fmt.Sprintf("%v", tRACKID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"TRACK_ID"+"}", _neturl.PathEscape(parameterToString(r.tRACKID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil +} + +type ApiGetAssetRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string +} + + +func (r ApiGetAssetRequest) Execute() (AssetResponse, *_nethttp.Response, error) { + return r.ApiService.GetAssetExecute(r) +} + +/* + * GetAsset Retrieve an asset + * Retrieves the details of an asset that has previously been created. Supply the unique asset ID that was returned from your previous request, and Mux will return the corresponding asset information. The same information is returned when creating an asset. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiGetAssetRequest + */ +func (a *AssetsApiService) GetAsset(ctx _context.Context, aSSETID string) ApiGetAssetRequest { + return ApiGetAssetRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } } -func (a *AssetsApiService) GetAsset(aSSETID string, opts ...APIOption) (AssetResponse, error) { +/* + * Execute executes the request + * @return AssetResponse + */ +func (a *AssetsApiService) GetAssetExecute(r ApiGetAssetRequest) (AssetResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -450,74 +702,105 @@ func (a *AssetsApiService) GetAsset(aSSETID string, opts ...APIOption) (AssetRes localVarReturnValue AssetResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.GetAsset") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAssetInputInfoRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string +} + + +func (r ApiGetAssetInputInfoRequest) Execute() (GetAssetInputInfoResponse, *_nethttp.Response, error) { + return r.ApiService.GetAssetInputInfoExecute(r) +} + +/* + * GetAssetInputInfo Retrieve asset input info + * Returns a list of the input objects that were used to create the asset along with any settings that were applied to each input. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiGetAssetInputInfoRequest + */ +func (a *AssetsApiService) GetAssetInputInfo(ctx _context.Context, aSSETID string) ApiGetAssetInputInfoRequest { + return ApiGetAssetInputInfoRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } } -func (a *AssetsApiService) GetAssetInputInfo(aSSETID string, opts ...APIOption) (GetAssetInputInfoResponse, error) { +/* + * Execute executes the request + * @return GetAssetInputInfoResponse + */ +func (a *AssetsApiService) GetAssetInputInfoExecute(r ApiGetAssetInputInfoRequest) (GetAssetInputInfoResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -525,156 +808,222 @@ func (a *AssetsApiService) GetAssetInputInfo(aSSETID string, opts ...APIOption) localVarReturnValue GetAssetInputInfoResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.GetAssetInputInfo") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/input-info" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/input-info" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -func (a *AssetsApiService) GetAssetPlaybackId(aSSETID string, pLAYBACKID string, opts ...APIOption) (GetAssetPlaybackIdResponse, error) { +type ApiGetAssetPlaybackIdRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + pLAYBACKID string +} + + +func (r ApiGetAssetPlaybackIdRequest) Execute() (GetAssetPlaybackIDResponse, *_nethttp.Response, error) { + return r.ApiService.GetAssetPlaybackIdExecute(r) +} + +/* + * GetAssetPlaybackId Retrieve a playback ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @param pLAYBACKID The live stream's playback ID. + * @return ApiGetAssetPlaybackIdRequest + */ +func (a *AssetsApiService) GetAssetPlaybackId(ctx _context.Context, aSSETID string, pLAYBACKID string) ApiGetAssetPlaybackIdRequest { + return ApiGetAssetPlaybackIdRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + pLAYBACKID: pLAYBACKID, + } +} + +/* + * Execute executes the request + * @return GetAssetPlaybackIDResponse + */ +func (a *AssetsApiService) GetAssetPlaybackIdExecute(r ApiGetAssetPlaybackIdRequest) (GetAssetPlaybackIDResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue GetAssetPlaybackIdResponse + localVarReturnValue GetAssetPlaybackIDResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.GetAssetPlaybackId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) - localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", fmt.Sprintf("%v", pLAYBACKID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", _neturl.PathEscape(parameterToString(r.pLAYBACKID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type ListAssetsParams struct { - Limit int32 - Page int32 +type ApiListAssetsRequest struct { + ctx _context.Context + ApiService *AssetsApiService + limit *int32 + page *int32 +} + +func (r ApiListAssetsRequest) Limit(limit int32) ApiListAssetsRequest { + r.limit = &limit + return r +} +func (r ApiListAssetsRequest) Page(page int32) ApiListAssetsRequest { + r.page = &page + return r } -// ListAssets optionally accepts the APIOption of WithParams(*ListAssetsParams). -func (a *AssetsApiService) ListAssets(opts ...APIOption) (ListAssetsResponse, error) { +func (r ApiListAssetsRequest) Execute() (ListAssetsResponse, *_nethttp.Response, error) { + return r.ApiService.ListAssetsExecute(r) +} + +/* + * ListAssets List assets + * List all Mux assets. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListAssetsRequest + */ +func (a *AssetsApiService) ListAssets(ctx _context.Context) ApiListAssetsRequest { + return ApiListAssetsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListAssetsResponse + */ +func (a *AssetsApiService) ListAssetsExecute(r ApiListAssetsRequest) (ListAssetsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -682,84 +1031,116 @@ func (a *AssetsApiService) ListAssets(opts ...APIOption) (ListAssetsResponse, er localVarReturnValue ListAssetsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListAssetsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListAssetsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.ListAssets") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets" + localVarPath := localBasePath + "/video/v1/assets" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAssetMasterAccessRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + updateAssetMasterAccessRequest *UpdateAssetMasterAccessRequest +} + +func (r ApiUpdateAssetMasterAccessRequest) UpdateAssetMasterAccessRequest(updateAssetMasterAccessRequest UpdateAssetMasterAccessRequest) ApiUpdateAssetMasterAccessRequest { + r.updateAssetMasterAccessRequest = &updateAssetMasterAccessRequest + return r +} + +func (r ApiUpdateAssetMasterAccessRequest) Execute() (AssetResponse, *_nethttp.Response, error) { + return r.ApiService.UpdateAssetMasterAccessExecute(r) +} + +/* + * UpdateAssetMasterAccess Update master access + * Allows you to add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to "none". +This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiUpdateAssetMasterAccessRequest + */ +func (a *AssetsApiService) UpdateAssetMasterAccess(ctx _context.Context, aSSETID string) ApiUpdateAssetMasterAccessRequest { + return ApiUpdateAssetMasterAccessRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } } -func (a *AssetsApiService) UpdateAssetMasterAccess(aSSETID string, updateAssetMasterAccessRequest UpdateAssetMasterAccessRequest, opts ...APIOption) (AssetResponse, error) { +/* + * Execute executes the request + * @return AssetResponse + */ +func (a *AssetsApiService) UpdateAssetMasterAccessExecute(r ApiUpdateAssetMasterAccessRequest) (AssetResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Put") + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -767,76 +1148,115 @@ func (a *AssetsApiService) UpdateAssetMasterAccess(aSSETID string, updateAssetMa localVarReturnValue AssetResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.UpdateAssetMasterAccess") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/master-access" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/master-access" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.updateAssetMasterAccessRequest == nil { + return localVarReturnValue, nil, reportError("updateAssetMasterAccessRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updateAssetMasterAccessRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.updateAssetMasterAccessRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAssetMp4SupportRequest struct { + ctx _context.Context + ApiService *AssetsApiService + aSSETID string + updateAssetMP4SupportRequest *UpdateAssetMP4SupportRequest } -func (a *AssetsApiService) UpdateAssetMp4Support(aSSETID string, updateAssetMp4SupportRequest UpdateAssetMp4SupportRequest, opts ...APIOption) (AssetResponse, error) { +func (r ApiUpdateAssetMp4SupportRequest) UpdateAssetMP4SupportRequest(updateAssetMP4SupportRequest UpdateAssetMP4SupportRequest) ApiUpdateAssetMp4SupportRequest { + r.updateAssetMP4SupportRequest = &updateAssetMP4SupportRequest + return r +} + +func (r ApiUpdateAssetMp4SupportRequest) Execute() (AssetResponse, *_nethttp.Response, error) { + return r.ApiService.UpdateAssetMp4SupportExecute(r) +} + +/* + * UpdateAssetMp4Support Update MP4 support + * Allows you to add or remove mp4 support for assets that were created without it. Currently there are two values supported in this request, `standard` and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param aSSETID The asset ID. + * @return ApiUpdateAssetMp4SupportRequest + */ +func (a *AssetsApiService) UpdateAssetMp4Support(ctx _context.Context, aSSETID string) ApiUpdateAssetMp4SupportRequest { + return ApiUpdateAssetMp4SupportRequest{ + ApiService: a, + ctx: ctx, + aSSETID: aSSETID, + } +} + +/* + * Execute executes the request + * @return AssetResponse + */ +func (a *AssetsApiService) UpdateAssetMp4SupportExecute(r ApiUpdateAssetMp4SupportRequest) (AssetResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Put") + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -844,68 +1264,73 @@ func (a *AssetsApiService) UpdateAssetMp4Support(aSSETID string, updateAssetMp4S localVarReturnValue AssetResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AssetsApiService.UpdateAssetMp4Support") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/assets/{ASSET_ID}/mp4-support" - localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", fmt.Sprintf("%v", aSSETID), -1) + localVarPath := localBasePath + "/video/v1/assets/{ASSET_ID}/mp4-support" + localVarPath = strings.Replace(localVarPath, "{"+"ASSET_ID"+"}", _neturl.PathEscape(parameterToString(r.aSSETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.updateAssetMP4SupportRequest == nil { + return localVarReturnValue, nil, reportError("updateAssetMP4SupportRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &updateAssetMp4SupportRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.updateAssetMP4SupportRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_delivery_usage.go b/api_delivery_usage.go index cdf2cf3..2fbfef1 100644 --- a/api_delivery_usage.go +++ b/api_delivery_usage.go @@ -1,28 +1,83 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "io/ioutil" - "net/url" - "strings" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// DeliveryUsageApiService DeliveryUsageApi service type DeliveryUsageApiService service -type ListDeliveryUsageParams struct { - Page int32 - Limit int32 - AssetId string - Timeframe []string +type ApiListDeliveryUsageRequest struct { + ctx _context.Context + ApiService *DeliveryUsageApiService + page *int32 + limit *int32 + assetId *string + timeframe *[]string } -// ListDeliveryUsage optionally accepts the APIOption of WithParams(*ListDeliveryUsageParams). -func (a *DeliveryUsageApiService) ListDeliveryUsage(opts ...APIOption) (ListDeliveryUsageResponse, error) { +func (r ApiListDeliveryUsageRequest) Page(page int32) ApiListDeliveryUsageRequest { + r.page = &page + return r +} +func (r ApiListDeliveryUsageRequest) Limit(limit int32) ApiListDeliveryUsageRequest { + r.limit = &limit + return r +} +func (r ApiListDeliveryUsageRequest) AssetId(assetId string) ApiListDeliveryUsageRequest { + r.assetId = &assetId + return r +} +func (r ApiListDeliveryUsageRequest) Timeframe(timeframe []string) ApiListDeliveryUsageRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListDeliveryUsageRequest) Execute() (ListDeliveryUsageResponse, *_nethttp.Response, error) { + return r.ApiService.ListDeliveryUsageExecute(r) +} + +/* + * ListDeliveryUsage List Usage + * Returns a list of delivery usage records and their associated Asset IDs or Live Stream IDs. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListDeliveryUsageRequest + */ +func (a *DeliveryUsageApiService) ListDeliveryUsage(ctx _context.Context) ApiListDeliveryUsageRequest { + return ApiListDeliveryUsageRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListDeliveryUsageResponse + */ +func (a *DeliveryUsageApiService) ListDeliveryUsageExecute(r ApiListDeliveryUsageRequest) (ListDeliveryUsageResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -30,86 +85,87 @@ func (a *DeliveryUsageApiService) ListDeliveryUsage(opts ...APIOption) (ListDeli localVarReturnValue ListDeliveryUsageResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListDeliveryUsageParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListDeliveryUsageParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DeliveryUsageApiService.ListDeliveryUsage") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/delivery-usage" + localVarPath := localBasePath + "/video/v1/delivery-usage" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.AssetId) { - localVarQueryParams.Add("asset_id", parameterToString(localVarOptionals.AssetId, "")) + if r.assetId != nil { + localVarQueryParams.Add("asset_id", parameterToString(*r.assetId, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_dimensions.go b/api_dimensions.go index 537e02f..3195c6a 100644 --- a/api_dimensions.go +++ b/api_dimensions.go @@ -1,29 +1,89 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// DimensionsApiService DimensionsApi service type DimensionsApiService service -type ListDimensionValuesParams struct { - Limit int32 - Page int32 - Filters []string - Timeframe []string +type ApiListDimensionValuesRequest struct { + ctx _context.Context + ApiService *DimensionsApiService + dIMENSIONID string + limit *int32 + page *int32 + filters *[]string + timeframe *[]string +} + +func (r ApiListDimensionValuesRequest) Limit(limit int32) ApiListDimensionValuesRequest { + r.limit = &limit + return r +} +func (r ApiListDimensionValuesRequest) Page(page int32) ApiListDimensionValuesRequest { + r.page = &page + return r +} +func (r ApiListDimensionValuesRequest) Filters(filters []string) ApiListDimensionValuesRequest { + r.filters = &filters + return r +} +func (r ApiListDimensionValuesRequest) Timeframe(timeframe []string) ApiListDimensionValuesRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListDimensionValuesRequest) Execute() (ListDimensionValuesResponse, *_nethttp.Response, error) { + return r.ApiService.ListDimensionValuesExecute(r) } -// ListDimensionValues optionally accepts the APIOption of WithParams(*ListDimensionValuesParams). -func (a *DimensionsApiService) ListDimensionValues(dIMENSIONID string, opts ...APIOption) (ListDimensionValuesResponse, error) { +/* + * ListDimensionValues Lists the values for a specific dimension + * Lists the values for a dimension along with a total count of related views. + +Note: This API replaces the list-filter-values API call. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param dIMENSIONID ID of the Dimension + * @return ApiListDimensionValuesRequest + */ +func (a *DimensionsApiService) ListDimensionValues(ctx _context.Context, dIMENSIONID string) ApiListDimensionValuesRequest { + return ApiListDimensionValuesRequest{ + ApiService: a, + ctx: ctx, + dIMENSIONID: dIMENSIONID, + } +} + +/* + * Execute executes the request + * @return ListDimensionValuesResponse + */ +func (a *DimensionsApiService) ListDimensionValuesExecute(r ApiListDimensionValuesRequest) (ListDimensionValuesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -31,99 +91,133 @@ func (a *DimensionsApiService) ListDimensionValues(dIMENSIONID string, opts ...A localVarReturnValue ListDimensionValuesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListDimensionValuesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListDimensionValuesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DimensionsApiService.ListDimensionValues") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/dimensions/{DIMENSION_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"DIMENSION_ID"+"}", fmt.Sprintf("%v", dIMENSIONID), -1) + localVarPath := localBasePath + "/data/v1/dimensions/{DIMENSION_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"DIMENSION_ID"+"}", _neturl.PathEscape(parameterToString(r.dIMENSIONID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDimensionsRequest struct { + ctx _context.Context + ApiService *DimensionsApiService +} + + +func (r ApiListDimensionsRequest) Execute() (ListDimensionsResponse, *_nethttp.Response, error) { + return r.ApiService.ListDimensionsExecute(r) +} + +/* + * ListDimensions List Dimensions + * List all available dimensions. + +Note: This API replaces the list-filters API call. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListDimensionsRequest + */ +func (a *DimensionsApiService) ListDimensions(ctx _context.Context) ApiListDimensionsRequest { + return ApiListDimensionsRequest{ + ApiService: a, + ctx: ctx, + } } -func (a *DimensionsApiService) ListDimensions(opts ...APIOption) (ListDimensionsResponse, error) { +/* + * Execute executes the request + * @return ListDimensionsResponse + */ +func (a *DimensionsApiService) ListDimensionsExecute(r ApiListDimensionsRequest) (ListDimensionsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -131,65 +225,67 @@ func (a *DimensionsApiService) ListDimensions(opts ...APIOption) (ListDimensions localVarReturnValue ListDimensionsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DimensionsApiService.ListDimensions") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/dimensions" + localVarPath := localBasePath + "/data/v1/dimensions" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_direct_uploads.go b/api_direct_uploads.go index 49390ca..1a43dc6 100644 --- a/api_direct_uploads.go +++ b/api_direct_uploads.go @@ -1,21 +1,68 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" ) +// Linger please +var ( + _ _context.Context +) + +// DirectUploadsApiService DirectUploadsApi service type DirectUploadsApiService service -func (a *DirectUploadsApiService) CancelDirectUpload(uPLOADID string, opts ...APIOption) (UploadResponse, error) { +type ApiCancelDirectUploadRequest struct { + ctx _context.Context + ApiService *DirectUploadsApiService + uPLOADID string +} + + +func (r ApiCancelDirectUploadRequest) Execute() (UploadResponse, *_nethttp.Response, error) { + return r.ApiService.CancelDirectUploadExecute(r) +} + +/* + * CancelDirectUpload Cancel a direct upload + * Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this +request, no asset will be created. This request will only succeed if the upload is still in +the `waiting` state. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uPLOADID ID of the Upload + * @return ApiCancelDirectUploadRequest + */ +func (a *DirectUploadsApiService) CancelDirectUpload(ctx _context.Context, uPLOADID string) ApiCancelDirectUploadRequest { + return ApiCancelDirectUploadRequest{ + ApiService: a, + ctx: ctx, + uPLOADID: uPLOADID, + } +} + +/* + * Execute executes the request + * @return UploadResponse + */ +func (a *DirectUploadsApiService) CancelDirectUploadExecute(r ApiCancelDirectUploadRequest) (UploadResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Put") + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,74 +70,106 @@ func (a *DirectUploadsApiService) CancelDirectUpload(uPLOADID string, opts ...AP localVarReturnValue UploadResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DirectUploadsApiService.CancelDirectUpload") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/uploads/{UPLOAD_ID}/cancel" - localVarPath = strings.Replace(localVarPath, "{"+"UPLOAD_ID"+"}", fmt.Sprintf("%v", uPLOADID), -1) + localVarPath := localBasePath + "/video/v1/uploads/{UPLOAD_ID}/cancel" + localVarPath = strings.Replace(localVarPath, "{"+"UPLOAD_ID"+"}", _neturl.PathEscape(parameterToString(r.uPLOADID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateDirectUploadRequest struct { + ctx _context.Context + ApiService *DirectUploadsApiService + createUploadRequest *CreateUploadRequest +} + +func (r ApiCreateDirectUploadRequest) CreateUploadRequest(createUploadRequest CreateUploadRequest) ApiCreateDirectUploadRequest { + r.createUploadRequest = &createUploadRequest + return r +} + +func (r ApiCreateDirectUploadRequest) Execute() (UploadResponse, *_nethttp.Response, error) { + return r.ApiService.CreateDirectUploadExecute(r) +} + +/* + * CreateDirectUpload Create a new direct upload URL + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateDirectUploadRequest + */ +func (a *DirectUploadsApiService) CreateDirectUpload(ctx _context.Context) ApiCreateDirectUploadRequest { + return ApiCreateDirectUploadRequest{ + ApiService: a, + ctx: ctx, + } } -func (a *DirectUploadsApiService) CreateDirectUpload(createUploadRequest CreateUploadRequest, opts ...APIOption) (UploadResponse, error) { +/* + * Execute executes the request + * @return UploadResponse + */ +func (a *DirectUploadsApiService) CreateDirectUploadExecute(r ApiCreateDirectUploadRequest) (UploadResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -98,75 +177,108 @@ func (a *DirectUploadsApiService) CreateDirectUpload(createUploadRequest CreateU localVarReturnValue UploadResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DirectUploadsApiService.CreateDirectUpload") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/uploads" + localVarPath := localBasePath + "/video/v1/uploads" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createUploadRequest == nil { + return localVarReturnValue, nil, reportError("createUploadRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createUploadRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createUploadRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDirectUploadRequest struct { + ctx _context.Context + ApiService *DirectUploadsApiService + uPLOADID string +} + + +func (r ApiGetDirectUploadRequest) Execute() (UploadResponse, *_nethttp.Response, error) { + return r.ApiService.GetDirectUploadExecute(r) +} + +/* + * GetDirectUpload Retrieve a single direct upload's info + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uPLOADID ID of the Upload + * @return ApiGetDirectUploadRequest + */ +func (a *DirectUploadsApiService) GetDirectUpload(ctx _context.Context, uPLOADID string) ApiGetDirectUploadRequest { + return ApiGetDirectUploadRequest{ + ApiService: a, + ctx: ctx, + uPLOADID: uPLOADID, + } } -func (a *DirectUploadsApiService) GetDirectUpload(uPLOADID string, opts ...APIOption) (UploadResponse, error) { +/* + * Execute executes the request + * @return UploadResponse + */ +func (a *DirectUploadsApiService) GetDirectUploadExecute(r ApiGetDirectUploadRequest) (UploadResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -174,80 +286,111 @@ func (a *DirectUploadsApiService) GetDirectUpload(uPLOADID string, opts ...APIOp localVarReturnValue UploadResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DirectUploadsApiService.GetDirectUpload") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/uploads/{UPLOAD_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"UPLOAD_ID"+"}", fmt.Sprintf("%v", uPLOADID), -1) + localVarPath := localBasePath + "/video/v1/uploads/{UPLOAD_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"UPLOAD_ID"+"}", _neturl.PathEscape(parameterToString(r.uPLOADID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type ListDirectUploadsParams struct { - Limit int32 - Page int32 +type ApiListDirectUploadsRequest struct { + ctx _context.Context + ApiService *DirectUploadsApiService + limit *int32 + page *int32 } -// ListDirectUploads optionally accepts the APIOption of WithParams(*ListDirectUploadsParams). -func (a *DirectUploadsApiService) ListDirectUploads(opts ...APIOption) (ListUploadsResponse, error) { +func (r ApiListDirectUploadsRequest) Limit(limit int32) ApiListDirectUploadsRequest { + r.limit = &limit + return r +} +func (r ApiListDirectUploadsRequest) Page(page int32) ApiListDirectUploadsRequest { + r.page = &page + return r +} + +func (r ApiListDirectUploadsRequest) Execute() (ListUploadsResponse, *_nethttp.Response, error) { + return r.ApiService.ListDirectUploadsExecute(r) +} + +/* + * ListDirectUploads List direct uploads + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListDirectUploadsRequest + */ +func (a *DirectUploadsApiService) ListDirectUploads(ctx _context.Context) ApiListDirectUploadsRequest { + return ApiListDirectUploadsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListUploadsResponse + */ +func (a *DirectUploadsApiService) ListDirectUploadsExecute(r ApiListDirectUploadsRequest) (ListUploadsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -255,76 +398,73 @@ func (a *DirectUploadsApiService) ListDirectUploads(opts ...APIOption) (ListUplo localVarReturnValue ListUploadsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListDirectUploadsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListDirectUploadsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DirectUploadsApiService.ListDirectUploads") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/uploads" + localVarPath := localBasePath + "/video/v1/uploads" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_errors.go b/api_errors.go index 2168f55..7247520 100644 --- a/api_errors.go +++ b/api_errors.go @@ -1,26 +1,73 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "io/ioutil" - "net/url" - "strings" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// ErrorsApiService ErrorsApi service type ErrorsApiService service -type ListErrorsParams struct { - Filters []string - Timeframe []string +type ApiListErrorsRequest struct { + ctx _context.Context + ApiService *ErrorsApiService + filters *[]string + timeframe *[]string +} + +func (r ApiListErrorsRequest) Filters(filters []string) ApiListErrorsRequest { + r.filters = &filters + return r +} +func (r ApiListErrorsRequest) Timeframe(timeframe []string) ApiListErrorsRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListErrorsRequest) Execute() (ListErrorsResponse, *_nethttp.Response, error) { + return r.ApiService.ListErrorsExecute(r) } -// ListErrors optionally accepts the APIOption of WithParams(*ListErrorsParams). -func (a *ErrorsApiService) ListErrors(opts ...APIOption) (ListErrorsResponse, error) { +/* + * ListErrors List Errors + * Returns a list of errors + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListErrorsRequest + */ +func (a *ErrorsApiService) ListErrors(ctx _context.Context) ApiListErrorsRequest { + return ApiListErrorsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListErrorsResponse + */ +func (a *ErrorsApiService) ListErrorsExecute(r ApiListErrorsRequest) (ListErrorsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -28,84 +75,89 @@ func (a *ErrorsApiService) ListErrors(opts ...APIOption) (ListErrorsResponse, er localVarReturnValue ListErrorsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListErrorsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListErrorsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrorsApiService.ListErrors") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/errors" + localVarPath := localBasePath + "/data/v1/errors" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_exports.go b/api_exports.go index 65318b8..df436b3 100644 --- a/api_exports.go +++ b/api_exports.go @@ -1,20 +1,62 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "io/ioutil" - "net/url" - "strings" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" +) + +// Linger please +var ( + _ _context.Context ) +// ExportsApiService ExportsApi service type ExportsApiService service -func (a *ExportsApiService) ListExports(opts ...APIOption) (ListExportsResponse, error) { +type ApiListExportsRequest struct { + ctx _context.Context + ApiService *ExportsApiService +} + + +func (r ApiListExportsRequest) Execute() (ListExportsResponse, *_nethttp.Response, error) { + return r.ApiService.ListExportsExecute(r) +} + +/* + * ListExports List property video view export links + * Lists the available video view exports along with URLs to retrieve them + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListExportsRequest + */ +func (a *ExportsApiService) ListExports(ctx _context.Context) ApiListExportsRequest { + return ApiListExportsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListExportsResponse + */ +func (a *ExportsApiService) ListExportsExecute(r ApiListExportsRequest) (ListExportsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -22,65 +64,67 @@ func (a *ExportsApiService) ListExports(opts ...APIOption) (ListExportsResponse, localVarReturnValue ListExportsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportsApiService.ListExports") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/exports" + localVarPath := localBasePath + "/data/v1/exports" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_filters.go b/api_filters.go index eab1ce1..b2a0a6f 100644 --- a/api_filters.go +++ b/api_filters.go @@ -1,29 +1,89 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// FiltersApiService FiltersApi service type FiltersApiService service -type ListFilterValuesParams struct { - Limit int32 - Page int32 - Filters []string - Timeframe []string +type ApiListFilterValuesRequest struct { + ctx _context.Context + ApiService *FiltersApiService + fILTERID string + limit *int32 + page *int32 + filters *[]string + timeframe *[]string +} + +func (r ApiListFilterValuesRequest) Limit(limit int32) ApiListFilterValuesRequest { + r.limit = &limit + return r +} +func (r ApiListFilterValuesRequest) Page(page int32) ApiListFilterValuesRequest { + r.page = &page + return r +} +func (r ApiListFilterValuesRequest) Filters(filters []string) ApiListFilterValuesRequest { + r.filters = &filters + return r +} +func (r ApiListFilterValuesRequest) Timeframe(timeframe []string) ApiListFilterValuesRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListFilterValuesRequest) Execute() (ListFilterValuesResponse, *_nethttp.Response, error) { + return r.ApiService.ListFilterValuesExecute(r) } -// ListFilterValues optionally accepts the APIOption of WithParams(*ListFilterValuesParams). -func (a *FiltersApiService) ListFilterValues(fILTERID string, opts ...APIOption) (ListFilterValuesResponse, error) { +/* + * ListFilterValues Lists values for a specific filter + * Deprecated: The API has been replaced by the list-dimension-values API call. + +Lists the values for a filter along with a total count of related views. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param fILTERID ID of the Filter + * @return ApiListFilterValuesRequest + */ +func (a *FiltersApiService) ListFilterValues(ctx _context.Context, fILTERID string) ApiListFilterValuesRequest { + return ApiListFilterValuesRequest{ + ApiService: a, + ctx: ctx, + fILTERID: fILTERID, + } +} + +/* + * Execute executes the request + * @return ListFilterValuesResponse + */ +func (a *FiltersApiService) ListFilterValuesExecute(r ApiListFilterValuesRequest) (ListFilterValuesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -31,99 +91,133 @@ func (a *FiltersApiService) ListFilterValues(fILTERID string, opts ...APIOption) localVarReturnValue ListFilterValuesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListFilterValuesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListFilterValuesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FiltersApiService.ListFilterValues") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/filters/{FILTER_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"FILTER_ID"+"}", fmt.Sprintf("%v", fILTERID), -1) + localVarPath := localBasePath + "/data/v1/filters/{FILTER_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"FILTER_ID"+"}", _neturl.PathEscape(parameterToString(r.fILTERID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFiltersRequest struct { + ctx _context.Context + ApiService *FiltersApiService +} + + +func (r ApiListFiltersRequest) Execute() (ListFiltersResponse, *_nethttp.Response, error) { + return r.ApiService.ListFiltersExecute(r) +} + +/* + * ListFilters List Filters + * Deprecated: The API has been replaced by the list-dimensions API call. + +Lists all the filters broken out into basic and advanced. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListFiltersRequest + */ +func (a *FiltersApiService) ListFilters(ctx _context.Context) ApiListFiltersRequest { + return ApiListFiltersRequest{ + ApiService: a, + ctx: ctx, + } } -func (a *FiltersApiService) ListFilters(opts ...APIOption) (ListFiltersResponse, error) { +/* + * Execute executes the request + * @return ListFiltersResponse + */ +func (a *FiltersApiService) ListFiltersExecute(r ApiListFiltersRequest) (ListFiltersResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -131,65 +225,67 @@ func (a *FiltersApiService) ListFilters(opts ...APIOption) (ListFiltersResponse, localVarReturnValue ListFiltersResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FiltersApiService.ListFilters") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/filters" + localVarPath := localBasePath + "/data/v1/filters" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_incidents.go b/api_incidents.go index 0edea7f..714e8d9 100644 --- a/api_incidents.go +++ b/api_incidents.go @@ -1,21 +1,66 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" ) +// Linger please +var ( + _ _context.Context +) + +// IncidentsApiService IncidentsApi service type IncidentsApiService service -func (a *IncidentsApiService) GetIncident(iNCIDENTID string, opts ...APIOption) (IncidentResponse, error) { +type ApiGetIncidentRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + iNCIDENTID string +} + + +func (r ApiGetIncidentRequest) Execute() (IncidentResponse, *_nethttp.Response, error) { + return r.ApiService.GetIncidentExecute(r) +} + +/* + * GetIncident Get an Incident + * Returns the details of an incident + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param iNCIDENTID ID of the Incident + * @return ApiGetIncidentRequest + */ +func (a *IncidentsApiService) GetIncident(ctx _context.Context, iNCIDENTID string) ApiGetIncidentRequest { + return ApiGetIncidentRequest{ + ApiService: a, + ctx: ctx, + iNCIDENTID: iNCIDENTID, + } +} + +/* + * Execute executes the request + * @return IncidentResponse + */ +func (a *IncidentsApiService) GetIncidentExecute(r ApiGetIncidentRequest) (IncidentResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,84 +68,133 @@ func (a *IncidentsApiService) GetIncident(iNCIDENTID string, opts ...APIOption) localVarReturnValue IncidentResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.GetIncident") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/incidents/{INCIDENT_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"INCIDENT_ID"+"}", fmt.Sprintf("%v", iNCIDENTID), -1) + localVarPath := localBasePath + "/data/v1/incidents/{INCIDENT_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"INCIDENT_ID"+"}", _neturl.PathEscape(parameterToString(r.iNCIDENTID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListIncidentsRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + limit *int32 + page *int32 + orderBy *string + orderDirection *string + status *string + severity *string +} + +func (r ApiListIncidentsRequest) Limit(limit int32) ApiListIncidentsRequest { + r.limit = &limit + return r +} +func (r ApiListIncidentsRequest) Page(page int32) ApiListIncidentsRequest { + r.page = &page + return r +} +func (r ApiListIncidentsRequest) OrderBy(orderBy string) ApiListIncidentsRequest { + r.orderBy = &orderBy + return r +} +func (r ApiListIncidentsRequest) OrderDirection(orderDirection string) ApiListIncidentsRequest { + r.orderDirection = &orderDirection + return r +} +func (r ApiListIncidentsRequest) Status(status string) ApiListIncidentsRequest { + r.status = &status + return r +} +func (r ApiListIncidentsRequest) Severity(severity string) ApiListIncidentsRequest { + r.severity = &severity + return r +} + +func (r ApiListIncidentsRequest) Execute() (ListIncidentsResponse, *_nethttp.Response, error) { + return r.ApiService.ListIncidentsExecute(r) } -type ListIncidentsParams struct { - Limit int32 - Page int32 - OrderBy string - OrderDirection string - Status string - Severity string +/* + * ListIncidents List Incidents + * Returns a list of incidents + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListIncidentsRequest + */ +func (a *IncidentsApiService) ListIncidents(ctx _context.Context) ApiListIncidentsRequest { + return ApiListIncidentsRequest{ + ApiService: a, + ctx: ctx, + } } -// ListIncidents optionally accepts the APIOption of WithParams(*ListIncidentsParams). -func (a *IncidentsApiService) ListIncidents(opts ...APIOption) (ListIncidentsResponse, error) { +/* + * Execute executes the request + * @return ListIncidentsResponse + */ +func (a *IncidentsApiService) ListIncidentsExecute(r ApiListIncidentsRequest) (ListIncidentsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -108,104 +202,143 @@ func (a *IncidentsApiService) ListIncidents(opts ...APIOption) (ListIncidentsRes localVarReturnValue ListIncidentsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListIncidentsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListIncidentsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.ListIncidents") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/incidents" + localVarPath := localBasePath + "/data/v1/incidents" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { - localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + if r.orderBy != nil { + localVarQueryParams.Add("order_by", parameterToString(*r.orderBy, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Status) { - localVarQueryParams.Add("status", parameterToString(localVarOptionals.Status, "")) + if r.status != nil { + localVarQueryParams.Add("status", parameterToString(*r.status, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Severity) { - localVarQueryParams.Add("severity", parameterToString(localVarOptionals.Severity, "")) + if r.severity != nil { + localVarQueryParams.Add("severity", parameterToString(*r.severity, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRelatedIncidentsRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + iNCIDENTID string + limit *int32 + page *int32 + orderBy *string + orderDirection *string } -type ListRelatedIncidentsParams struct { - Limit int32 - Page int32 - OrderBy string - OrderDirection string +func (r ApiListRelatedIncidentsRequest) Limit(limit int32) ApiListRelatedIncidentsRequest { + r.limit = &limit + return r +} +func (r ApiListRelatedIncidentsRequest) Page(page int32) ApiListRelatedIncidentsRequest { + r.page = &page + return r +} +func (r ApiListRelatedIncidentsRequest) OrderBy(orderBy string) ApiListRelatedIncidentsRequest { + r.orderBy = &orderBy + return r +} +func (r ApiListRelatedIncidentsRequest) OrderDirection(orderDirection string) ApiListRelatedIncidentsRequest { + r.orderDirection = &orderDirection + return r } -// ListRelatedIncidents optionally accepts the APIOption of WithParams(*ListRelatedIncidentsParams). -func (a *IncidentsApiService) ListRelatedIncidents(iNCIDENTID string, opts ...APIOption) (ListRelatedIncidentsResponse, error) { +func (r ApiListRelatedIncidentsRequest) Execute() (ListRelatedIncidentsResponse, *_nethttp.Response, error) { + return r.ApiService.ListRelatedIncidentsExecute(r) +} + +/* + * ListRelatedIncidents List Related Incidents + * Returns all the incidents that seem related to a specific incident + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param iNCIDENTID ID of the Incident + * @return ApiListRelatedIncidentsRequest + */ +func (a *IncidentsApiService) ListRelatedIncidents(ctx _context.Context, iNCIDENTID string) ApiListRelatedIncidentsRequest { + return ApiListRelatedIncidentsRequest{ + ApiService: a, + ctx: ctx, + iNCIDENTID: iNCIDENTID, + } +} + +/* + * Execute executes the request + * @return ListRelatedIncidentsResponse + */ +func (a *IncidentsApiService) ListRelatedIncidentsExecute(r ApiListRelatedIncidentsRequest) (ListRelatedIncidentsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -213,83 +346,80 @@ func (a *IncidentsApiService) ListRelatedIncidents(iNCIDENTID string, opts ...AP localVarReturnValue ListRelatedIncidentsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListRelatedIncidentsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListRelatedIncidentsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.ListRelatedIncidents") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/incidents/{INCIDENT_ID}/related" - localVarPath = strings.Replace(localVarPath, "{"+"INCIDENT_ID"+"}", fmt.Sprintf("%v", iNCIDENTID), -1) + localVarPath := localBasePath + "/data/v1/incidents/{INCIDENT_ID}/related" + localVarPath = strings.Replace(localVarPath, "{"+"INCIDENT_ID"+"}", _neturl.PathEscape(parameterToString(r.iNCIDENTID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { - localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + if r.orderBy != nil { + localVarQueryParams.Add("order_by", parameterToString(*r.orderBy, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_live_streams.go b/api_live_streams.go index 583bb3a..fb0569a 100644 --- a/api_live_streams.go +++ b/api_live_streams.go @@ -1,21 +1,66 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" ) +// Linger please +var ( + _ _context.Context +) + +// LiveStreamsApiService LiveStreamsApi service type LiveStreamsApiService service -func (a *LiveStreamsApiService) CreateLiveStream(createLiveStreamRequest CreateLiveStreamRequest, opts ...APIOption) (LiveStreamResponse, error) { +type ApiCreateLiveStreamRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + createLiveStreamRequest *CreateLiveStreamRequest +} + +func (r ApiCreateLiveStreamRequest) CreateLiveStreamRequest(createLiveStreamRequest CreateLiveStreamRequest) ApiCreateLiveStreamRequest { + r.createLiveStreamRequest = &createLiveStreamRequest + return r +} + +func (r ApiCreateLiveStreamRequest) Execute() (LiveStreamResponse, *_nethttp.Response, error) { + return r.ApiService.CreateLiveStreamExecute(r) +} + +/* + * CreateLiveStream Create a live stream + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateLiveStreamRequest + */ +func (a *LiveStreamsApiService) CreateLiveStream(ctx _context.Context) ApiCreateLiveStreamRequest { + return ApiCreateLiveStreamRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return LiveStreamResponse + */ +func (a *LiveStreamsApiService) CreateLiveStreamExecute(r ApiCreateLiveStreamRequest) (LiveStreamResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,152 +68,229 @@ func (a *LiveStreamsApiService) CreateLiveStream(createLiveStreamRequest CreateL localVarReturnValue LiveStreamResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.CreateLiveStream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams" + localVarPath := localBasePath + "/video/v1/live-streams" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createLiveStreamRequest == nil { + return localVarReturnValue, nil, reportError("createLiveStreamRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createLiveStreamRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createLiveStreamRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateLiveStreamPlaybackIdRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string + createPlaybackIDRequest *CreatePlaybackIDRequest +} + +func (r ApiCreateLiveStreamPlaybackIdRequest) CreatePlaybackIDRequest(createPlaybackIDRequest CreatePlaybackIDRequest) ApiCreateLiveStreamPlaybackIdRequest { + r.createPlaybackIDRequest = &createPlaybackIDRequest + return r +} + +func (r ApiCreateLiveStreamPlaybackIdRequest) Execute() (CreatePlaybackIDResponse, *_nethttp.Response, error) { + return r.ApiService.CreateLiveStreamPlaybackIdExecute(r) } -func (a *LiveStreamsApiService) CreateLiveStreamPlaybackId(lIVESTREAMID string, createPlaybackIdRequest CreatePlaybackIdRequest, opts ...APIOption) (CreatePlaybackIdResponse, error) { +/* + * CreateLiveStreamPlaybackId Create a live stream playback ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiCreateLiveStreamPlaybackIdRequest + */ +func (a *LiveStreamsApiService) CreateLiveStreamPlaybackId(ctx _context.Context, lIVESTREAMID string) ApiCreateLiveStreamPlaybackIdRequest { + return ApiCreateLiveStreamPlaybackIdRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + * @return CreatePlaybackIDResponse + */ +func (a *LiveStreamsApiService) CreateLiveStreamPlaybackIdExecute(r ApiCreateLiveStreamPlaybackIdRequest) (CreatePlaybackIDResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue CreatePlaybackIdResponse + localVarReturnValue CreatePlaybackIDResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.CreateLiveStreamPlaybackId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createPlaybackIDRequest == nil { + return localVarReturnValue, nil, reportError("createPlaybackIDRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createPlaybackIdRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createPlaybackIDRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -func (a *LiveStreamsApiService) CreateLiveStreamSimulcastTarget(lIVESTREAMID string, createSimulcastTargetRequest CreateSimulcastTargetRequest, opts ...APIOption) (SimulcastTargetResponse, error) { +type ApiCreateLiveStreamSimulcastTargetRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string + createSimulcastTargetRequest *CreateSimulcastTargetRequest +} + +func (r ApiCreateLiveStreamSimulcastTargetRequest) CreateSimulcastTargetRequest(createSimulcastTargetRequest CreateSimulcastTargetRequest) ApiCreateLiveStreamSimulcastTargetRequest { + r.createSimulcastTargetRequest = &createSimulcastTargetRequest + return r +} + +func (r ApiCreateLiveStreamSimulcastTargetRequest) Execute() (SimulcastTargetResponse, *_nethttp.Response, error) { + return r.ApiService.CreateLiveStreamSimulcastTargetExecute(r) +} + +/* + * CreateLiveStreamSimulcastTarget Create a live stream simulcast target + * Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiCreateLiveStreamSimulcastTargetRequest + */ +func (a *LiveStreamsApiService) CreateLiveStreamSimulcastTarget(ctx _context.Context, lIVESTREAMID string) ApiCreateLiveStreamSimulcastTargetRequest { + return ApiCreateLiveStreamSimulcastTargetRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + * @return SimulcastTargetResponse + */ +func (a *LiveStreamsApiService) CreateLiveStreamSimulcastTargetExecute(r ApiCreateLiveStreamSimulcastTargetRequest) (SimulcastTargetResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -176,273 +298,404 @@ func (a *LiveStreamsApiService) CreateLiveStreamSimulcastTarget(lIVESTREAMID str localVarReturnValue SimulcastTargetResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.CreateLiveStreamSimulcastTarget") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.createSimulcastTargetRequest == nil { + return localVarReturnValue, nil, reportError("createSimulcastTargetRequest is required and must be specified") + } // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &createSimulcastTargetRequest - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.createSimulcastTargetRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteLiveStreamRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string } -func (a *LiveStreamsApiService) DeleteLiveStream(lIVESTREAMID string, opts ...APIOption) error { + +func (r ApiDeleteLiveStreamRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteLiveStreamExecute(r) +} + +/* + * DeleteLiveStream Delete a live stream + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiDeleteLiveStreamRequest + */ +func (a *LiveStreamsApiService) DeleteLiveStream(ctx _context.Context, lIVESTREAMID string) ApiDeleteLiveStreamRequest { + return ApiDeleteLiveStreamRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + */ +func (a *LiveStreamsApiService) DeleteLiveStreamExecute(r ApiDeleteLiveStreamRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.DeleteLiveStream") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil +} + +type ApiDeleteLiveStreamPlaybackIdRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string + pLAYBACKID string +} + + +func (r ApiDeleteLiveStreamPlaybackIdRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteLiveStreamPlaybackIdExecute(r) +} + +/* + * DeleteLiveStreamPlaybackId Delete a live stream playback ID + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @param pLAYBACKID The live stream's playback ID. + * @return ApiDeleteLiveStreamPlaybackIdRequest + */ +func (a *LiveStreamsApiService) DeleteLiveStreamPlaybackId(ctx _context.Context, lIVESTREAMID string, pLAYBACKID string) ApiDeleteLiveStreamPlaybackIdRequest { + return ApiDeleteLiveStreamPlaybackIdRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + pLAYBACKID: pLAYBACKID, + } } -func (a *LiveStreamsApiService) DeleteLiveStreamPlaybackId(lIVESTREAMID string, pLAYBACKID string, opts ...APIOption) error { +/* + * Execute executes the request + */ +func (a *LiveStreamsApiService) DeleteLiveStreamPlaybackIdExecute(r ApiDeleteLiveStreamPlaybackIdRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.DeleteLiveStreamPlaybackId") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) - localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", fmt.Sprintf("%v", pLAYBACKID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", _neturl.PathEscape(parameterToString(r.pLAYBACKID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil } -func (a *LiveStreamsApiService) DeleteLiveStreamSimulcastTarget(lIVESTREAMID string, sIMULCASTTARGETID string, opts ...APIOption) error { +type ApiDeleteLiveStreamSimulcastTargetRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string + sIMULCASTTARGETID string +} + + +func (r ApiDeleteLiveStreamSimulcastTargetRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteLiveStreamSimulcastTargetExecute(r) +} + +/* + * DeleteLiveStreamSimulcastTarget Delete a Live Stream Simulcast Target + * Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @param sIMULCASTTARGETID The ID of the simulcast target. + * @return ApiDeleteLiveStreamSimulcastTargetRequest + */ +func (a *LiveStreamsApiService) DeleteLiveStreamSimulcastTarget(ctx _context.Context, lIVESTREAMID string, sIMULCASTTARGETID string) ApiDeleteLiveStreamSimulcastTargetRequest { + return ApiDeleteLiveStreamSimulcastTargetRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + sIMULCASTTARGETID: sIMULCASTTARGETID, + } +} + +/* + * Execute executes the request + */ +func (a *LiveStreamsApiService) DeleteLiveStreamSimulcastTargetExecute(r ApiDeleteLiveStreamSimulcastTargetRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.DeleteLiveStreamSimulcastTarget") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) - localVarPath = strings.Replace(localVarPath, "{"+"SIMULCAST_TARGET_ID"+"}", fmt.Sprintf("%v", sIMULCASTTARGETID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SIMULCAST_TARGET_ID"+"}", _neturl.PathEscape(parameterToString(r.sIMULCASTTARGETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil +} + +type ApiDisableLiveStreamRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string +} + + +func (r ApiDisableLiveStreamRequest) Execute() (DisableLiveStreamResponse, *_nethttp.Response, error) { + return r.ApiService.DisableLiveStreamExecute(r) } -func (a *LiveStreamsApiService) DisableLiveStream(lIVESTREAMID string, opts ...APIOption) (DisableLiveStreamResponse, error) { +/* + * DisableLiveStream Disable a live stream + * Disables a live stream, making it reject incoming RTMP streams until re-enabled. The API also ends the live stream recording immediately when active. Ending the live stream recording adds the `EXT-X-ENDLIST` tag to the HLS manifest which notifies the player that this live stream is over. + +Mux also closes the encoder connection immediately. Any attempt from the encoder to re-establish connection will fail till the live stream is re-enabled. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiDisableLiveStreamRequest + */ +func (a *LiveStreamsApiService) DisableLiveStream(ctx _context.Context, lIVESTREAMID string) ApiDisableLiveStreamRequest { + return ApiDisableLiveStreamRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + * @return DisableLiveStreamResponse + */ +func (a *LiveStreamsApiService) DisableLiveStreamExecute(r ApiDisableLiveStreamRequest) (DisableLiveStreamResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Put") + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -450,74 +703,105 @@ func (a *LiveStreamsApiService) DisableLiveStream(lIVESTREAMID string, opts ...A localVarReturnValue DisableLiveStreamResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.DisableLiveStream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/disable" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/disable" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiEnableLiveStreamRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string } -func (a *LiveStreamsApiService) EnableLiveStream(lIVESTREAMID string, opts ...APIOption) (EnableLiveStreamResponse, error) { + +func (r ApiEnableLiveStreamRequest) Execute() (EnableLiveStreamResponse, *_nethttp.Response, error) { + return r.ApiService.EnableLiveStreamExecute(r) +} + +/* + * EnableLiveStream Enable a live stream + * Enables a live stream, allowing it to accept an incoming RTMP stream. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiEnableLiveStreamRequest + */ +func (a *LiveStreamsApiService) EnableLiveStream(ctx _context.Context, lIVESTREAMID string) ApiEnableLiveStreamRequest { + return ApiEnableLiveStreamRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + * @return EnableLiveStreamResponse + */ +func (a *LiveStreamsApiService) EnableLiveStreamExecute(r ApiEnableLiveStreamRequest) (EnableLiveStreamResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Put") + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -525,74 +809,105 @@ func (a *LiveStreamsApiService) EnableLiveStream(lIVESTREAMID string, opts ...AP localVarReturnValue EnableLiveStreamResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.EnableLiveStream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/enable" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/enable" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetLiveStreamRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string } -func (a *LiveStreamsApiService) GetLiveStream(lIVESTREAMID string, opts ...APIOption) (LiveStreamResponse, error) { + +func (r ApiGetLiveStreamRequest) Execute() (LiveStreamResponse, *_nethttp.Response, error) { + return r.ApiService.GetLiveStreamExecute(r) +} + +/* + * GetLiveStream Retrieve a live stream + * Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiGetLiveStreamRequest + */ +func (a *LiveStreamsApiService) GetLiveStream(ctx _context.Context, lIVESTREAMID string) ApiGetLiveStreamRequest { + return ApiGetLiveStreamRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + * @return LiveStreamResponse + */ +func (a *LiveStreamsApiService) GetLiveStreamExecute(r ApiGetLiveStreamRequest) (LiveStreamResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -600,74 +915,108 @@ func (a *LiveStreamsApiService) GetLiveStream(lIVESTREAMID string, opts ...APIOp localVarReturnValue LiveStreamResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.GetLiveStream") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -func (a *LiveStreamsApiService) GetLiveStreamSimulcastTarget(lIVESTREAMID string, sIMULCASTTARGETID string, opts ...APIOption) (SimulcastTargetResponse, error) { +type ApiGetLiveStreamSimulcastTargetRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string + sIMULCASTTARGETID string +} + + +func (r ApiGetLiveStreamSimulcastTargetRequest) Execute() (SimulcastTargetResponse, *_nethttp.Response, error) { + return r.ApiService.GetLiveStreamSimulcastTargetExecute(r) +} + +/* + * GetLiveStreamSimulcastTarget Retrieve a Live Stream Simulcast Target + * Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @param sIMULCASTTARGETID The ID of the simulcast target. + * @return ApiGetLiveStreamSimulcastTargetRequest + */ +func (a *LiveStreamsApiService) GetLiveStreamSimulcastTarget(ctx _context.Context, lIVESTREAMID string, sIMULCASTTARGETID string) ApiGetLiveStreamSimulcastTargetRequest { + return ApiGetLiveStreamSimulcastTargetRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + sIMULCASTTARGETID: sIMULCASTTARGETID, + } +} + +/* + * Execute executes the request + * @return SimulcastTargetResponse + */ +func (a *LiveStreamsApiService) GetLiveStreamSimulcastTargetExecute(r ApiGetLiveStreamSimulcastTargetRequest) (SimulcastTargetResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -675,81 +1024,117 @@ func (a *LiveStreamsApiService) GetLiveStreamSimulcastTarget(lIVESTREAMID string localVarReturnValue SimulcastTargetResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.GetLiveStreamSimulcastTarget") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) - localVarPath = strings.Replace(localVarPath, "{"+"SIMULCAST_TARGET_ID"+"}", fmt.Sprintf("%v", sIMULCASTTARGETID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"SIMULCAST_TARGET_ID"+"}", _neturl.PathEscape(parameterToString(r.sIMULCASTTARGETID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListLiveStreamsRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + limit *int32 + page *int32 + streamKey *string +} + +func (r ApiListLiveStreamsRequest) Limit(limit int32) ApiListLiveStreamsRequest { + r.limit = &limit + return r +} +func (r ApiListLiveStreamsRequest) Page(page int32) ApiListLiveStreamsRequest { + r.page = &page + return r +} +func (r ApiListLiveStreamsRequest) StreamKey(streamKey string) ApiListLiveStreamsRequest { + r.streamKey = &streamKey + return r } -type ListLiveStreamsParams struct { - Limit int32 - Page int32 +func (r ApiListLiveStreamsRequest) Execute() (ListLiveStreamsResponse, *_nethttp.Response, error) { + return r.ApiService.ListLiveStreamsExecute(r) } -// ListLiveStreams optionally accepts the APIOption of WithParams(*ListLiveStreamsParams). -func (a *LiveStreamsApiService) ListLiveStreams(opts ...APIOption) (ListLiveStreamsResponse, error) { +/* + * ListLiveStreams List live streams + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListLiveStreamsRequest + */ +func (a *LiveStreamsApiService) ListLiveStreams(ctx _context.Context) ApiListLiveStreamsRequest { + return ApiListLiveStreamsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListLiveStreamsResponse + */ +func (a *LiveStreamsApiService) ListLiveStreamsExecute(r ApiListLiveStreamsRequest) (ListLiveStreamsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -757,84 +1142,113 @@ func (a *LiveStreamsApiService) ListLiveStreams(opts ...APIOption) (ListLiveStre localVarReturnValue ListLiveStreamsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListLiveStreamsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListLiveStreamsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.ListLiveStreams") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams" + localVarPath := localBasePath + "/video/v1/live-streams" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.streamKey != nil { + localVarQueryParams.Add("stream_key", parameterToString(*r.streamKey, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -func (a *LiveStreamsApiService) ResetStreamKey(lIVESTREAMID string, opts ...APIOption) (LiveStreamResponse, error) { +type ApiResetStreamKeyRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string +} + + +func (r ApiResetStreamKeyRequest) Execute() (LiveStreamResponse, *_nethttp.Response, error) { + return r.ApiService.ResetStreamKeyExecute(r) +} + +/* + * ResetStreamKey Reset a live stream’s stream key + * Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiResetStreamKeyRequest + */ +func (a *LiveStreamsApiService) ResetStreamKey(ctx _context.Context, lIVESTREAMID string) ApiResetStreamKeyRequest { + return ApiResetStreamKeyRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } +} + +/* + * Execute executes the request + * @return LiveStreamResponse + */ +func (a *LiveStreamsApiService) ResetStreamKeyExecute(r ApiResetStreamKeyRequest) (LiveStreamResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -842,74 +1256,108 @@ func (a *LiveStreamsApiService) ResetStreamKey(lIVESTREAMID string, opts ...APIO localVarReturnValue LiveStreamResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.ResetStreamKey") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSignalLiveStreamCompleteRequest struct { + ctx _context.Context + ApiService *LiveStreamsApiService + lIVESTREAMID string +} + + +func (r ApiSignalLiveStreamCompleteRequest) Execute() (SignalLiveStreamCompleteResponse, *_nethttp.Response, error) { + return r.ApiService.SignalLiveStreamCompleteExecute(r) +} + +/* + * SignalLiveStreamComplete Signal a live stream is finished + * (Optional) End the live stream recording immediately instead of waiting for the reconnect_window. `EXT-X-ENDLIST` tag is added to the HLS manifest which notifies the player that this live stream is over. + +Mux does not close the encoder connection immediately. Encoders are often configured to re-establish connections immediately which would result in a new recorded asset. For this reason, Mux waits for 60s before closing the connection with the encoder. This 60s timeframe is meant to give encoder operators a chance to disconnect from their end. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param lIVESTREAMID The live stream ID + * @return ApiSignalLiveStreamCompleteRequest + */ +func (a *LiveStreamsApiService) SignalLiveStreamComplete(ctx _context.Context, lIVESTREAMID string) ApiSignalLiveStreamCompleteRequest { + return ApiSignalLiveStreamCompleteRequest{ + ApiService: a, + ctx: ctx, + lIVESTREAMID: lIVESTREAMID, + } } -func (a *LiveStreamsApiService) SignalLiveStreamComplete(lIVESTREAMID string, opts ...APIOption) (SignalLiveStreamCompleteResponse, error) { +/* + * Execute executes the request + * @return SignalLiveStreamCompleteResponse + */ +func (a *LiveStreamsApiService) SignalLiveStreamCompleteExecute(r ApiSignalLiveStreamCompleteRequest) (SignalLiveStreamCompleteResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Put") + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -917,66 +1365,68 @@ func (a *LiveStreamsApiService) SignalLiveStreamComplete(lIVESTREAMID string, op localVarReturnValue SignalLiveStreamCompleteResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LiveStreamsApiService.SignalLiveStreamComplete") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/complete" - localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", fmt.Sprintf("%v", lIVESTREAMID), -1) + localVarPath := localBasePath + "/video/v1/live-streams/{LIVE_STREAM_ID}/complete" + localVarPath = strings.Replace(localVarPath, "{"+"LIVE_STREAM_ID"+"}", _neturl.PathEscape(parameterToString(r.lIVESTREAMID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_metrics.go b/api_metrics.go index 85c399f..1acf8f3 100644 --- a/api_metrics.go +++ b/api_metrics.go @@ -1,30 +1,92 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// MetricsApiService MetricsApi service type MetricsApiService service -type GetMetricTimeseriesDataParams struct { - Timeframe []string - Filters []string - Measurement string - OrderDirection string - GroupBy string +type ApiGetMetricTimeseriesDataRequest struct { + ctx _context.Context + ApiService *MetricsApiService + mETRICID string + timeframe *[]string + filters *[]string + measurement *string + orderDirection *string + groupBy *string +} + +func (r ApiGetMetricTimeseriesDataRequest) Timeframe(timeframe []string) ApiGetMetricTimeseriesDataRequest { + r.timeframe = &timeframe + return r +} +func (r ApiGetMetricTimeseriesDataRequest) Filters(filters []string) ApiGetMetricTimeseriesDataRequest { + r.filters = &filters + return r +} +func (r ApiGetMetricTimeseriesDataRequest) Measurement(measurement string) ApiGetMetricTimeseriesDataRequest { + r.measurement = &measurement + return r +} +func (r ApiGetMetricTimeseriesDataRequest) OrderDirection(orderDirection string) ApiGetMetricTimeseriesDataRequest { + r.orderDirection = &orderDirection + return r +} +func (r ApiGetMetricTimeseriesDataRequest) GroupBy(groupBy string) ApiGetMetricTimeseriesDataRequest { + r.groupBy = &groupBy + return r +} + +func (r ApiGetMetricTimeseriesDataRequest) Execute() (GetMetricTimeseriesDataResponse, *_nethttp.Response, error) { + return r.ApiService.GetMetricTimeseriesDataExecute(r) } -// GetMetricTimeseriesData optionally accepts the APIOption of WithParams(*GetMetricTimeseriesDataParams). -func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...APIOption) (GetMetricTimeseriesDataResponse, error) { +/* + * GetMetricTimeseriesData Get metric timeseries data + * Returns timeseries data for a specific metric + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param mETRICID ID of the Metric + * @return ApiGetMetricTimeseriesDataRequest + */ +func (a *MetricsApiService) GetMetricTimeseriesData(ctx _context.Context, mETRICID string) ApiGetMetricTimeseriesDataRequest { + return ApiGetMetricTimeseriesDataRequest{ + ApiService: a, + ctx: ctx, + mETRICID: mETRICID, + } +} + +/* + * Execute executes the request + * @return GetMetricTimeseriesDataResponse + */ +func (a *MetricsApiService) GetMetricTimeseriesDataExecute(r ApiGetMetricTimeseriesDataRequest) (GetMetricTimeseriesDataResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -32,109 +94,152 @@ func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...API localVarReturnValue GetMetricTimeseriesDataResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*GetMetricTimeseriesDataParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *GetMetricTimeseriesDataParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsApiService.GetMetricTimeseriesData") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/metrics/{METRIC_ID}/timeseries" - localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", fmt.Sprintf("%v", mETRICID), -1) + localVarPath := localBasePath + "/data/v1/metrics/{METRIC_ID}/timeseries" + localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.mETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Measurement) { - localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, "")) + if r.measurement != nil { + localVarQueryParams.Add("measurement", parameterToString(*r.measurement, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.GroupBy) { - localVarQueryParams.Add("group_by", parameterToString(localVarOptionals.GroupBy, "")) + if r.groupBy != nil { + localVarQueryParams.Add("group_by", parameterToString(*r.groupBy, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetOverallValuesRequest struct { + ctx _context.Context + ApiService *MetricsApiService + mETRICID string + timeframe *[]string + filters *[]string + measurement *string +} + +func (r ApiGetOverallValuesRequest) Timeframe(timeframe []string) ApiGetOverallValuesRequest { + r.timeframe = &timeframe + return r +} +func (r ApiGetOverallValuesRequest) Filters(filters []string) ApiGetOverallValuesRequest { + r.filters = &filters + return r +} +func (r ApiGetOverallValuesRequest) Measurement(measurement string) ApiGetOverallValuesRequest { + r.measurement = &measurement + return r } -type GetOverallValuesParams struct { - Timeframe []string - Filters []string - Measurement string +func (r ApiGetOverallValuesRequest) Execute() (GetOverallValuesResponse, *_nethttp.Response, error) { + return r.ApiService.GetOverallValuesExecute(r) } -// GetOverallValues optionally accepts the APIOption of WithParams(*GetOverallValuesParams). -func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption) (GetOverallValuesResponse, error) { +/* + * GetOverallValues Get Overall values + * Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param mETRICID ID of the Metric + * @return ApiGetOverallValuesRequest + */ +func (a *MetricsApiService) GetOverallValues(ctx _context.Context, mETRICID string) ApiGetOverallValuesRequest { + return ApiGetOverallValuesRequest{ + ApiService: a, + ctx: ctx, + mETRICID: mETRICID, + } +} + +/* + * Execute executes the request + * @return GetOverallValuesResponse + */ +func (a *MetricsApiService) GetOverallValuesExecute(r ApiGetOverallValuesRequest) (GetOverallValuesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -142,104 +247,148 @@ func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption) localVarReturnValue GetOverallValuesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*GetOverallValuesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *GetOverallValuesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsApiService.GetOverallValues") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/metrics/{METRIC_ID}/overall" - localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", fmt.Sprintf("%v", mETRICID), -1) + localVarPath := localBasePath + "/data/v1/metrics/{METRIC_ID}/overall" + localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.mETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Measurement) { - localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, "")) + if r.measurement != nil { + localVarQueryParams.Add("measurement", parameterToString(*r.measurement, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type ListAllMetricValuesParams struct { - Timeframe []string - Filters []string - Dimension string - Value string +type ApiListAllMetricValuesRequest struct { + ctx _context.Context + ApiService *MetricsApiService + timeframe *[]string + filters *[]string + dimension *string + value *string } -// ListAllMetricValues optionally accepts the APIOption of WithParams(*ListAllMetricValuesParams). -func (a *MetricsApiService) ListAllMetricValues(opts ...APIOption) (ListAllMetricValuesResponse, error) { +func (r ApiListAllMetricValuesRequest) Timeframe(timeframe []string) ApiListAllMetricValuesRequest { + r.timeframe = &timeframe + return r +} +func (r ApiListAllMetricValuesRequest) Filters(filters []string) ApiListAllMetricValuesRequest { + r.filters = &filters + return r +} +func (r ApiListAllMetricValuesRequest) Dimension(dimension string) ApiListAllMetricValuesRequest { + r.dimension = &dimension + return r +} +func (r ApiListAllMetricValuesRequest) Value(value string) ApiListAllMetricValuesRequest { + r.value = &value + return r +} + +func (r ApiListAllMetricValuesRequest) Execute() (ListAllMetricValuesResponse, *_nethttp.Response, error) { + return r.ApiService.ListAllMetricValuesExecute(r) +} + +/* + * ListAllMetricValues List all metric values + * List all of the values across every breakdown for a specific metric + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListAllMetricValuesRequest + */ +func (a *MetricsApiService) ListAllMetricValues(ctx _context.Context) ApiListAllMetricValuesRequest { + return ApiListAllMetricValuesRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListAllMetricValuesResponse + */ +func (a *MetricsApiService) ListAllMetricValuesExecute(r ApiListAllMetricValuesRequest) (ListAllMetricValuesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -247,110 +396,173 @@ func (a *MetricsApiService) ListAllMetricValues(opts ...APIOption) (ListAllMetri localVarReturnValue ListAllMetricValuesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListAllMetricValuesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListAllMetricValuesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsApiService.ListAllMetricValues") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/metrics/comparison" + localVarPath := localBasePath + "/data/v1/metrics/comparison" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Dimension) { - localVarQueryParams.Add("dimension", parameterToString(localVarOptionals.Dimension, "")) + if r.dimension != nil { + localVarQueryParams.Add("dimension", parameterToString(*r.dimension, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Value) { - localVarQueryParams.Add("value", parameterToString(localVarOptionals.Value, "")) + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type ListBreakdownValuesParams struct { - GroupBy string - Measurement string - Filters []string - Limit int32 - Page int32 - OrderBy string - OrderDirection string - Timeframe []string +type ApiListBreakdownValuesRequest struct { + ctx _context.Context + ApiService *MetricsApiService + mETRICID string + groupBy *string + measurement *string + filters *[]string + limit *int32 + page *int32 + orderBy *string + orderDirection *string + timeframe *[]string } -// ListBreakdownValues optionally accepts the APIOption of WithParams(*ListBreakdownValuesParams). -func (a *MetricsApiService) ListBreakdownValues(mETRICID string, opts ...APIOption) (ListBreakdownValuesResponse, error) { +func (r ApiListBreakdownValuesRequest) GroupBy(groupBy string) ApiListBreakdownValuesRequest { + r.groupBy = &groupBy + return r +} +func (r ApiListBreakdownValuesRequest) Measurement(measurement string) ApiListBreakdownValuesRequest { + r.measurement = &measurement + return r +} +func (r ApiListBreakdownValuesRequest) Filters(filters []string) ApiListBreakdownValuesRequest { + r.filters = &filters + return r +} +func (r ApiListBreakdownValuesRequest) Limit(limit int32) ApiListBreakdownValuesRequest { + r.limit = &limit + return r +} +func (r ApiListBreakdownValuesRequest) Page(page int32) ApiListBreakdownValuesRequest { + r.page = &page + return r +} +func (r ApiListBreakdownValuesRequest) OrderBy(orderBy string) ApiListBreakdownValuesRequest { + r.orderBy = &orderBy + return r +} +func (r ApiListBreakdownValuesRequest) OrderDirection(orderDirection string) ApiListBreakdownValuesRequest { + r.orderDirection = &orderDirection + return r +} +func (r ApiListBreakdownValuesRequest) Timeframe(timeframe []string) ApiListBreakdownValuesRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListBreakdownValuesRequest) Execute() (ListBreakdownValuesResponse, *_nethttp.Response, error) { + return r.ApiService.ListBreakdownValuesExecute(r) +} + +/* + * ListBreakdownValues List breakdown values + * List the breakdown values for a specific metric + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param mETRICID ID of the Metric + * @return ApiListBreakdownValuesRequest + */ +func (a *MetricsApiService) ListBreakdownValues(ctx _context.Context, mETRICID string) ApiListBreakdownValuesRequest { + return ApiListBreakdownValuesRequest{ + ApiService: a, + ctx: ctx, + mETRICID: mETRICID, + } +} + +/* + * Execute executes the request + * @return ListBreakdownValuesResponse + */ +func (a *MetricsApiService) ListBreakdownValuesExecute(r ApiListBreakdownValuesRequest) (ListBreakdownValuesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -358,118 +570,161 @@ func (a *MetricsApiService) ListBreakdownValues(mETRICID string, opts ...APIOpti localVarReturnValue ListBreakdownValuesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListBreakdownValuesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListBreakdownValuesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsApiService.ListBreakdownValues") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/metrics/{METRIC_ID}/breakdown" - localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", fmt.Sprintf("%v", mETRICID), -1) + localVarPath := localBasePath + "/data/v1/metrics/{METRIC_ID}/breakdown" + localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.mETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.GroupBy) { - localVarQueryParams.Add("group_by", parameterToString(localVarOptionals.GroupBy, "")) - } - if localVarOptionals != nil && isSet(localVarOptionals.Measurement) { - localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, "")) - } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.groupBy != nil { + localVarQueryParams.Add("group_by", parameterToString(*r.groupBy, "")) + } + if r.measurement != nil { + localVarQueryParams.Add("measurement", parameterToString(*r.measurement, "")) + } + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { - localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + if r.orderBy != nil { + localVarQueryParams.Add("order_by", parameterToString(*r.orderBy, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListInsightsRequest struct { + ctx _context.Context + ApiService *MetricsApiService + mETRICID string + measurement *string + orderDirection *string + timeframe *[]string +} + +func (r ApiListInsightsRequest) Measurement(measurement string) ApiListInsightsRequest { + r.measurement = &measurement + return r +} +func (r ApiListInsightsRequest) OrderDirection(orderDirection string) ApiListInsightsRequest { + r.orderDirection = &orderDirection + return r +} +func (r ApiListInsightsRequest) Timeframe(timeframe []string) ApiListInsightsRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListInsightsRequest) Execute() (ListInsightsResponse, *_nethttp.Response, error) { + return r.ApiService.ListInsightsExecute(r) } -type ListInsightsParams struct { - Measurement string - OrderDirection string - Timeframe []string +/* + * ListInsights List Insights + * Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param mETRICID ID of the Metric + * @return ApiListInsightsRequest + */ +func (a *MetricsApiService) ListInsights(ctx _context.Context, mETRICID string) ApiListInsightsRequest { + return ApiListInsightsRequest{ + ApiService: a, + ctx: ctx, + mETRICID: mETRICID, + } } -// ListInsights optionally accepts the APIOption of WithParams(*ListInsightsParams). -func (a *MetricsApiService) ListInsights(mETRICID string, opts ...APIOption) (ListInsightsResponse, error) { +/* + * Execute executes the request + * @return ListInsightsResponse + */ +func (a *MetricsApiService) ListInsightsExecute(r ApiListInsightsRequest) (ListInsightsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -477,84 +732,85 @@ func (a *MetricsApiService) ListInsights(mETRICID string, opts ...APIOption) (Li localVarReturnValue ListInsightsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListInsightsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListInsightsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsApiService.ListInsights") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/metrics/{METRIC_ID}/insights" - localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", fmt.Sprintf("%v", mETRICID), -1) + localVarPath := localBasePath + "/data/v1/metrics/{METRIC_ID}/insights" + localVarPath = strings.Replace(localVarPath, "{"+"METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.mETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Measurement) { - localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, "")) - } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) - } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.measurement != nil { + localVarQueryParams.Add("measurement", parameterToString(*r.measurement, "")) + } + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) + } + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_playback_id.go b/api_playback_id.go index 1834df3..257890f 100644 --- a/api_playback_id.go +++ b/api_playback_id.go @@ -1,21 +1,66 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" ) +// Linger please +var ( + _ _context.Context +) + +// PlaybackIDApiService PlaybackIDApi service type PlaybackIDApiService service -func (a *PlaybackIDApiService) GetAssetOrLivestreamId(pLAYBACKID string, opts ...APIOption) (GetAssetOrLiveStreamIdResponse, error) { +type ApiGetAssetOrLivestreamIdRequest struct { + ctx _context.Context + ApiService *PlaybackIDApiService + pLAYBACKID string +} + + +func (r ApiGetAssetOrLivestreamIdRequest) Execute() (GetAssetOrLiveStreamIdResponse, *_nethttp.Response, error) { + return r.ApiService.GetAssetOrLivestreamIdExecute(r) +} + +/* + * GetAssetOrLivestreamId Retrieve an Asset or Live Stream ID + * Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param pLAYBACKID The live stream's playback ID. + * @return ApiGetAssetOrLivestreamIdRequest + */ +func (a *PlaybackIDApiService) GetAssetOrLivestreamId(ctx _context.Context, pLAYBACKID string) ApiGetAssetOrLivestreamIdRequest { + return ApiGetAssetOrLivestreamIdRequest{ + ApiService: a, + ctx: ctx, + pLAYBACKID: pLAYBACKID, + } +} + +/* + * Execute executes the request + * @return GetAssetOrLiveStreamIdResponse + */ +func (a *PlaybackIDApiService) GetAssetOrLivestreamIdExecute(r ApiGetAssetOrLivestreamIdRequest) (GetAssetOrLiveStreamIdResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,66 +68,68 @@ func (a *PlaybackIDApiService) GetAssetOrLivestreamId(pLAYBACKID string, opts .. localVarReturnValue GetAssetOrLiveStreamIdResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaybackIDApiService.GetAssetOrLivestreamId") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/playback-ids/{PLAYBACK_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", fmt.Sprintf("%v", pLAYBACKID), -1) + localVarPath := localBasePath + "/video/v1/playback-ids/{PLAYBACK_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", _neturl.PathEscape(parameterToString(r.pLAYBACKID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_real_time.go b/api_real_time.go index 908916d..ff695f5 100644 --- a/api_real_time.go +++ b/api_real_time.go @@ -1,30 +1,92 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// RealTimeApiService RealTimeApi service type RealTimeApiService service -type GetRealtimeBreakdownParams struct { - Dimension string - Timestamp float64 - Filters []string - OrderBy string - OrderDirection string +type ApiGetRealtimeBreakdownRequest struct { + ctx _context.Context + ApiService *RealTimeApiService + rEALTIMEMETRICID string + dimension *string + timestamp *float32 + filters *[]string + orderBy *string + orderDirection *string +} + +func (r ApiGetRealtimeBreakdownRequest) Dimension(dimension string) ApiGetRealtimeBreakdownRequest { + r.dimension = &dimension + return r +} +func (r ApiGetRealtimeBreakdownRequest) Timestamp(timestamp float32) ApiGetRealtimeBreakdownRequest { + r.timestamp = ×tamp + return r +} +func (r ApiGetRealtimeBreakdownRequest) Filters(filters []string) ApiGetRealtimeBreakdownRequest { + r.filters = &filters + return r +} +func (r ApiGetRealtimeBreakdownRequest) OrderBy(orderBy string) ApiGetRealtimeBreakdownRequest { + r.orderBy = &orderBy + return r +} +func (r ApiGetRealtimeBreakdownRequest) OrderDirection(orderDirection string) ApiGetRealtimeBreakdownRequest { + r.orderDirection = &orderDirection + return r +} + +func (r ApiGetRealtimeBreakdownRequest) Execute() (GetRealTimeBreakdownResponse, *_nethttp.Response, error) { + return r.ApiService.GetRealtimeBreakdownExecute(r) } -// GetRealtimeBreakdown optionally accepts the APIOption of WithParams(*GetRealtimeBreakdownParams). -func (a *RealTimeApiService) GetRealtimeBreakdown(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeBreakdownResponse, error) { +/* + * GetRealtimeBreakdown Get Real-Time Breakdown + * Gets breakdown information for a specific dimension and metric along with the number of concurrent viewers and negative impact score. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param rEALTIMEMETRICID ID of the Realtime Metric + * @return ApiGetRealtimeBreakdownRequest + */ +func (a *RealTimeApiService) GetRealtimeBreakdown(ctx _context.Context, rEALTIMEMETRICID string) ApiGetRealtimeBreakdownRequest { + return ApiGetRealtimeBreakdownRequest{ + ApiService: a, + ctx: ctx, + rEALTIMEMETRICID: rEALTIMEMETRICID, + } +} + +/* + * Execute executes the request + * @return GetRealTimeBreakdownResponse + */ +func (a *RealTimeApiService) GetRealtimeBreakdownExecute(r ApiGetRealtimeBreakdownRequest) (GetRealTimeBreakdownResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -32,103 +94,134 @@ func (a *RealTimeApiService) GetRealtimeBreakdown(rEALTIMEMETRICID string, opts localVarReturnValue GetRealTimeBreakdownResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*GetRealtimeBreakdownParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *GetRealtimeBreakdownParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RealTimeApiService.GetRealtimeBreakdown") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown" - localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", fmt.Sprintf("%v", rEALTIMEMETRICID), -1) + localVarPath := localBasePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown" + localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.rEALTIMEMETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Dimension) { - localVarQueryParams.Add("dimension", parameterToString(localVarOptionals.Dimension, "")) - } - if localVarOptionals != nil && isSet(localVarOptionals.Timestamp) { - localVarQueryParams.Add("timestamp", parameterToString(localVarOptionals.Timestamp, "")) - } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.dimension != nil { + localVarQueryParams.Add("dimension", parameterToString(*r.dimension, "")) + } + if r.timestamp != nil { + localVarQueryParams.Add("timestamp", parameterToString(*r.timestamp, "")) + } + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { - localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + if r.orderBy != nil { + localVarQueryParams.Add("order_by", parameterToString(*r.orderBy, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRealtimeHistogramTimeseriesRequest struct { + ctx _context.Context + ApiService *RealTimeApiService + rEALTIMEMETRICID string + filters *[]string } -type GetRealtimeHistogramTimeseriesParams struct { - Filters []string +func (r ApiGetRealtimeHistogramTimeseriesRequest) Filters(filters []string) ApiGetRealtimeHistogramTimeseriesRequest { + r.filters = &filters + return r +} + +func (r ApiGetRealtimeHistogramTimeseriesRequest) Execute() (GetRealTimeHistogramTimeseriesResponse, *_nethttp.Response, error) { + return r.ApiService.GetRealtimeHistogramTimeseriesExecute(r) +} + +/* + * GetRealtimeHistogramTimeseries Get Real-Time Histogram Timeseries + * Gets histogram timeseries information for a specific metric. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param rEALTIMEMETRICID ID of the Realtime Metric + * @return ApiGetRealtimeHistogramTimeseriesRequest + */ +func (a *RealTimeApiService) GetRealtimeHistogramTimeseries(ctx _context.Context, rEALTIMEMETRICID string) ApiGetRealtimeHistogramTimeseriesRequest { + return ApiGetRealtimeHistogramTimeseriesRequest{ + ApiService: a, + ctx: ctx, + rEALTIMEMETRICID: rEALTIMEMETRICID, + } } -// GetRealtimeHistogramTimeseries optionally accepts the APIOption of WithParams(*GetRealtimeHistogramTimeseriesParams). -func (a *RealTimeApiService) GetRealtimeHistogramTimeseries(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeHistogramTimeseriesResponse, error) { +/* + * Execute executes the request + * @return GetRealTimeHistogramTimeseriesResponse + */ +func (a *RealTimeApiService) GetRealtimeHistogramTimeseriesExecute(r ApiGetRealtimeHistogramTimeseriesRequest) (GetRealTimeHistogramTimeseriesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -136,91 +229,122 @@ func (a *RealTimeApiService) GetRealtimeHistogramTimeseries(rEALTIMEMETRICID str localVarReturnValue GetRealTimeHistogramTimeseriesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*GetRealtimeHistogramTimeseriesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *GetRealtimeHistogramTimeseriesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RealTimeApiService.GetRealtimeHistogramTimeseries") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/histogram-timeseries" - localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", fmt.Sprintf("%v", rEALTIMEMETRICID), -1) + localVarPath := localBasePath + "/data/v1/realtime/metrics/{REALTIME_HISTOGRAM_METRIC_ID}/histogram-timeseries" + localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.rEALTIMEMETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRealtimeTimeseriesRequest struct { + ctx _context.Context + ApiService *RealTimeApiService + rEALTIMEMETRICID string + filters *[]string } -type GetRealtimeTimeseriesParams struct { - Filters []string +func (r ApiGetRealtimeTimeseriesRequest) Filters(filters []string) ApiGetRealtimeTimeseriesRequest { + r.filters = &filters + return r } -// GetRealtimeTimeseries optionally accepts the APIOption of WithParams(*GetRealtimeTimeseriesParams). -func (a *RealTimeApiService) GetRealtimeTimeseries(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeTimeseriesResponse, error) { +func (r ApiGetRealtimeTimeseriesRequest) Execute() (GetRealTimeTimeseriesResponse, *_nethttp.Response, error) { + return r.ApiService.GetRealtimeTimeseriesExecute(r) +} + +/* + * GetRealtimeTimeseries Get Real-Time Timeseries + * Gets Time series information for a specific metric along with the number of concurrent viewers. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param rEALTIMEMETRICID ID of the Realtime Metric + * @return ApiGetRealtimeTimeseriesRequest + */ +func (a *RealTimeApiService) GetRealtimeTimeseries(ctx _context.Context, rEALTIMEMETRICID string) ApiGetRealtimeTimeseriesRequest { + return ApiGetRealtimeTimeseriesRequest{ + ApiService: a, + ctx: ctx, + rEALTIMEMETRICID: rEALTIMEMETRICID, + } +} + +/* + * Execute executes the request + * @return GetRealTimeTimeseriesResponse + */ +func (a *RealTimeApiService) GetRealtimeTimeseriesExecute(r ApiGetRealtimeTimeseriesRequest) (GetRealTimeTimeseriesResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -228,86 +352,114 @@ func (a *RealTimeApiService) GetRealtimeTimeseries(rEALTIMEMETRICID string, opts localVarReturnValue GetRealTimeTimeseriesResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*GetRealtimeTimeseriesParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *GetRealtimeTimeseriesParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RealTimeApiService.GetRealtimeTimeseries") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries" - localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", fmt.Sprintf("%v", rEALTIMEMETRICID), -1) + localVarPath := localBasePath + "/data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries" + localVarPath = strings.Replace(localVarPath, "{"+"REALTIME_METRIC_ID"+"}", _neturl.PathEscape(parameterToString(r.rEALTIMEMETRICID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRealtimeDimensionsRequest struct { + ctx _context.Context + ApiService *RealTimeApiService +} + + +func (r ApiListRealtimeDimensionsRequest) Execute() (ListRealTimeDimensionsResponse, *_nethttp.Response, error) { + return r.ApiService.ListRealtimeDimensionsExecute(r) +} + +/* + * ListRealtimeDimensions List Real-Time Dimensions + * Lists availiable real-time dimensions + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListRealtimeDimensionsRequest + */ +func (a *RealTimeApiService) ListRealtimeDimensions(ctx _context.Context) ApiListRealtimeDimensionsRequest { + return ApiListRealtimeDimensionsRequest{ + ApiService: a, + ctx: ctx, + } } -func (a *RealTimeApiService) ListRealtimeDimensions(opts ...APIOption) (ListRealTimeDimensionsResponse, error) { +/* + * Execute executes the request + * @return ListRealTimeDimensionsResponse + */ +func (a *RealTimeApiService) ListRealtimeDimensionsExecute(r ApiListRealtimeDimensionsRequest) (ListRealTimeDimensionsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -315,73 +467,102 @@ func (a *RealTimeApiService) ListRealtimeDimensions(opts ...APIOption) (ListReal localVarReturnValue ListRealTimeDimensionsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RealTimeApiService.ListRealtimeDimensions") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/realtime/dimensions" + localVarPath := localBasePath + "/data/v1/realtime/dimensions" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRealtimeMetricsRequest struct { + ctx _context.Context + ApiService *RealTimeApiService +} + + +func (r ApiListRealtimeMetricsRequest) Execute() (ListRealTimeMetricsResponse, *_nethttp.Response, error) { + return r.ApiService.ListRealtimeMetricsExecute(r) +} + +/* + * ListRealtimeMetrics List Real-Time Metrics + * Lists availiable real-time metrics. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListRealtimeMetricsRequest + */ +func (a *RealTimeApiService) ListRealtimeMetrics(ctx _context.Context) ApiListRealtimeMetricsRequest { + return ApiListRealtimeMetricsRequest{ + ApiService: a, + ctx: ctx, + } } -func (a *RealTimeApiService) ListRealtimeMetrics(opts ...APIOption) (ListRealTimeMetricsResponse, error) { +/* + * Execute executes the request + * @return ListRealTimeMetricsResponse + */ +func (a *RealTimeApiService) ListRealtimeMetricsExecute(r ApiListRealtimeMetricsRequest) (ListRealTimeMetricsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -389,65 +570,67 @@ func (a *RealTimeApiService) ListRealtimeMetrics(opts ...APIOption) (ListRealTim localVarReturnValue ListRealTimeMetricsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RealTimeApiService.ListRealtimeMetrics") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics" + localVarPath := localBasePath + "/data/v1/realtime/metrics" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_url_signing_keys.go b/api_url_signing_keys.go index 36df4b6..a4cb5bd 100644 --- a/api_url_signing_keys.go +++ b/api_url_signing_keys.go @@ -1,21 +1,63 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" ) +// Linger please +var ( + _ _context.Context +) + +// URLSigningKeysApiService URLSigningKeysApi service type URLSigningKeysApiService service -func (a *URLSigningKeysApiService) CreateUrlSigningKey(opts ...APIOption) (SigningKeyResponse, error) { +type ApiCreateUrlSigningKeyRequest struct { + ctx _context.Context + ApiService *URLSigningKeysApiService +} + + +func (r ApiCreateUrlSigningKeyRequest) Execute() (SigningKeyResponse, *_nethttp.Response, error) { + return r.ApiService.CreateUrlSigningKeyExecute(r) +} + +/* + * CreateUrlSigningKey Create a URL signing key + * Creates a new signing key pair. When creating a new signing key, the API will generate a 2048-bit RSA key-pair and return the private key and a generated key-id; the public key will be stored at Mux to validate signed tokens. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateUrlSigningKeyRequest + */ +func (a *URLSigningKeysApiService) CreateUrlSigningKey(ctx _context.Context) ApiCreateUrlSigningKeyRequest { + return ApiCreateUrlSigningKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return SigningKeyResponse + */ +func (a *URLSigningKeysApiService) CreateUrlSigningKeyExecute(r ApiCreateUrlSigningKeyRequest) (SigningKeyResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Post") + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,138 +65,204 @@ func (a *URLSigningKeysApiService) CreateUrlSigningKey(opts ...APIOption) (Signi localVarReturnValue SigningKeyResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "URLSigningKeysApiService.CreateUrlSigningKey") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/signing-keys" + localVarPath := localBasePath + "/video/v1/signing-keys" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteUrlSigningKeyRequest struct { + ctx _context.Context + ApiService *URLSigningKeysApiService + sIGNINGKEYID string +} + + +func (r ApiDeleteUrlSigningKeyRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteUrlSigningKeyExecute(r) +} + +/* + * DeleteUrlSigningKey Delete a URL signing key + * Deletes an existing signing key. Use with caution, as this will invalidate any existing signatures and no URLs can be signed using the key again. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sIGNINGKEYID The ID of the signing key. + * @return ApiDeleteUrlSigningKeyRequest + */ +func (a *URLSigningKeysApiService) DeleteUrlSigningKey(ctx _context.Context, sIGNINGKEYID string) ApiDeleteUrlSigningKeyRequest { + return ApiDeleteUrlSigningKeyRequest{ + ApiService: a, + ctx: ctx, + sIGNINGKEYID: sIGNINGKEYID, + } } -func (a *URLSigningKeysApiService) DeleteUrlSigningKey(sIGNINGKEYID string, opts ...APIOption) error { +/* + * Execute executes the request + */ +func (a *URLSigningKeysApiService) DeleteUrlSigningKeyExecute(r ApiDeleteUrlSigningKeyRequest) (*_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Delete") + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "URLSigningKeysApiService.DeleteUrlSigningKey") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/signing-keys/{SIGNING_KEY_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"SIGNING_KEY_ID"+"}", fmt.Sprintf("%v", sIGNINGKEYID), -1) + localVarPath := localBasePath + "/video/v1/signing-keys/{SIGNING_KEY_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"SIGNING_KEY_ID"+"}", _neturl.PathEscape(parameterToString(r.sIGNINGKEYID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return err + return localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr } - return nil + return localVarHTTPResponse, nil +} + +type ApiGetUrlSigningKeyRequest struct { + ctx _context.Context + ApiService *URLSigningKeysApiService + sIGNINGKEYID string +} + + +func (r ApiGetUrlSigningKeyRequest) Execute() (SigningKeyResponse, *_nethttp.Response, error) { + return r.ApiService.GetUrlSigningKeyExecute(r) +} + +/* + * GetUrlSigningKey Retrieve a URL signing key + * Retrieves the details of a URL signing key that has previously +been created. Supply the unique signing key ID that was returned from your +previous request, and Mux will return the corresponding signing key information. +**The private key is not returned in this response.** + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sIGNINGKEYID The ID of the signing key. + * @return ApiGetUrlSigningKeyRequest + */ +func (a *URLSigningKeysApiService) GetUrlSigningKey(ctx _context.Context, sIGNINGKEYID string) ApiGetUrlSigningKeyRequest { + return ApiGetUrlSigningKeyRequest{ + ApiService: a, + ctx: ctx, + sIGNINGKEYID: sIGNINGKEYID, + } } -func (a *URLSigningKeysApiService) GetUrlSigningKey(sIGNINGKEYID string, opts ...APIOption) (SigningKeyResponse, error) { +/* + * Execute executes the request + * @return SigningKeyResponse + */ +func (a *URLSigningKeysApiService) GetUrlSigningKeyExecute(r ApiGetUrlSigningKeyRequest) (SigningKeyResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -162,80 +270,113 @@ func (a *URLSigningKeysApiService) GetUrlSigningKey(sIGNINGKEYID string, opts .. localVarReturnValue SigningKeyResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "URLSigningKeysApiService.GetUrlSigningKey") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/signing-keys/{SIGNING_KEY_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"SIGNING_KEY_ID"+"}", fmt.Sprintf("%v", sIGNINGKEYID), -1) + localVarPath := localBasePath + "/video/v1/signing-keys/{SIGNING_KEY_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"SIGNING_KEY_ID"+"}", _neturl.PathEscape(parameterToString(r.sIGNINGKEYID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListUrlSigningKeysRequest struct { + ctx _context.Context + ApiService *URLSigningKeysApiService + limit *int32 + page *int32 +} + +func (r ApiListUrlSigningKeysRequest) Limit(limit int32) ApiListUrlSigningKeysRequest { + r.limit = &limit + return r +} +func (r ApiListUrlSigningKeysRequest) Page(page int32) ApiListUrlSigningKeysRequest { + r.page = &page + return r +} + +func (r ApiListUrlSigningKeysRequest) Execute() (ListSigningKeysResponse, *_nethttp.Response, error) { + return r.ApiService.ListUrlSigningKeysExecute(r) } -type ListUrlSigningKeysParams struct { - Limit int32 - Page int32 +/* + * ListUrlSigningKeys List URL signing keys + * Returns a list of URL signing keys. + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListUrlSigningKeysRequest + */ +func (a *URLSigningKeysApiService) ListUrlSigningKeys(ctx _context.Context) ApiListUrlSigningKeysRequest { + return ApiListUrlSigningKeysRequest{ + ApiService: a, + ctx: ctx, + } } -// ListUrlSigningKeys optionally accepts the APIOption of WithParams(*ListUrlSigningKeysParams). -func (a *URLSigningKeysApiService) ListUrlSigningKeys(opts ...APIOption) (ListSigningKeysResponse, error) { +/* + * Execute executes the request + * @return ListSigningKeysResponse + */ +func (a *URLSigningKeysApiService) ListUrlSigningKeysExecute(r ApiListUrlSigningKeysRequest) (ListSigningKeysResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -243,76 +384,73 @@ func (a *URLSigningKeysApiService) ListUrlSigningKeys(opts ...APIOption) (ListSi localVarReturnValue ListSigningKeysResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListUrlSigningKeysParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListUrlSigningKeysParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "URLSigningKeysApiService.ListUrlSigningKeys") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/video/v1/signing-keys" + localVarPath := localBasePath + "/video/v1/signing-keys" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/api_video_views.go b/api_video_views.go index 09bbd51..5bae615 100644 --- a/api_video_views.go +++ b/api_video_views.go @@ -1,21 +1,67 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "fmt" - "io/ioutil" - "net/url" + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" "strings" + "reflect" +) + +// Linger please +var ( + _ _context.Context ) +// VideoViewsApiService VideoViewsApi service type VideoViewsApiService service -func (a *VideoViewsApiService) GetVideoView(vIDEOVIEWID string, opts ...APIOption) (VideoViewResponse, error) { +type ApiGetVideoViewRequest struct { + ctx _context.Context + ApiService *VideoViewsApiService + vIDEOVIEWID string +} + + +func (r ApiGetVideoViewRequest) Execute() (VideoViewResponse, *_nethttp.Response, error) { + return r.ApiService.GetVideoViewExecute(r) +} + +/* + * GetVideoView Get a Video View + * Returns the details of a video view + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param vIDEOVIEWID ID of the Video View + * @return ApiGetVideoViewRequest + */ +func (a *VideoViewsApiService) GetVideoView(ctx _context.Context, vIDEOVIEWID string) ApiGetVideoViewRequest { + return ApiGetVideoViewRequest{ + ApiService: a, + ctx: ctx, + vIDEOVIEWID: vIDEOVIEWID, + } +} + +/* + * Execute executes the request + * @return VideoViewResponse + */ +func (a *VideoViewsApiService) GetVideoViewExecute(r ApiGetVideoViewRequest) (VideoViewResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -23,85 +69,138 @@ func (a *VideoViewsApiService) GetVideoView(vIDEOVIEWID string, opts ...APIOptio localVarReturnValue VideoViewResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VideoViewsApiService.GetVideoView") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/video-views/{VIDEO_VIEW_ID}" - localVarPath = strings.Replace(localVarPath, "{"+"VIDEO_VIEW_ID"+"}", fmt.Sprintf("%v", vIDEOVIEWID), -1) + localVarPath := localBasePath + "/data/v1/video-views/{VIDEO_VIEW_ID}" + localVarPath = strings.Replace(localVarPath, "{"+"VIDEO_VIEW_ID"+"}", _neturl.PathEscape(parameterToString(r.vIDEOVIEWID, "")), -1) localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListVideoViewsRequest struct { + ctx _context.Context + ApiService *VideoViewsApiService + limit *int32 + page *int32 + viewerId *string + errorId *int32 + orderDirection *string + filters *[]string + timeframe *[]string } -type ListVideoViewsParams struct { - Limit int32 - Page int32 - ViewerId string - ErrorId int32 - OrderDirection string - Filters []string - Timeframe []string +func (r ApiListVideoViewsRequest) Limit(limit int32) ApiListVideoViewsRequest { + r.limit = &limit + return r +} +func (r ApiListVideoViewsRequest) Page(page int32) ApiListVideoViewsRequest { + r.page = &page + return r +} +func (r ApiListVideoViewsRequest) ViewerId(viewerId string) ApiListVideoViewsRequest { + r.viewerId = &viewerId + return r +} +func (r ApiListVideoViewsRequest) ErrorId(errorId int32) ApiListVideoViewsRequest { + r.errorId = &errorId + return r +} +func (r ApiListVideoViewsRequest) OrderDirection(orderDirection string) ApiListVideoViewsRequest { + r.orderDirection = &orderDirection + return r +} +func (r ApiListVideoViewsRequest) Filters(filters []string) ApiListVideoViewsRequest { + r.filters = &filters + return r +} +func (r ApiListVideoViewsRequest) Timeframe(timeframe []string) ApiListVideoViewsRequest { + r.timeframe = &timeframe + return r +} + +func (r ApiListVideoViewsRequest) Execute() (ListVideoViewsResponse, *_nethttp.Response, error) { + return r.ApiService.ListVideoViewsExecute(r) } -// ListVideoViews optionally accepts the APIOption of WithParams(*ListVideoViewsParams). -func (a *VideoViewsApiService) ListVideoViews(opts ...APIOption) (ListVideoViewsResponse, error) { +/* + * ListVideoViews List Video Views + * Returns a list of video views + + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListVideoViewsRequest + */ +func (a *VideoViewsApiService) ListVideoViews(ctx _context.Context) ApiListVideoViewsRequest { + return ApiListVideoViewsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ListVideoViewsResponse + */ +func (a *VideoViewsApiService) ListVideoViewsExecute(r ApiListVideoViewsRequest) (ListVideoViewsResponse, *_nethttp.Response, error) { var ( - localVarAPIOptions = new(APIOptions) - localVarHttpMethod = strings.ToUpper("Get") + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string @@ -109,99 +208,104 @@ func (a *VideoViewsApiService) ListVideoViews(opts ...APIOption) (ListVideoViews localVarReturnValue ListVideoViewsResponse ) - for _, opt := range opts { - opt(localVarAPIOptions) - } - - localVarOptionals, ok := localVarAPIOptions.params.(*ListVideoViewsParams) - if localVarAPIOptions.params != nil && !ok { - return localVarReturnValue, reportError("provided params were not of type *ListVideoViewsParams") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VideoViewsApiService.ListVideoViews") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - // create path and map variables - localVarPath := a.client.cfg.basePath + "/data/v1/video-views" + localVarPath := localBasePath + "/data/v1/video-views" localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} - if localVarOptionals != nil && isSet(localVarOptionals.Limit) { - localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Page) { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.ViewerId) { - localVarQueryParams.Add("viewer_id", parameterToString(localVarOptionals.ViewerId, "")) + if r.viewerId != nil { + localVarQueryParams.Add("viewer_id", parameterToString(*r.viewerId, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.ErrorId) { - localVarQueryParams.Add("error_id", parameterToString(localVarOptionals.ErrorId, "")) + if r.errorId != nil { + localVarQueryParams.Add("error_id", parameterToString(*r.errorId, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { - localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + if r.orderDirection != nil { + localVarQueryParams.Add("order_direction", parameterToString(*r.orderDirection, "")) } - if localVarOptionals != nil && isSet(localVarOptionals.Filters) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Filters { - localVarQueryParams.Add("filters[]", v) + if r.filters != nil { + t := *r.filters + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("filters[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("filters[]", parameterToString(t, "multi")) } } - if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { - // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. - // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. - for _, v := range localVarOptionals.Timeframe { - localVarQueryParams.Add("timeframe[]", v) + if r.timeframe != nil { + t := *r.timeframe + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("timeframe[]", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("timeframe[]", parameterToString(t, "multi")) } } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHTTPContentTypes := []string{} // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - - r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, err + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return localVarReturnValue, localVarHTTPResponse, err } - // Check for common HTTP error status codes - err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) - if err != nil { - return localVarReturnValue, err + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, error: err.Error(), } - return localVarReturnValue, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/client.go b/client.go index caeb18e..b513590 100644 --- a/client.go +++ b/client.go @@ -1,5 +1,12 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo @@ -11,8 +18,10 @@ import ( "errors" "fmt" "io" + "log" "mime/multipart" "net/http" + "net/http/httputil" "net/url" "os" "path/filepath" @@ -22,48 +31,65 @@ import ( "strings" "time" "unicode/utf8" + + "golang.org/x/oauth2" ) var ( - jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") - xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) // APIClient manages communication with the Mux API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration - httpc *http.Client common service // Reuse a single struct instead of allocating one for each service on the heap. // API Services - AssetsApi *AssetsApiService - DeliveryUsageApi *DeliveryUsageApiService - DimensionsApi *DimensionsApiService - DirectUploadsApi *DirectUploadsApiService - ErrorsApi *ErrorsApiService - ExportsApi *ExportsApiService - FiltersApi *FiltersApiService - IncidentsApi *IncidentsApiService - LiveStreamsApi *LiveStreamsApiService - MetricsApi *MetricsApiService - PlaybackIDApi *PlaybackIDApiService - RealTimeApi *RealTimeApiService + + AssetsApi *AssetsApiService + + DeliveryUsageApi *DeliveryUsageApiService + + DimensionsApi *DimensionsApiService + + DirectUploadsApi *DirectUploadsApiService + + ErrorsApi *ErrorsApiService + + ExportsApi *ExportsApiService + + FiltersApi *FiltersApiService + + IncidentsApi *IncidentsApiService + + LiveStreamsApi *LiveStreamsApiService + + MetricsApi *MetricsApiService + + PlaybackIDApi *PlaybackIDApiService + + RealTimeApi *RealTimeApiService + URLSigningKeysApi *URLSigningKeysApiService - VideoViewsApi *VideoViewsApiService + + VideoViewsApi *VideoViewsApiService } type service struct { client *APIClient } -// NewAPIClient creates a new API client. +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + c := &APIClient{} c.cfg = cfg - c.httpc = &http.Client{ - Timeout: cfg.timeout, - } c.common.client = c // API Services @@ -161,14 +187,50 @@ func parameterToString(obj interface{}, collectionFormat string) string { return fmt.Sprintf("%v", obj) } +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + + // callAPI do the request. func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - return c.httpc.Do(request) + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg } // prepareRequest build the request func (c *APIClient) prepareRequest( - opts *APIOptions, + ctx context.Context, path string, method string, postBody interface{}, headerParams map[string]string, @@ -225,10 +287,11 @@ func (c *APIClient) prepareRequest( if err != nil { return nil, err } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + // Set Content-Length headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) w.Close() @@ -250,6 +313,16 @@ func (c *APIClient) prepareRequest( return nil, err } + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + // Adding Query Param query := url.Query() for k, v := range queryParams { @@ -280,36 +353,68 @@ func (c *APIClient) prepareRequest( localVarRequest.Header = headers } - // Override request host, if applicable - if c.cfg.host != "" { - localVarRequest.Host = c.cfg.host - } - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.userAgent) + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - if opts.ctx != nil { + if ctx != nil { // add context to the request - localVarRequest = localVarRequest.WithContext(opts.ctx) - } + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } - // Basic HTTP Authentication - if c.cfg.username == "" || c.cfg.password == "" { - return nil, errors.New("unauthorized APIClient") } - localVarRequest.SetBasicAuth(c.cfg.username, c.cfg.password) + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } return localVarRequest, nil } func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if strings.Contains(contentType, "application/xml") { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err } return nil - } else if strings.Contains(contentType, "application/json") { - if err = json.Unmarshal(b, v); err != nil { + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{GetActualInstance() interface{}}); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{UnmarshalJSON([]byte) error}); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err!= nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model return err } return nil @@ -356,7 +461,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } else if jsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) } else if xmlCheck.MatchString(contentType) { - xml.NewEncoder(bodyBuf).Encode(body) + err = xml.NewEncoder(bodyBuf).Encode(body) } if err != nil { @@ -391,35 +496,58 @@ func detectContentType(body interface{}) string { return contentType } -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// APIOption sets options for API calls. -type APIOption func(*APIOptions) +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string -// APIOptions wraps internal API call options. -type APIOptions struct { - ctx context.Context - params interface{} +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc } -// WithContext returns an APIOption that sets the context for an API call. -func WithContext(ctx context.Context) APIOption { - return func(o *APIOptions) { - o.ctx = ctx +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() } -} + respCacheControl := parseCacheControl(r.Header) -// WithParams returns an APIOption that sets the params for an API call. The params provided must be the correct type for the call or an error will be thrown by the call. -func WithParams(params interface{}) APIOption { - return func(o *APIOptions) { - o.params = params + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } } + return expires } -func isSet(val interface{}) bool { - return !(val == nil || reflect.DeepEqual(val, reflect.Zero(reflect.TypeOf(val)).Interface())) +func strlen(s string) int { + return utf8.RuneCountInString(s) } // GenericOpenAPIError Provides access to the body, error and model on returned errors. @@ -443,118 +571,3 @@ func (e GenericOpenAPIError) Body() []byte { func (e GenericOpenAPIError) Model() interface{} { return e.model } - -// Below are the custom Mux API Error types, so that users of the SDK can identify -// what issue they're running into more easily. - -// Generic 400 error -type BadRequestError struct { - body []byte - error string -} - -func (e BadRequestError) Error() string { - return e.error -} - -// 401 Error -type UnauthorizedError struct { - body []byte - error string -} - -func (e UnauthorizedError) Error() string { - return e.error -} - -func (e UnauthorizedError) Body() []byte { - return e.body -} - -// 403 Error -type ForbiddenError struct { - body []byte - error string -} - -func (e ForbiddenError) Error() string { - return e.error -} - -func (e ForbiddenError) Body() []byte { - return e.body -} - -// 404 Error -type NotFoundError struct { - body []byte - error string -} - -func (e NotFoundError) Error() string { - return e.error -} - -func (e NotFoundError) Body() []byte { - return e.body -} - -// 429 Error -type TooManyRequestsError struct { - body []byte - error string -} - -func (e TooManyRequestsError) Error() string { - return e.error -} - -func (e TooManyRequestsError) Body() []byte { - return e.body -} - -// 5XX Error -type ServiceError struct { - body []byte - status int - error string -} - -func (e ServiceError) Error() string { - return e.error -} - -func (e ServiceError) Body() []byte { - return e.body -} - -func (e ServiceError) Code() int { - return e.status -} - -// Helper to check for common non-200 errors -func CheckForHttpError(code int, body []byte) error { - - if code >= 200 && code <= 299 { - return nil - } - - switch code { - case 400: - return BadRequestError{body: body, error: "Bad Request"} - case 401: - return UnauthorizedError{body: body, error: "Unauthorized"} - case 403: - return ForbiddenError{body: body, error: "Forbidden"} - case 404: - return NotFoundError{body: body, error: "Not Found"} - case 429: - return TooManyRequestsError{body: body, error: "Too Many Requests"} - } - - if code >= 500 && code <= 599 { - return ServiceError{body: body, status: code, error: "Service Error"} - } - - return GenericOpenAPIError{body: body, error: "Generic Error"} -} diff --git a/configuration.go b/configuration.go index ff1d3b0..1ab316e 100644 --- a/configuration.go +++ b/configuration.go @@ -1,50 +1,230 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( - "time" + "context" + "fmt" + "net/http" + "strings" ) -type Configuration struct { - basePath string `json:"basePath,omitempty"` - host string `json:"host,omitempty"` - userAgent string `json:"userAgent,omitempty"` - username string - password string - timeout time.Duration +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string } -// ConfigurationOption configures the Mux API Client. -type ConfigurationOption func(*Configuration) +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} -func NewConfiguration(opts ...ConfigurationOption) *Configuration { +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { cfg := &Configuration{ - basePath: "https://api.mux.com", - userAgent: "Mux Go | 0.13.0", - } - for _, opt := range opts { - opt(cfg) + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0-rc.1/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://api.mux.com", + Description: "Mux Production Environment", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, } return cfg } -func WithBasicAuth(username, password string) ConfigurationOption { - return func(c *Configuration) { - c.username = username - c.password = password +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) } + return nil, nil } -func WithTimeout(t time.Duration) ConfigurationOption { - return func(c *Configuration) { - c.timeout = t +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } } + return getServerVariables(ctx) } -func WithHost(host string) ConfigurationOption { - return func(c *Configuration) { - c.host = host +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) } diff --git a/docs/AbridgedVideoView.md b/docs/AbridgedVideoView.md index 661d404..90b8acd 100644 --- a/docs/AbridgedVideoView.md +++ b/docs/AbridgedVideoView.md @@ -1,19 +1,315 @@ # AbridgedVideoView ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**ViewerOsFamily** | **string** | | [optional] -**ViewerApplicationName** | **string** | | [optional] -**VideoTitle** | **string** | | [optional] -**TotalRowCount** | **int64** | | [optional] -**PlayerErrorMessage** | **string** | | [optional] -**PlayerErrorCode** | **string** | | [optional] -**ErrorTypeId** | **int32** | | [optional] -**CountryCode** | **string** | | [optional] -**ViewStart** | **string** | | [optional] -**ViewEnd** | **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**ViewerOsFamily** | Pointer to **string** | | [optional] +**ViewerApplicationName** | Pointer to **string** | | [optional] +**VideoTitle** | Pointer to **string** | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**PlayerErrorMessage** | Pointer to **string** | | [optional] +**PlayerErrorCode** | Pointer to **string** | | [optional] +**ErrorTypeId** | Pointer to **int32** | | [optional] +**CountryCode** | Pointer to **string** | | [optional] +**ViewStart** | Pointer to **string** | | [optional] +**ViewEnd** | Pointer to **string** | | [optional] + +## Methods + +### NewAbridgedVideoView + +`func NewAbridgedVideoView() *AbridgedVideoView` + +NewAbridgedVideoView instantiates a new AbridgedVideoView 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 + +### NewAbridgedVideoViewWithDefaults + +`func NewAbridgedVideoViewWithDefaults() *AbridgedVideoView` + +NewAbridgedVideoViewWithDefaults instantiates a new AbridgedVideoView 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 + +### GetId + +`func (o *AbridgedVideoView) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AbridgedVideoView) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AbridgedVideoView) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *AbridgedVideoView) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetViewerOsFamily + +`func (o *AbridgedVideoView) GetViewerOsFamily() string` + +GetViewerOsFamily returns the ViewerOsFamily field if non-nil, zero value otherwise. + +### GetViewerOsFamilyOk + +`func (o *AbridgedVideoView) GetViewerOsFamilyOk() (*string, bool)` + +GetViewerOsFamilyOk returns a tuple with the ViewerOsFamily field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerOsFamily + +`func (o *AbridgedVideoView) SetViewerOsFamily(v string)` + +SetViewerOsFamily sets ViewerOsFamily field to given value. + +### HasViewerOsFamily + +`func (o *AbridgedVideoView) HasViewerOsFamily() bool` + +HasViewerOsFamily returns a boolean if a field has been set. + +### GetViewerApplicationName + +`func (o *AbridgedVideoView) GetViewerApplicationName() string` + +GetViewerApplicationName returns the ViewerApplicationName field if non-nil, zero value otherwise. + +### GetViewerApplicationNameOk + +`func (o *AbridgedVideoView) GetViewerApplicationNameOk() (*string, bool)` + +GetViewerApplicationNameOk returns a tuple with the ViewerApplicationName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerApplicationName + +`func (o *AbridgedVideoView) SetViewerApplicationName(v string)` + +SetViewerApplicationName sets ViewerApplicationName field to given value. + +### HasViewerApplicationName + +`func (o *AbridgedVideoView) HasViewerApplicationName() bool` + +HasViewerApplicationName returns a boolean if a field has been set. + +### GetVideoTitle + +`func (o *AbridgedVideoView) GetVideoTitle() string` + +GetVideoTitle returns the VideoTitle field if non-nil, zero value otherwise. + +### GetVideoTitleOk + +`func (o *AbridgedVideoView) GetVideoTitleOk() (*string, bool)` + +GetVideoTitleOk returns a tuple with the VideoTitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoTitle + +`func (o *AbridgedVideoView) SetVideoTitle(v string)` + +SetVideoTitle sets VideoTitle field to given value. + +### HasVideoTitle + +`func (o *AbridgedVideoView) HasVideoTitle() bool` + +HasVideoTitle returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *AbridgedVideoView) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *AbridgedVideoView) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *AbridgedVideoView) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *AbridgedVideoView) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetPlayerErrorMessage + +`func (o *AbridgedVideoView) GetPlayerErrorMessage() string` + +GetPlayerErrorMessage returns the PlayerErrorMessage field if non-nil, zero value otherwise. + +### GetPlayerErrorMessageOk + +`func (o *AbridgedVideoView) GetPlayerErrorMessageOk() (*string, bool)` + +GetPlayerErrorMessageOk returns a tuple with the PlayerErrorMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerErrorMessage + +`func (o *AbridgedVideoView) SetPlayerErrorMessage(v string)` + +SetPlayerErrorMessage sets PlayerErrorMessage field to given value. + +### HasPlayerErrorMessage + +`func (o *AbridgedVideoView) HasPlayerErrorMessage() bool` + +HasPlayerErrorMessage returns a boolean if a field has been set. + +### GetPlayerErrorCode + +`func (o *AbridgedVideoView) GetPlayerErrorCode() string` + +GetPlayerErrorCode returns the PlayerErrorCode field if non-nil, zero value otherwise. + +### GetPlayerErrorCodeOk + +`func (o *AbridgedVideoView) GetPlayerErrorCodeOk() (*string, bool)` + +GetPlayerErrorCodeOk returns a tuple with the PlayerErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerErrorCode + +`func (o *AbridgedVideoView) SetPlayerErrorCode(v string)` + +SetPlayerErrorCode sets PlayerErrorCode field to given value. + +### HasPlayerErrorCode + +`func (o *AbridgedVideoView) HasPlayerErrorCode() bool` + +HasPlayerErrorCode returns a boolean if a field has been set. + +### GetErrorTypeId + +`func (o *AbridgedVideoView) GetErrorTypeId() int32` + +GetErrorTypeId returns the ErrorTypeId field if non-nil, zero value otherwise. + +### GetErrorTypeIdOk + +`func (o *AbridgedVideoView) GetErrorTypeIdOk() (*int32, bool)` + +GetErrorTypeIdOk returns a tuple with the ErrorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorTypeId + +`func (o *AbridgedVideoView) SetErrorTypeId(v int32)` + +SetErrorTypeId sets ErrorTypeId field to given value. + +### HasErrorTypeId + +`func (o *AbridgedVideoView) HasErrorTypeId() bool` + +HasErrorTypeId returns a boolean if a field has been set. + +### GetCountryCode + +`func (o *AbridgedVideoView) GetCountryCode() string` + +GetCountryCode returns the CountryCode field if non-nil, zero value otherwise. + +### GetCountryCodeOk + +`func (o *AbridgedVideoView) GetCountryCodeOk() (*string, bool)` + +GetCountryCodeOk returns a tuple with the CountryCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountryCode + +`func (o *AbridgedVideoView) SetCountryCode(v string)` + +SetCountryCode sets CountryCode field to given value. + +### HasCountryCode + +`func (o *AbridgedVideoView) HasCountryCode() bool` + +HasCountryCode returns a boolean if a field has been set. + +### GetViewStart + +`func (o *AbridgedVideoView) GetViewStart() string` + +GetViewStart returns the ViewStart field if non-nil, zero value otherwise. + +### GetViewStartOk + +`func (o *AbridgedVideoView) GetViewStartOk() (*string, bool)` + +GetViewStartOk returns a tuple with the ViewStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewStart + +`func (o *AbridgedVideoView) SetViewStart(v string)` + +SetViewStart sets ViewStart field to given value. + +### HasViewStart + +`func (o *AbridgedVideoView) HasViewStart() bool` + +HasViewStart returns a boolean if a field has been set. + +### GetViewEnd + +`func (o *AbridgedVideoView) GetViewEnd() string` + +GetViewEnd returns the ViewEnd field if non-nil, zero value otherwise. + +### GetViewEndOk + +`func (o *AbridgedVideoView) GetViewEndOk() (*string, bool)` + +GetViewEndOk returns a tuple with the ViewEnd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewEnd + +`func (o *AbridgedVideoView) SetViewEnd(v string)` + +SetViewEnd sets ViewEnd field to given value. + +### HasViewEnd + +`func (o *AbridgedVideoView) HasViewEnd() bool` + +HasViewEnd returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Asset.md b/docs/Asset.md index 484afcb..a5270ba 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -1,32 +1,627 @@ # Asset ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Unique identifier for the Asset. | [optional] -**CreatedAt** | **string** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] -**DeletedAt** | **string** | | [optional] -**Status** | **string** | The status of the asset. | [optional] -**Duration** | **float64** | The duration of the asset in seconds (max duration for a single asset is 24 hours). | [optional] -**MaxStoredResolution** | **string** | The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. | [optional] -**MaxStoredFrameRate** | **float64** | The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. | [optional] -**AspectRatio** | **string** | The aspect ratio of the asset in the form of `width:height`, for example `16:9`. | [optional] -**PlaybackIds** | [**[]PlaybackId**](PlaybackID.md) | | [optional] -**Tracks** | [**[]Track**](Track.md) | | [optional] -**Errors** | [**AssetErrors**](Asset_errors.md) | | [optional] -**PerTitleEncode** | **bool** | | [optional] -**IsLive** | **bool** | Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state. | [optional] -**Passthrough** | **string** | Arbitrary metadata set for the asset. Max 255 characters. | [optional] -**LiveStreamId** | **string** | Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. | [optional] -**Master** | [**AssetMaster**](Asset_master.md) | | [optional] -**MasterAccess** | **string** | | [optional] [default to MASTER_ACCESS_NONE] -**Mp4Support** | **string** | | [optional] [default to MP4_SUPPORT_NONE] -**SourceAssetId** | **string** | Asset Identifier of the video used as the source for creating the clip. | [optional] -**NormalizeAudio** | **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false] -**StaticRenditions** | [**AssetStaticRenditions**](Asset_static_renditions.md) | | [optional] -**RecordingTimes** | [**[]AssetRecordingTimes**](Asset_recording_times.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream | [optional] -**NonStandardInputReasons** | [**AssetNonStandardInputReasons**](Asset_non_standard_input_reasons.md) | | [optional] -**Test** | **bool** | Indicates this asset is a test asset if the value is `true`. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] +**Id** | Pointer to **string** | Unique identifier for the Asset. Max 255 characters. | [optional] +**CreatedAt** | Pointer to **string** | Time the Asset was created, defined as a Unix timestamp (seconds since epoch). | [optional] +**Status** | Pointer to **string** | The status of the asset. | [optional] +**Duration** | Pointer to **float64** | The duration of the asset in seconds (max duration for a single asset is 24 hours). | [optional] +**MaxStoredResolution** | Pointer to **string** | The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. | [optional] +**MaxStoredFrameRate** | Pointer to **float64** | The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. | [optional] +**AspectRatio** | Pointer to **string** | The aspect ratio of the asset in the form of `width:height`, for example `16:9`. | [optional] +**PlaybackIds** | Pointer to [**[]PlaybackID**](PlaybackID.md) | An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/video/play-your-videos) for more details. | [optional] +**Tracks** | Pointer to [**[]Track**](Track.md) | The individual media tracks that make up an asset. | [optional] +**Errors** | Pointer to [**AssetErrors**](Asset_errors.md) | | [optional] +**PerTitleEncode** | Pointer to **bool** | | [optional] +**IsLive** | Pointer to **bool** | Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state. | [optional] +**Passthrough** | Pointer to **string** | Arbitrary metadata set for the asset. Max 255 characters. | [optional] +**LiveStreamId** | Pointer to **string** | Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. | [optional] +**Master** | Pointer to [**AssetMaster**](Asset_master.md) | | [optional] +**MasterAccess** | Pointer to **string** | | [optional] [default to "none"] +**Mp4Support** | Pointer to **string** | | [optional] [default to "none"] +**SourceAssetId** | Pointer to **string** | Asset Identifier of the video used as the source for creating the clip. | [optional] +**NormalizeAudio** | Pointer to **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false] +**StaticRenditions** | Pointer to [**AssetStaticRenditions**](Asset_static_renditions.md) | | [optional] +**RecordingTimes** | Pointer to [**[]AssetRecordingTimes**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream | [optional] +**NonStandardInputReasons** | Pointer to [**AssetNonStandardInputReasons**](Asset_non_standard_input_reasons.md) | | [optional] +**Test** | Pointer to **bool** | True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] + +## Methods + +### NewAsset + +`func NewAsset() *Asset` + +NewAsset instantiates a new Asset 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 + +### NewAssetWithDefaults + +`func NewAssetWithDefaults() *Asset` + +NewAssetWithDefaults instantiates a new Asset 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 + +### GetId + +`func (o *Asset) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Asset) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Asset) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Asset) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Asset) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Asset) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Asset) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Asset) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetStatus + +`func (o *Asset) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Asset) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Asset) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Asset) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDuration + +`func (o *Asset) GetDuration() float64` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *Asset) GetDurationOk() (*float64, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *Asset) SetDuration(v float64)` + +SetDuration sets Duration field to given value. + +### HasDuration + +`func (o *Asset) HasDuration() bool` + +HasDuration returns a boolean if a field has been set. + +### GetMaxStoredResolution + +`func (o *Asset) GetMaxStoredResolution() string` + +GetMaxStoredResolution returns the MaxStoredResolution field if non-nil, zero value otherwise. + +### GetMaxStoredResolutionOk + +`func (o *Asset) GetMaxStoredResolutionOk() (*string, bool)` + +GetMaxStoredResolutionOk returns a tuple with the MaxStoredResolution field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxStoredResolution + +`func (o *Asset) SetMaxStoredResolution(v string)` + +SetMaxStoredResolution sets MaxStoredResolution field to given value. + +### HasMaxStoredResolution + +`func (o *Asset) HasMaxStoredResolution() bool` + +HasMaxStoredResolution returns a boolean if a field has been set. + +### GetMaxStoredFrameRate + +`func (o *Asset) GetMaxStoredFrameRate() float64` + +GetMaxStoredFrameRate returns the MaxStoredFrameRate field if non-nil, zero value otherwise. + +### GetMaxStoredFrameRateOk + +`func (o *Asset) GetMaxStoredFrameRateOk() (*float64, bool)` + +GetMaxStoredFrameRateOk returns a tuple with the MaxStoredFrameRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxStoredFrameRate + +`func (o *Asset) SetMaxStoredFrameRate(v float64)` + +SetMaxStoredFrameRate sets MaxStoredFrameRate field to given value. + +### HasMaxStoredFrameRate + +`func (o *Asset) HasMaxStoredFrameRate() bool` + +HasMaxStoredFrameRate returns a boolean if a field has been set. + +### GetAspectRatio + +`func (o *Asset) GetAspectRatio() string` + +GetAspectRatio returns the AspectRatio field if non-nil, zero value otherwise. + +### GetAspectRatioOk + +`func (o *Asset) GetAspectRatioOk() (*string, bool)` + +GetAspectRatioOk returns a tuple with the AspectRatio field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAspectRatio + +`func (o *Asset) SetAspectRatio(v string)` + +SetAspectRatio sets AspectRatio field to given value. + +### HasAspectRatio + +`func (o *Asset) HasAspectRatio() bool` + +HasAspectRatio returns a boolean if a field has been set. + +### GetPlaybackIds + +`func (o *Asset) GetPlaybackIds() []PlaybackID` + +GetPlaybackIds returns the PlaybackIds field if non-nil, zero value otherwise. + +### GetPlaybackIdsOk + +`func (o *Asset) GetPlaybackIdsOk() (*[]PlaybackID, bool)` + +GetPlaybackIdsOk returns a tuple with the PlaybackIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaybackIds + +`func (o *Asset) SetPlaybackIds(v []PlaybackID)` + +SetPlaybackIds sets PlaybackIds field to given value. + +### HasPlaybackIds + +`func (o *Asset) HasPlaybackIds() bool` + +HasPlaybackIds returns a boolean if a field has been set. + +### GetTracks + +`func (o *Asset) GetTracks() []Track` + +GetTracks returns the Tracks field if non-nil, zero value otherwise. + +### GetTracksOk + +`func (o *Asset) GetTracksOk() (*[]Track, bool)` + +GetTracksOk returns a tuple with the Tracks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTracks + +`func (o *Asset) SetTracks(v []Track)` + +SetTracks sets Tracks field to given value. + +### HasTracks + +`func (o *Asset) HasTracks() bool` + +HasTracks returns a boolean if a field has been set. + +### GetErrors + +`func (o *Asset) GetErrors() AssetErrors` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *Asset) GetErrorsOk() (*AssetErrors, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *Asset) SetErrors(v AssetErrors)` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *Asset) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + +### GetPerTitleEncode + +`func (o *Asset) GetPerTitleEncode() bool` + +GetPerTitleEncode returns the PerTitleEncode field if non-nil, zero value otherwise. + +### GetPerTitleEncodeOk + +`func (o *Asset) GetPerTitleEncodeOk() (*bool, bool)` + +GetPerTitleEncodeOk returns a tuple with the PerTitleEncode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerTitleEncode + +`func (o *Asset) SetPerTitleEncode(v bool)` + +SetPerTitleEncode sets PerTitleEncode field to given value. + +### HasPerTitleEncode + +`func (o *Asset) HasPerTitleEncode() bool` + +HasPerTitleEncode returns a boolean if a field has been set. + +### GetIsLive + +`func (o *Asset) GetIsLive() bool` + +GetIsLive returns the IsLive field if non-nil, zero value otherwise. + +### GetIsLiveOk + +`func (o *Asset) GetIsLiveOk() (*bool, bool)` + +GetIsLiveOk returns a tuple with the IsLive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsLive + +`func (o *Asset) SetIsLive(v bool)` + +SetIsLive sets IsLive field to given value. + +### HasIsLive + +`func (o *Asset) HasIsLive() bool` + +HasIsLive returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *Asset) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *Asset) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *Asset) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *Asset) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetLiveStreamId + +`func (o *Asset) GetLiveStreamId() string` + +GetLiveStreamId returns the LiveStreamId field if non-nil, zero value otherwise. + +### GetLiveStreamIdOk + +`func (o *Asset) GetLiveStreamIdOk() (*string, bool)` + +GetLiveStreamIdOk returns a tuple with the LiveStreamId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLiveStreamId + +`func (o *Asset) SetLiveStreamId(v string)` + +SetLiveStreamId sets LiveStreamId field to given value. + +### HasLiveStreamId + +`func (o *Asset) HasLiveStreamId() bool` + +HasLiveStreamId returns a boolean if a field has been set. + +### GetMaster + +`func (o *Asset) GetMaster() AssetMaster` + +GetMaster returns the Master field if non-nil, zero value otherwise. + +### GetMasterOk + +`func (o *Asset) GetMasterOk() (*AssetMaster, bool)` + +GetMasterOk returns a tuple with the Master field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaster + +`func (o *Asset) SetMaster(v AssetMaster)` + +SetMaster sets Master field to given value. + +### HasMaster + +`func (o *Asset) HasMaster() bool` + +HasMaster returns a boolean if a field has been set. + +### GetMasterAccess + +`func (o *Asset) GetMasterAccess() string` + +GetMasterAccess returns the MasterAccess field if non-nil, zero value otherwise. + +### GetMasterAccessOk + +`func (o *Asset) GetMasterAccessOk() (*string, bool)` + +GetMasterAccessOk returns a tuple with the MasterAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterAccess + +`func (o *Asset) SetMasterAccess(v string)` + +SetMasterAccess sets MasterAccess field to given value. + +### HasMasterAccess + +`func (o *Asset) HasMasterAccess() bool` + +HasMasterAccess returns a boolean if a field has been set. + +### GetMp4Support + +`func (o *Asset) GetMp4Support() string` + +GetMp4Support returns the Mp4Support field if non-nil, zero value otherwise. + +### GetMp4SupportOk + +`func (o *Asset) GetMp4SupportOk() (*string, bool)` + +GetMp4SupportOk returns a tuple with the Mp4Support field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMp4Support + +`func (o *Asset) SetMp4Support(v string)` + +SetMp4Support sets Mp4Support field to given value. + +### HasMp4Support + +`func (o *Asset) HasMp4Support() bool` + +HasMp4Support returns a boolean if a field has been set. + +### GetSourceAssetId + +`func (o *Asset) GetSourceAssetId() string` + +GetSourceAssetId returns the SourceAssetId field if non-nil, zero value otherwise. + +### GetSourceAssetIdOk + +`func (o *Asset) GetSourceAssetIdOk() (*string, bool)` + +GetSourceAssetIdOk returns a tuple with the SourceAssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceAssetId + +`func (o *Asset) SetSourceAssetId(v string)` + +SetSourceAssetId sets SourceAssetId field to given value. + +### HasSourceAssetId + +`func (o *Asset) HasSourceAssetId() bool` + +HasSourceAssetId returns a boolean if a field has been set. + +### GetNormalizeAudio + +`func (o *Asset) GetNormalizeAudio() bool` + +GetNormalizeAudio returns the NormalizeAudio field if non-nil, zero value otherwise. + +### GetNormalizeAudioOk + +`func (o *Asset) GetNormalizeAudioOk() (*bool, bool)` + +GetNormalizeAudioOk returns a tuple with the NormalizeAudio field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNormalizeAudio + +`func (o *Asset) SetNormalizeAudio(v bool)` + +SetNormalizeAudio sets NormalizeAudio field to given value. + +### HasNormalizeAudio + +`func (o *Asset) HasNormalizeAudio() bool` + +HasNormalizeAudio returns a boolean if a field has been set. + +### GetStaticRenditions + +`func (o *Asset) GetStaticRenditions() AssetStaticRenditions` + +GetStaticRenditions returns the StaticRenditions field if non-nil, zero value otherwise. + +### GetStaticRenditionsOk + +`func (o *Asset) GetStaticRenditionsOk() (*AssetStaticRenditions, bool)` + +GetStaticRenditionsOk returns a tuple with the StaticRenditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStaticRenditions + +`func (o *Asset) SetStaticRenditions(v AssetStaticRenditions)` + +SetStaticRenditions sets StaticRenditions field to given value. + +### HasStaticRenditions + +`func (o *Asset) HasStaticRenditions() bool` + +HasStaticRenditions returns a boolean if a field has been set. + +### GetRecordingTimes + +`func (o *Asset) GetRecordingTimes() []AssetRecordingTimes` + +GetRecordingTimes returns the RecordingTimes field if non-nil, zero value otherwise. + +### GetRecordingTimesOk + +`func (o *Asset) GetRecordingTimesOk() (*[]AssetRecordingTimes, bool)` + +GetRecordingTimesOk returns a tuple with the RecordingTimes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecordingTimes + +`func (o *Asset) SetRecordingTimes(v []AssetRecordingTimes)` + +SetRecordingTimes sets RecordingTimes field to given value. + +### HasRecordingTimes + +`func (o *Asset) HasRecordingTimes() bool` + +HasRecordingTimes returns a boolean if a field has been set. + +### GetNonStandardInputReasons + +`func (o *Asset) GetNonStandardInputReasons() AssetNonStandardInputReasons` + +GetNonStandardInputReasons returns the NonStandardInputReasons field if non-nil, zero value otherwise. + +### GetNonStandardInputReasonsOk + +`func (o *Asset) GetNonStandardInputReasonsOk() (*AssetNonStandardInputReasons, bool)` + +GetNonStandardInputReasonsOk returns a tuple with the NonStandardInputReasons field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNonStandardInputReasons + +`func (o *Asset) SetNonStandardInputReasons(v AssetNonStandardInputReasons)` + +SetNonStandardInputReasons sets NonStandardInputReasons field to given value. + +### HasNonStandardInputReasons + +`func (o *Asset) HasNonStandardInputReasons() bool` + +HasNonStandardInputReasons returns a boolean if a field has been set. + +### GetTest + +`func (o *Asset) GetTest() bool` + +GetTest returns the Test field if non-nil, zero value otherwise. + +### GetTestOk + +`func (o *Asset) GetTestOk() (*bool, bool)` + +GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTest + +`func (o *Asset) SetTest(v bool)` + +SetTest sets Test field to given value. + +### HasTest + +`func (o *Asset) HasTest() bool` + +HasTest returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetErrors.md b/docs/AssetErrors.md index 936da59..f030b0c 100644 --- a/docs/AssetErrors.md +++ b/docs/AssetErrors.md @@ -1,10 +1,81 @@ # AssetErrors ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | The type of error that occurred for this asset. | [optional] -**Messages** | **[]string** | Error messages with more details. | [optional] +**Type** | Pointer to **string** | The type of error that occurred for this asset. | [optional] +**Messages** | Pointer to **[]string** | Error messages with more details. | [optional] + +## Methods + +### NewAssetErrors + +`func NewAssetErrors() *AssetErrors` + +NewAssetErrors instantiates a new AssetErrors 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 + +### NewAssetErrorsWithDefaults + +`func NewAssetErrorsWithDefaults() *AssetErrors` + +NewAssetErrorsWithDefaults instantiates a new AssetErrors 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 + +### GetType + +`func (o *AssetErrors) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AssetErrors) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AssetErrors) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AssetErrors) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetMessages + +`func (o *AssetErrors) GetMessages() []string` + +GetMessages returns the Messages field if non-nil, zero value otherwise. + +### GetMessagesOk + +`func (o *AssetErrors) GetMessagesOk() (*[]string, bool)` + +GetMessagesOk returns a tuple with the Messages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessages + +`func (o *AssetErrors) SetMessages(v []string)` + +SetMessages sets Messages field to given value. + +### HasMessages + +`func (o *AssetErrors) HasMessages() bool` + +HasMessages returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetMaster.md b/docs/AssetMaster.md index 874e646..b289302 100644 --- a/docs/AssetMaster.md +++ b/docs/AssetMaster.md @@ -1,10 +1,81 @@ # AssetMaster ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | **string** | | [optional] -**Url** | **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Url** | Pointer to **string** | The temporary URL to the master version of the video, as an MP4 file. This URL will expire after 24 hours. | [optional] + +## Methods + +### NewAssetMaster + +`func NewAssetMaster() *AssetMaster` + +NewAssetMaster instantiates a new AssetMaster 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 + +### NewAssetMasterWithDefaults + +`func NewAssetMasterWithDefaults() *AssetMaster` + +NewAssetMasterWithDefaults instantiates a new AssetMaster 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 + +### GetStatus + +`func (o *AssetMaster) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AssetMaster) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *AssetMaster) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *AssetMaster) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetUrl + +`func (o *AssetMaster) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *AssetMaster) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *AssetMaster) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *AssetMaster) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetMasterAccess.md b/docs/AssetMasterAccess.md deleted file mode 100644 index c49357c..0000000 --- a/docs/AssetMasterAccess.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssetMasterAccess - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | **string** | | [optional] -**Url** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AssetNonStandardInputReasons.md b/docs/AssetNonStandardInputReasons.md index 2747d41..e4e2418 100644 --- a/docs/AssetNonStandardInputReasons.md +++ b/docs/AssetNonStandardInputReasons.md @@ -1,17 +1,263 @@ # AssetNonStandardInputReasons ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**VideoCodec** | **string** | The video codec used on the input file. | [optional] -**AudioCodec** | **string** | The audio codec used on the input file. | [optional] -**VideoGopSize** | **string** | The video key frame Interval (also called as Group of Picture or GOP) of the input file. | [optional] -**VideoFrameRate** | **string** | The video frame rate of the input file. | [optional] -**VideoResolution** | **string** | The video resolution of the input file. | [optional] -**PixelAspectRatio** | **string** | The video pixel aspect ratio of the input file. | [optional] -**VideoEditList** | **string** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List. | [optional] -**AudioEditList** | **string** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List. | [optional] -**UnexpectedMediaFileParameters** | **string** | A catch-all reason when the input file in created with non-standard encoding parameters. | [optional] +**VideoCodec** | Pointer to **string** | The video codec used on the input file. For example, the input file encoded with `hevc` video codec is non-standard and the value of this parameter is `hevc`. | [optional] +**AudioCodec** | Pointer to **string** | The audio codec used on the input file. Non-AAC audio codecs are non-standard. | [optional] +**VideoGopSize** | Pointer to **string** | The video key frame Interval (also called as Group of Picture or GOP) of the input file is `high`. This parameter is present when the gop is greater than 10 seconds. | [optional] +**VideoFrameRate** | Pointer to **string** | The video frame rate of the input file. Video with average frames per second (fps) less than 10 or greater than 120 is non-standard. A `-1` frame rate value indicates Mux could not determine the frame rate of the video track. | [optional] +**VideoResolution** | Pointer to **string** | The video resolution of the input file. Video resolution higher than 2048 pixels on any one dimension (height or width) is considered non-standard, The resolution value is presented as `width` x `height` in pixels. | [optional] +**PixelAspectRatio** | Pointer to **string** | The video pixel aspect ratio of the input file. | [optional] +**VideoEditList** | Pointer to **string** | Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List. | [optional] +**AudioEditList** | Pointer to **string** | Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List. | [optional] +**UnexpectedMediaFileParameters** | Pointer to **string** | A catch-all reason when the input file in created with non-standard encoding parameters. | [optional] + +## Methods + +### NewAssetNonStandardInputReasons + +`func NewAssetNonStandardInputReasons() *AssetNonStandardInputReasons` + +NewAssetNonStandardInputReasons instantiates a new AssetNonStandardInputReasons 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 + +### NewAssetNonStandardInputReasonsWithDefaults + +`func NewAssetNonStandardInputReasonsWithDefaults() *AssetNonStandardInputReasons` + +NewAssetNonStandardInputReasonsWithDefaults instantiates a new AssetNonStandardInputReasons 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 + +### GetVideoCodec + +`func (o *AssetNonStandardInputReasons) GetVideoCodec() string` + +GetVideoCodec returns the VideoCodec field if non-nil, zero value otherwise. + +### GetVideoCodecOk + +`func (o *AssetNonStandardInputReasons) GetVideoCodecOk() (*string, bool)` + +GetVideoCodecOk returns a tuple with the VideoCodec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoCodec + +`func (o *AssetNonStandardInputReasons) SetVideoCodec(v string)` + +SetVideoCodec sets VideoCodec field to given value. + +### HasVideoCodec + +`func (o *AssetNonStandardInputReasons) HasVideoCodec() bool` + +HasVideoCodec returns a boolean if a field has been set. + +### GetAudioCodec + +`func (o *AssetNonStandardInputReasons) GetAudioCodec() string` + +GetAudioCodec returns the AudioCodec field if non-nil, zero value otherwise. + +### GetAudioCodecOk + +`func (o *AssetNonStandardInputReasons) GetAudioCodecOk() (*string, bool)` + +GetAudioCodecOk returns a tuple with the AudioCodec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudioCodec + +`func (o *AssetNonStandardInputReasons) SetAudioCodec(v string)` + +SetAudioCodec sets AudioCodec field to given value. + +### HasAudioCodec + +`func (o *AssetNonStandardInputReasons) HasAudioCodec() bool` + +HasAudioCodec returns a boolean if a field has been set. + +### GetVideoGopSize + +`func (o *AssetNonStandardInputReasons) GetVideoGopSize() string` + +GetVideoGopSize returns the VideoGopSize field if non-nil, zero value otherwise. + +### GetVideoGopSizeOk + +`func (o *AssetNonStandardInputReasons) GetVideoGopSizeOk() (*string, bool)` + +GetVideoGopSizeOk returns a tuple with the VideoGopSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoGopSize + +`func (o *AssetNonStandardInputReasons) SetVideoGopSize(v string)` + +SetVideoGopSize sets VideoGopSize field to given value. + +### HasVideoGopSize + +`func (o *AssetNonStandardInputReasons) HasVideoGopSize() bool` + +HasVideoGopSize returns a boolean if a field has been set. + +### GetVideoFrameRate + +`func (o *AssetNonStandardInputReasons) GetVideoFrameRate() string` + +GetVideoFrameRate returns the VideoFrameRate field if non-nil, zero value otherwise. + +### GetVideoFrameRateOk + +`func (o *AssetNonStandardInputReasons) GetVideoFrameRateOk() (*string, bool)` + +GetVideoFrameRateOk returns a tuple with the VideoFrameRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoFrameRate + +`func (o *AssetNonStandardInputReasons) SetVideoFrameRate(v string)` + +SetVideoFrameRate sets VideoFrameRate field to given value. + +### HasVideoFrameRate + +`func (o *AssetNonStandardInputReasons) HasVideoFrameRate() bool` + +HasVideoFrameRate returns a boolean if a field has been set. + +### GetVideoResolution + +`func (o *AssetNonStandardInputReasons) GetVideoResolution() string` + +GetVideoResolution returns the VideoResolution field if non-nil, zero value otherwise. + +### GetVideoResolutionOk + +`func (o *AssetNonStandardInputReasons) GetVideoResolutionOk() (*string, bool)` + +GetVideoResolutionOk returns a tuple with the VideoResolution field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoResolution + +`func (o *AssetNonStandardInputReasons) SetVideoResolution(v string)` + +SetVideoResolution sets VideoResolution field to given value. + +### HasVideoResolution + +`func (o *AssetNonStandardInputReasons) HasVideoResolution() bool` + +HasVideoResolution returns a boolean if a field has been set. + +### GetPixelAspectRatio + +`func (o *AssetNonStandardInputReasons) GetPixelAspectRatio() string` + +GetPixelAspectRatio returns the PixelAspectRatio field if non-nil, zero value otherwise. + +### GetPixelAspectRatioOk + +`func (o *AssetNonStandardInputReasons) GetPixelAspectRatioOk() (*string, bool)` + +GetPixelAspectRatioOk returns a tuple with the PixelAspectRatio field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPixelAspectRatio + +`func (o *AssetNonStandardInputReasons) SetPixelAspectRatio(v string)` + +SetPixelAspectRatio sets PixelAspectRatio field to given value. + +### HasPixelAspectRatio + +`func (o *AssetNonStandardInputReasons) HasPixelAspectRatio() bool` + +HasPixelAspectRatio returns a boolean if a field has been set. + +### GetVideoEditList + +`func (o *AssetNonStandardInputReasons) GetVideoEditList() string` + +GetVideoEditList returns the VideoEditList field if non-nil, zero value otherwise. + +### GetVideoEditListOk + +`func (o *AssetNonStandardInputReasons) GetVideoEditListOk() (*string, bool)` + +GetVideoEditListOk returns a tuple with the VideoEditList field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoEditList + +`func (o *AssetNonStandardInputReasons) SetVideoEditList(v string)` + +SetVideoEditList sets VideoEditList field to given value. + +### HasVideoEditList + +`func (o *AssetNonStandardInputReasons) HasVideoEditList() bool` + +HasVideoEditList returns a boolean if a field has been set. + +### GetAudioEditList + +`func (o *AssetNonStandardInputReasons) GetAudioEditList() string` + +GetAudioEditList returns the AudioEditList field if non-nil, zero value otherwise. + +### GetAudioEditListOk + +`func (o *AssetNonStandardInputReasons) GetAudioEditListOk() (*string, bool)` + +GetAudioEditListOk returns a tuple with the AudioEditList field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudioEditList + +`func (o *AssetNonStandardInputReasons) SetAudioEditList(v string)` + +SetAudioEditList sets AudioEditList field to given value. + +### HasAudioEditList + +`func (o *AssetNonStandardInputReasons) HasAudioEditList() bool` + +HasAudioEditList returns a boolean if a field has been set. + +### GetUnexpectedMediaFileParameters + +`func (o *AssetNonStandardInputReasons) GetUnexpectedMediaFileParameters() string` + +GetUnexpectedMediaFileParameters returns the UnexpectedMediaFileParameters field if non-nil, zero value otherwise. + +### GetUnexpectedMediaFileParametersOk + +`func (o *AssetNonStandardInputReasons) GetUnexpectedMediaFileParametersOk() (*string, bool)` + +GetUnexpectedMediaFileParametersOk returns a tuple with the UnexpectedMediaFileParameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnexpectedMediaFileParameters + +`func (o *AssetNonStandardInputReasons) SetUnexpectedMediaFileParameters(v string)` + +SetUnexpectedMediaFileParameters sets UnexpectedMediaFileParameters field to given value. + +### HasUnexpectedMediaFileParameters + +`func (o *AssetNonStandardInputReasons) HasUnexpectedMediaFileParameters() bool` + +HasUnexpectedMediaFileParameters returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetRecordingTimes.md b/docs/AssetRecordingTimes.md index ffc6b8a..b7407da 100644 --- a/docs/AssetRecordingTimes.md +++ b/docs/AssetRecordingTimes.md @@ -1,10 +1,81 @@ # AssetRecordingTimes ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StartedAt** | [**time.Time**](time.Time.md) | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format. | [optional] -**Duration** | **float64** | The duration of the live stream recorded. The time value is in seconds. | [optional] +**StartedAt** | Pointer to **time.Time** | The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format. | [optional] +**Duration** | Pointer to **float64** | The duration of the live stream recorded. The time value is in seconds. | [optional] + +## Methods + +### NewAssetRecordingTimes + +`func NewAssetRecordingTimes() *AssetRecordingTimes` + +NewAssetRecordingTimes instantiates a new AssetRecordingTimes 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 + +### NewAssetRecordingTimesWithDefaults + +`func NewAssetRecordingTimesWithDefaults() *AssetRecordingTimes` + +NewAssetRecordingTimesWithDefaults instantiates a new AssetRecordingTimes 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 + +### GetStartedAt + +`func (o *AssetRecordingTimes) GetStartedAt() time.Time` + +GetStartedAt returns the StartedAt field if non-nil, zero value otherwise. + +### GetStartedAtOk + +`func (o *AssetRecordingTimes) GetStartedAtOk() (*time.Time, bool)` + +GetStartedAtOk returns a tuple with the StartedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartedAt + +`func (o *AssetRecordingTimes) SetStartedAt(v time.Time)` + +SetStartedAt sets StartedAt field to given value. + +### HasStartedAt + +`func (o *AssetRecordingTimes) HasStartedAt() bool` + +HasStartedAt returns a boolean if a field has been set. + +### GetDuration + +`func (o *AssetRecordingTimes) GetDuration() float64` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *AssetRecordingTimes) GetDurationOk() (*float64, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *AssetRecordingTimes) SetDuration(v float64)` + +SetDuration sets Duration field to given value. + +### HasDuration + +`func (o *AssetRecordingTimes) HasDuration() bool` + +HasDuration returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetResponse.md b/docs/AssetResponse.md index dba1a19..1cf0eae 100644 --- a/docs/AssetResponse.md +++ b/docs/AssetResponse.md @@ -1,9 +1,55 @@ # AssetResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**Asset**](.md) | | [optional] +**Data** | Pointer to [**Asset**](Asset.md) | | [optional] + +## Methods + +### NewAssetResponse + +`func NewAssetResponse() *AssetResponse` + +NewAssetResponse instantiates a new AssetResponse 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 + +### NewAssetResponseWithDefaults + +`func NewAssetResponseWithDefaults() *AssetResponse` + +NewAssetResponseWithDefaults instantiates a new AssetResponse 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 + +### GetData + +`func (o *AssetResponse) GetData() Asset` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AssetResponse) GetDataOk() (*Asset, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *AssetResponse) SetData(v Asset)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AssetResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetStaticRenditions.md b/docs/AssetStaticRenditions.md index 438fa60..9387eb3 100644 --- a/docs/AssetStaticRenditions.md +++ b/docs/AssetStaticRenditions.md @@ -1,10 +1,81 @@ # AssetStaticRenditions ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | **string** | Indicates the status of downloadable MP4 versions of this asset. | [optional] [default to STATUS_DISABLED] -**Files** | [**[]AssetStaticRenditionsFiles**](Asset_static_renditions_files.md) | | [optional] +**Status** | Pointer to **string** | Indicates the status of downloadable MP4 versions of this asset. | [optional] [default to "disabled"] +**Files** | Pointer to [**[]AssetStaticRenditionsFiles**](AssetStaticRenditionsFiles.md) | Array of file objects. | [optional] + +## Methods + +### NewAssetStaticRenditions + +`func NewAssetStaticRenditions() *AssetStaticRenditions` + +NewAssetStaticRenditions instantiates a new AssetStaticRenditions 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 + +### NewAssetStaticRenditionsWithDefaults + +`func NewAssetStaticRenditionsWithDefaults() *AssetStaticRenditions` + +NewAssetStaticRenditionsWithDefaults instantiates a new AssetStaticRenditions 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 + +### GetStatus + +`func (o *AssetStaticRenditions) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AssetStaticRenditions) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *AssetStaticRenditions) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *AssetStaticRenditions) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetFiles + +`func (o *AssetStaticRenditions) GetFiles() []AssetStaticRenditionsFiles` + +GetFiles returns the Files field if non-nil, zero value otherwise. + +### GetFilesOk + +`func (o *AssetStaticRenditions) GetFilesOk() (*[]AssetStaticRenditionsFiles, bool)` + +GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFiles + +`func (o *AssetStaticRenditions) SetFiles(v []AssetStaticRenditionsFiles)` + +SetFiles sets Files field to given value. + +### HasFiles + +`func (o *AssetStaticRenditions) HasFiles() bool` + +HasFiles returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetStaticRenditionsFiles.md b/docs/AssetStaticRenditionsFiles.md index 69da129..82b5b4c 100644 --- a/docs/AssetStaticRenditionsFiles.md +++ b/docs/AssetStaticRenditionsFiles.md @@ -1,14 +1,185 @@ # AssetStaticRenditionsFiles ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] -**Ext** | **string** | Extension of the static rendition file | [optional] -**Height** | **int32** | The height of the static rendition's file in pixels | [optional] -**Width** | **int32** | The width of the static rendition's file in pixels | [optional] -**Bitrate** | **int64** | The bitrate in bits per second | [optional] -**Filesize** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Ext** | Pointer to **string** | Extension of the static rendition file | [optional] +**Height** | Pointer to **int32** | The height of the static rendition's file in pixels | [optional] +**Width** | Pointer to **int32** | The width of the static rendition's file in pixels | [optional] +**Bitrate** | Pointer to **int64** | The bitrate in bits per second | [optional] +**Filesize** | Pointer to **string** | The file size in bytes | [optional] + +## Methods + +### NewAssetStaticRenditionsFiles + +`func NewAssetStaticRenditionsFiles() *AssetStaticRenditionsFiles` + +NewAssetStaticRenditionsFiles instantiates a new AssetStaticRenditionsFiles 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 + +### NewAssetStaticRenditionsFilesWithDefaults + +`func NewAssetStaticRenditionsFilesWithDefaults() *AssetStaticRenditionsFiles` + +NewAssetStaticRenditionsFilesWithDefaults instantiates a new AssetStaticRenditionsFiles 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 + +### GetName + +`func (o *AssetStaticRenditionsFiles) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AssetStaticRenditionsFiles) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AssetStaticRenditionsFiles) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AssetStaticRenditionsFiles) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetExt + +`func (o *AssetStaticRenditionsFiles) GetExt() string` + +GetExt returns the Ext field if non-nil, zero value otherwise. + +### GetExtOk + +`func (o *AssetStaticRenditionsFiles) GetExtOk() (*string, bool)` + +GetExtOk returns a tuple with the Ext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExt + +`func (o *AssetStaticRenditionsFiles) SetExt(v string)` + +SetExt sets Ext field to given value. + +### HasExt + +`func (o *AssetStaticRenditionsFiles) HasExt() bool` + +HasExt returns a boolean if a field has been set. + +### GetHeight + +`func (o *AssetStaticRenditionsFiles) GetHeight() int32` + +GetHeight returns the Height field if non-nil, zero value otherwise. + +### GetHeightOk + +`func (o *AssetStaticRenditionsFiles) GetHeightOk() (*int32, bool)` + +GetHeightOk returns a tuple with the Height field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeight + +`func (o *AssetStaticRenditionsFiles) SetHeight(v int32)` + +SetHeight sets Height field to given value. + +### HasHeight + +`func (o *AssetStaticRenditionsFiles) HasHeight() bool` + +HasHeight returns a boolean if a field has been set. + +### GetWidth + +`func (o *AssetStaticRenditionsFiles) GetWidth() int32` + +GetWidth returns the Width field if non-nil, zero value otherwise. + +### GetWidthOk + +`func (o *AssetStaticRenditionsFiles) GetWidthOk() (*int32, bool)` + +GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWidth + +`func (o *AssetStaticRenditionsFiles) SetWidth(v int32)` + +SetWidth sets Width field to given value. + +### HasWidth + +`func (o *AssetStaticRenditionsFiles) HasWidth() bool` + +HasWidth returns a boolean if a field has been set. + +### GetBitrate + +`func (o *AssetStaticRenditionsFiles) GetBitrate() int64` + +GetBitrate returns the Bitrate field if non-nil, zero value otherwise. + +### GetBitrateOk + +`func (o *AssetStaticRenditionsFiles) GetBitrateOk() (*int64, bool)` + +GetBitrateOk returns a tuple with the Bitrate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBitrate + +`func (o *AssetStaticRenditionsFiles) SetBitrate(v int64)` + +SetBitrate sets Bitrate field to given value. + +### HasBitrate + +`func (o *AssetStaticRenditionsFiles) HasBitrate() bool` + +HasBitrate returns a boolean if a field has been set. + +### GetFilesize + +`func (o *AssetStaticRenditionsFiles) GetFilesize() string` + +GetFilesize returns the Filesize field if non-nil, zero value otherwise. + +### GetFilesizeOk + +`func (o *AssetStaticRenditionsFiles) GetFilesizeOk() (*string, bool)` + +GetFilesizeOk returns a tuple with the Filesize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilesize + +`func (o *AssetStaticRenditionsFiles) SetFilesize(v string)` + +SetFilesize sets Filesize field to given value. + +### HasFilesize + +`func (o *AssetStaticRenditionsFiles) HasFilesize() bool` + +HasFilesize returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index ae81996..7b04482 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -18,18 +18,54 @@ Method | HTTP request | Description [**UpdateAssetMp4Support**](AssetsApi.md#UpdateAssetMp4Support) | **Put** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support -# **CreateAsset** -> AssetResponse CreateAsset(ctx, createAssetRequest) + +## CreateAsset + +> AssetResponse CreateAsset(ctx).CreateAssetRequest(createAssetRequest).Execute() + Create an asset -Create a new Mux Video asset. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + createAssetRequest := *openapiclient.NewCreateAssetRequest() // CreateAssetRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.CreateAsset(context.Background()).CreateAssetRequest(createAssetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.CreateAsset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAsset`: AssetResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.CreateAsset`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAssetRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **createAssetRequest** | [**CreateAssetRequest**](CreateAssetRequest.md)| | + **createAssetRequest** | [**CreateAssetRequest**](CreateAssetRequest.md) | | ### Return type @@ -41,26 +77,69 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## CreateAssetPlaybackId + +> CreatePlaybackIDResponse CreateAssetPlaybackId(ctx, aSSETID).CreatePlaybackIDRequest(createPlaybackIDRequest).Execute() -# **CreateAssetPlaybackId** -> CreatePlaybackIdResponse CreateAssetPlaybackId(ctx, aSSETID, createPlaybackIdRequest) Create a playback ID -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + createPlaybackIDRequest := *openapiclient.NewCreatePlaybackIDRequest() // CreatePlaybackIDRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.CreateAssetPlaybackId(context.Background(), aSSETID).CreatePlaybackIDRequest(createPlaybackIDRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.CreateAssetPlaybackId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAssetPlaybackId`: CreatePlaybackIDResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.CreateAssetPlaybackId`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **createPlaybackIdRequest** | [**CreatePlaybackIdRequest**](CreatePlaybackIdRequest.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAssetPlaybackIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createPlaybackIDRequest** | [**CreatePlaybackIDRequest**](CreatePlaybackIDRequest.md) | | ### Return type -[**CreatePlaybackIdResponse**](CreatePlaybackIDResponse.md) +[**CreatePlaybackIDResponse**](CreatePlaybackIDResponse.md) ### Authorization @@ -68,22 +147,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CreateAssetTrack** -> CreateTrackResponse CreateAssetTrack(ctx, aSSETID, createTrackRequest) +## CreateAssetTrack + +> CreateTrackResponse CreateAssetTrack(ctx, aSSETID).CreateTrackRequest(createTrackRequest).Execute() + Create an asset track -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + createTrackRequest := *openapiclient.NewCreateTrackRequest("Url_example", "Type_example", "TextType_example", "LanguageCode_example") // CreateTrackRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.CreateAssetTrack(context.Background(), aSSETID).CreateTrackRequest(createTrackRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.CreateAssetTrack``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAssetTrack`: CreateTrackResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.CreateAssetTrack`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAssetTrackRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **createTrackRequest** | [**CreateTrackRequest**](CreateTrackRequest.md)| | + + **createTrackRequest** | [**CreateTrackRequest**](CreateTrackRequest.md) | | ### Return type @@ -95,23 +217,63 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAsset -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> DeleteAsset(ctx, aSSETID).Execute() -# **DeleteAsset** -> DeleteAsset(ctx, aSSETID) Delete an asset -Deletes a video asset and all its data -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.DeleteAsset(context.Background(), aSSETID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.DeleteAsset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAssetRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | + ### Return type @@ -123,22 +285,64 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## DeleteAssetPlaybackId + +> DeleteAssetPlaybackId(ctx, aSSETID, pLAYBACKID).Execute() -# **DeleteAssetPlaybackId** -> DeleteAssetPlaybackId(ctx, aSSETID, pLAYBACKID) Delete a playback ID -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + pLAYBACKID := "pLAYBACKID_example" // string | The live stream's playback ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.DeleteAssetPlaybackId(context.Background(), aSSETID, pLAYBACKID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.DeleteAssetPlaybackId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **pLAYBACKID** | **string**| The live stream's playback ID. | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | +**pLAYBACKID** | **string** | The live stream's playback ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAssetPlaybackIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + ### Return type @@ -150,22 +354,64 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAssetTrack + +> DeleteAssetTrack(ctx, aSSETID, tRACKID).Execute() -# **DeleteAssetTrack** -> DeleteAssetTrack(ctx, aSSETID, tRACKID) Delete an asset track -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + tRACKID := "tRACKID_example" // string | The track ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.DeleteAssetTrack(context.Background(), aSSETID, tRACKID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.DeleteAssetTrack``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | +**tRACKID** | **string** | The track ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAssetTrackRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **tRACKID** | **string**| The track ID. | + + ### Return type @@ -177,23 +423,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetAsset** -> AssetResponse GetAsset(ctx, aSSETID) +## GetAsset + +> AssetResponse GetAsset(ctx, aSSETID).Execute() + Retrieve an asset -Retrieves the details of an asset that has previously been created. Supply the unique asset ID that was returned from your previous request, and Mux will return the corresponding asset information. The same information is returned when creating an asset. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.GetAsset(context.Background(), aSSETID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.GetAsset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAsset`: AssetResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.GetAsset`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -205,23 +493,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAssetInputInfo -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> GetAssetInputInfoResponse GetAssetInputInfo(ctx, aSSETID).Execute() -# **GetAssetInputInfo** -> GetAssetInputInfoResponse GetAssetInputInfo(ctx, aSSETID) Retrieve asset input info -Returns a list of the input objects that were used to create the asset along with any settings that were applied to each input. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.GetAssetInputInfo(context.Background(), aSSETID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.GetAssetInputInfo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAssetInputInfo`: GetAssetInputInfoResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.GetAssetInputInfo`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssetInputInfoRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | + ### Return type @@ -233,26 +563,70 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetAssetPlaybackId** -> GetAssetPlaybackIdResponse GetAssetPlaybackId(ctx, aSSETID, pLAYBACKID) +## GetAssetPlaybackId + +> GetAssetPlaybackIDResponse GetAssetPlaybackId(ctx, aSSETID, pLAYBACKID).Execute() + Retrieve a playback ID -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + pLAYBACKID := "pLAYBACKID_example" // string | The live stream's playback ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.GetAssetPlaybackId(context.Background(), aSSETID, pLAYBACKID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.GetAssetPlaybackId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAssetPlaybackId`: GetAssetPlaybackIDResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.GetAssetPlaybackId`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | +**pLAYBACKID** | **string** | The live stream's playback ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssetPlaybackIdRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **pLAYBACKID** | **string**| The live stream's playback ID. | + + ### Return type -[**GetAssetPlaybackIdResponse**](GetAssetPlaybackIDResponse.md) +[**GetAssetPlaybackIDResponse**](GetAssetPlaybackIDResponse.md) ### Authorization @@ -260,31 +634,63 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAssets -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> ListAssetsResponse ListAssets(ctx).Limit(limit).Page(page).Execute() -# **ListAssets** -> ListAssetsResponse ListAssets(ctx, optional) List assets -List all Mux assets. -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListAssetsOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.ListAssets(context.Background()).Limit(limit).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.ListAssets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAssets`: ListAssetsResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.ListAssets`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAssetsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListAssetsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] ### Return type @@ -296,24 +702,67 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **UpdateAssetMasterAccess** -> AssetResponse UpdateAssetMasterAccess(ctx, aSSETID, updateAssetMasterAccessRequest) +## UpdateAssetMasterAccess + +> AssetResponse UpdateAssetMasterAccess(ctx, aSSETID).UpdateAssetMasterAccessRequest(updateAssetMasterAccessRequest).Execute() + Update master access -Allows you add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to \"none\". This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + updateAssetMasterAccessRequest := *openapiclient.NewUpdateAssetMasterAccessRequest() // UpdateAssetMasterAccessRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.UpdateAssetMasterAccess(context.Background(), aSSETID).UpdateAssetMasterAccessRequest(updateAssetMasterAccessRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.UpdateAssetMasterAccess``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAssetMasterAccess`: AssetResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.UpdateAssetMasterAccess`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **updateAssetMasterAccessRequest** | [**UpdateAssetMasterAccessRequest**](UpdateAssetMasterAccessRequest.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAssetMasterAccessRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateAssetMasterAccessRequest** | [**UpdateAssetMasterAccessRequest**](UpdateAssetMasterAccessRequest.md) | | ### Return type @@ -325,24 +774,67 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## UpdateAssetMp4Support + +> AssetResponse UpdateAssetMp4Support(ctx, aSSETID).UpdateAssetMP4SupportRequest(updateAssetMP4SupportRequest).Execute() -# **UpdateAssetMp4Support** -> AssetResponse UpdateAssetMp4Support(ctx, aSSETID, updateAssetMp4SupportRequest) Update MP4 support -Allows you add or remove mp4 support for assets that were created without it. Currently there are two values supported in this request, `standard` and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + aSSETID := "aSSETID_example" // string | The asset ID. + updateAssetMP4SupportRequest := *openapiclient.NewUpdateAssetMP4SupportRequest() // UpdateAssetMP4SupportRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.AssetsApi.UpdateAssetMp4Support(context.Background(), aSSETID).UpdateAssetMP4SupportRequest(updateAssetMP4SupportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AssetsApi.UpdateAssetMp4Support``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAssetMp4Support`: AssetResponse + fmt.Fprintf(os.Stdout, "Response from `AssetsApi.UpdateAssetMp4Support`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**aSSETID** | **string** | The asset ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAssetMp4SupportRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **aSSETID** | **string**| The asset ID. | - **updateAssetMp4SupportRequest** | [**UpdateAssetMp4SupportRequest**](UpdateAssetMp4SupportRequest.md)| | + + **updateAssetMP4SupportRequest** | [**UpdateAssetMP4SupportRequest**](UpdateAssetMP4SupportRequest.md) | | ### Return type @@ -354,8 +846,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/BreakdownValue.md b/docs/BreakdownValue.md index 6de24af..7e68d00 100644 --- a/docs/BreakdownValue.md +++ b/docs/BreakdownValue.md @@ -1,13 +1,159 @@ # BreakdownValue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Views** | **int64** | | [optional] -**Value** | **float64** | | [optional] -**TotalWatchTime** | **int64** | | [optional] -**NegativeImpact** | **int32** | | [optional] -**Field** | **string** | | [optional] +**Views** | Pointer to **int64** | | [optional] +**Value** | Pointer to **float64** | | [optional] +**TotalWatchTime** | Pointer to **int64** | | [optional] +**NegativeImpact** | Pointer to **int32** | | [optional] +**Field** | Pointer to **string** | | [optional] + +## Methods + +### NewBreakdownValue + +`func NewBreakdownValue() *BreakdownValue` + +NewBreakdownValue instantiates a new BreakdownValue 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 + +### NewBreakdownValueWithDefaults + +`func NewBreakdownValueWithDefaults() *BreakdownValue` + +NewBreakdownValueWithDefaults instantiates a new BreakdownValue 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 + +### GetViews + +`func (o *BreakdownValue) GetViews() int64` + +GetViews returns the Views field if non-nil, zero value otherwise. + +### GetViewsOk + +`func (o *BreakdownValue) GetViewsOk() (*int64, bool)` + +GetViewsOk returns a tuple with the Views field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViews + +`func (o *BreakdownValue) SetViews(v int64)` + +SetViews sets Views field to given value. + +### HasViews + +`func (o *BreakdownValue) HasViews() bool` + +HasViews returns a boolean if a field has been set. + +### GetValue + +`func (o *BreakdownValue) GetValue() float64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *BreakdownValue) GetValueOk() (*float64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *BreakdownValue) SetValue(v float64)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *BreakdownValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetTotalWatchTime + +`func (o *BreakdownValue) GetTotalWatchTime() int64` + +GetTotalWatchTime returns the TotalWatchTime field if non-nil, zero value otherwise. + +### GetTotalWatchTimeOk + +`func (o *BreakdownValue) GetTotalWatchTimeOk() (*int64, bool)` + +GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalWatchTime + +`func (o *BreakdownValue) SetTotalWatchTime(v int64)` + +SetTotalWatchTime sets TotalWatchTime field to given value. + +### HasTotalWatchTime + +`func (o *BreakdownValue) HasTotalWatchTime() bool` + +HasTotalWatchTime returns a boolean if a field has been set. + +### GetNegativeImpact + +`func (o *BreakdownValue) GetNegativeImpact() int32` + +GetNegativeImpact returns the NegativeImpact field if non-nil, zero value otherwise. + +### GetNegativeImpactOk + +`func (o *BreakdownValue) GetNegativeImpactOk() (*int32, bool)` + +GetNegativeImpactOk returns a tuple with the NegativeImpact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNegativeImpact + +`func (o *BreakdownValue) SetNegativeImpact(v int32)` + +SetNegativeImpact sets NegativeImpact field to given value. + +### HasNegativeImpact + +`func (o *BreakdownValue) HasNegativeImpact() bool` + +HasNegativeImpact returns a boolean if a field has been set. + +### GetField + +`func (o *BreakdownValue) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *BreakdownValue) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *BreakdownValue) SetField(v string)` + +SetField sets Field field to given value. + +### HasField + +`func (o *BreakdownValue) HasField() bool` + +HasField returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index e334f81..e06da43 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -1,16 +1,237 @@ # CreateAssetRequest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Input** | [**[]InputSettings**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional] -**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] -**PerTitleEncode** | **bool** | | [optional] -**Passthrough** | **string** | Arbitrary metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional] -**Mp4Support** | **string** | Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. | [optional] -**NormalizeAudio** | **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false] -**MasterAccess** | **string** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. | [optional] -**Test** | **bool** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional] +**Input** | Pointer to [**[]InputSettings**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional] +**PlaybackPolicy** | Pointer to [**[]PlaybackPolicy**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] +**PerTitleEncode** | Pointer to **bool** | | [optional] +**Passthrough** | Pointer to **string** | Arbitrary metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional] +**Mp4Support** | Pointer to **string** | Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](/guides/video/download-your-videos) for more information. | [optional] +**NormalizeAudio** | Pointer to **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false] +**MasterAccess** | Pointer to **string** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](/guides/video/download-your-videos) for more information. | [optional] +**Test** | Pointer to **bool** | Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. | [optional] + +## Methods + +### NewCreateAssetRequest + +`func NewCreateAssetRequest() *CreateAssetRequest` + +NewCreateAssetRequest instantiates a new CreateAssetRequest 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 + +### NewCreateAssetRequestWithDefaults + +`func NewCreateAssetRequestWithDefaults() *CreateAssetRequest` + +NewCreateAssetRequestWithDefaults instantiates a new CreateAssetRequest 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 + +### GetInput + +`func (o *CreateAssetRequest) GetInput() []InputSettings` + +GetInput returns the Input field if non-nil, zero value otherwise. + +### GetInputOk + +`func (o *CreateAssetRequest) GetInputOk() (*[]InputSettings, bool)` + +GetInputOk returns a tuple with the Input field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInput + +`func (o *CreateAssetRequest) SetInput(v []InputSettings)` + +SetInput sets Input field to given value. + +### HasInput + +`func (o *CreateAssetRequest) HasInput() bool` + +HasInput returns a boolean if a field has been set. + +### GetPlaybackPolicy + +`func (o *CreateAssetRequest) GetPlaybackPolicy() []PlaybackPolicy` + +GetPlaybackPolicy returns the PlaybackPolicy field if non-nil, zero value otherwise. + +### GetPlaybackPolicyOk + +`func (o *CreateAssetRequest) GetPlaybackPolicyOk() (*[]PlaybackPolicy, bool)` + +GetPlaybackPolicyOk returns a tuple with the PlaybackPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaybackPolicy + +`func (o *CreateAssetRequest) SetPlaybackPolicy(v []PlaybackPolicy)` + +SetPlaybackPolicy sets PlaybackPolicy field to given value. + +### HasPlaybackPolicy + +`func (o *CreateAssetRequest) HasPlaybackPolicy() bool` + +HasPlaybackPolicy returns a boolean if a field has been set. + +### GetPerTitleEncode + +`func (o *CreateAssetRequest) GetPerTitleEncode() bool` + +GetPerTitleEncode returns the PerTitleEncode field if non-nil, zero value otherwise. + +### GetPerTitleEncodeOk + +`func (o *CreateAssetRequest) GetPerTitleEncodeOk() (*bool, bool)` + +GetPerTitleEncodeOk returns a tuple with the PerTitleEncode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerTitleEncode + +`func (o *CreateAssetRequest) SetPerTitleEncode(v bool)` + +SetPerTitleEncode sets PerTitleEncode field to given value. + +### HasPerTitleEncode + +`func (o *CreateAssetRequest) HasPerTitleEncode() bool` + +HasPerTitleEncode returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *CreateAssetRequest) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *CreateAssetRequest) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *CreateAssetRequest) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *CreateAssetRequest) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetMp4Support + +`func (o *CreateAssetRequest) GetMp4Support() string` + +GetMp4Support returns the Mp4Support field if non-nil, zero value otherwise. + +### GetMp4SupportOk + +`func (o *CreateAssetRequest) GetMp4SupportOk() (*string, bool)` + +GetMp4SupportOk returns a tuple with the Mp4Support field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMp4Support + +`func (o *CreateAssetRequest) SetMp4Support(v string)` + +SetMp4Support sets Mp4Support field to given value. + +### HasMp4Support + +`func (o *CreateAssetRequest) HasMp4Support() bool` + +HasMp4Support returns a boolean if a field has been set. + +### GetNormalizeAudio + +`func (o *CreateAssetRequest) GetNormalizeAudio() bool` + +GetNormalizeAudio returns the NormalizeAudio field if non-nil, zero value otherwise. + +### GetNormalizeAudioOk + +`func (o *CreateAssetRequest) GetNormalizeAudioOk() (*bool, bool)` + +GetNormalizeAudioOk returns a tuple with the NormalizeAudio field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNormalizeAudio + +`func (o *CreateAssetRequest) SetNormalizeAudio(v bool)` + +SetNormalizeAudio sets NormalizeAudio field to given value. + +### HasNormalizeAudio + +`func (o *CreateAssetRequest) HasNormalizeAudio() bool` + +HasNormalizeAudio returns a boolean if a field has been set. + +### GetMasterAccess + +`func (o *CreateAssetRequest) GetMasterAccess() string` + +GetMasterAccess returns the MasterAccess field if non-nil, zero value otherwise. + +### GetMasterAccessOk + +`func (o *CreateAssetRequest) GetMasterAccessOk() (*string, bool)` + +GetMasterAccessOk returns a tuple with the MasterAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterAccess + +`func (o *CreateAssetRequest) SetMasterAccess(v string)` + +SetMasterAccess sets MasterAccess field to given value. + +### HasMasterAccess + +`func (o *CreateAssetRequest) HasMasterAccess() bool` + +HasMasterAccess returns a boolean if a field has been set. + +### GetTest + +`func (o *CreateAssetRequest) GetTest() bool` + +GetTest returns the Test field if non-nil, zero value otherwise. + +### GetTestOk + +`func (o *CreateAssetRequest) GetTestOk() (*bool, bool)` + +GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTest + +`func (o *CreateAssetRequest) SetTest(v bool)` + +SetTest sets Test field to given value. + +### HasTest + +`func (o *CreateAssetRequest) HasTest() bool` + +HasTest returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateLiveStreamRequest.md b/docs/CreateLiveStreamRequest.md index 7cff41b..fc3678d 100644 --- a/docs/CreateLiveStreamRequest.md +++ b/docs/CreateLiveStreamRequest.md @@ -1,15 +1,211 @@ # CreateLiveStreamRequest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | | [optional] -**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] -**ReconnectWindow** | **float32** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. | [optional] -**Passthrough** | **string** | | [optional] -**ReducedLatency** | **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ | [optional] -**Test** | **bool** | | [optional] -**SimulcastTargets** | [**[]CreateSimulcastTargetRequest**](CreateSimulcastTargetRequest.md) | | [optional] +**PlaybackPolicy** | Pointer to [**[]PlaybackPolicy**](PlaybackPolicy.md) | | [optional] +**NewAssetSettings** | Pointer to [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] +**ReconnectWindow** | Pointer to **float32** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. | [optional] +**Passthrough** | Pointer to **string** | | [optional] +**ReducedLatency** | Pointer to **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ | [optional] +**Test** | Pointer to **bool** | Marks the live stream as a test live stream when the value is set to true. A test live stream can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test live streams created. Test live streams are watermarked with the Mux logo and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. | [optional] +**SimulcastTargets** | Pointer to [**[]CreateSimulcastTargetRequest**](CreateSimulcastTargetRequest.md) | | [optional] + +## Methods + +### NewCreateLiveStreamRequest + +`func NewCreateLiveStreamRequest() *CreateLiveStreamRequest` + +NewCreateLiveStreamRequest instantiates a new CreateLiveStreamRequest 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 + +### NewCreateLiveStreamRequestWithDefaults + +`func NewCreateLiveStreamRequestWithDefaults() *CreateLiveStreamRequest` + +NewCreateLiveStreamRequestWithDefaults instantiates a new CreateLiveStreamRequest 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 + +### GetPlaybackPolicy + +`func (o *CreateLiveStreamRequest) GetPlaybackPolicy() []PlaybackPolicy` + +GetPlaybackPolicy returns the PlaybackPolicy field if non-nil, zero value otherwise. + +### GetPlaybackPolicyOk + +`func (o *CreateLiveStreamRequest) GetPlaybackPolicyOk() (*[]PlaybackPolicy, bool)` + +GetPlaybackPolicyOk returns a tuple with the PlaybackPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaybackPolicy + +`func (o *CreateLiveStreamRequest) SetPlaybackPolicy(v []PlaybackPolicy)` + +SetPlaybackPolicy sets PlaybackPolicy field to given value. + +### HasPlaybackPolicy + +`func (o *CreateLiveStreamRequest) HasPlaybackPolicy() bool` + +HasPlaybackPolicy returns a boolean if a field has been set. + +### GetNewAssetSettings + +`func (o *CreateLiveStreamRequest) GetNewAssetSettings() CreateAssetRequest` + +GetNewAssetSettings returns the NewAssetSettings field if non-nil, zero value otherwise. + +### GetNewAssetSettingsOk + +`func (o *CreateLiveStreamRequest) GetNewAssetSettingsOk() (*CreateAssetRequest, bool)` + +GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewAssetSettings + +`func (o *CreateLiveStreamRequest) SetNewAssetSettings(v CreateAssetRequest)` + +SetNewAssetSettings sets NewAssetSettings field to given value. + +### HasNewAssetSettings + +`func (o *CreateLiveStreamRequest) HasNewAssetSettings() bool` + +HasNewAssetSettings returns a boolean if a field has been set. + +### GetReconnectWindow + +`func (o *CreateLiveStreamRequest) GetReconnectWindow() float32` + +GetReconnectWindow returns the ReconnectWindow field if non-nil, zero value otherwise. + +### GetReconnectWindowOk + +`func (o *CreateLiveStreamRequest) GetReconnectWindowOk() (*float32, bool)` + +GetReconnectWindowOk returns a tuple with the ReconnectWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReconnectWindow + +`func (o *CreateLiveStreamRequest) SetReconnectWindow(v float32)` + +SetReconnectWindow sets ReconnectWindow field to given value. + +### HasReconnectWindow + +`func (o *CreateLiveStreamRequest) HasReconnectWindow() bool` + +HasReconnectWindow returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *CreateLiveStreamRequest) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *CreateLiveStreamRequest) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *CreateLiveStreamRequest) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *CreateLiveStreamRequest) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetReducedLatency + +`func (o *CreateLiveStreamRequest) GetReducedLatency() bool` + +GetReducedLatency returns the ReducedLatency field if non-nil, zero value otherwise. + +### GetReducedLatencyOk + +`func (o *CreateLiveStreamRequest) GetReducedLatencyOk() (*bool, bool)` + +GetReducedLatencyOk returns a tuple with the ReducedLatency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReducedLatency + +`func (o *CreateLiveStreamRequest) SetReducedLatency(v bool)` + +SetReducedLatency sets ReducedLatency field to given value. + +### HasReducedLatency + +`func (o *CreateLiveStreamRequest) HasReducedLatency() bool` + +HasReducedLatency returns a boolean if a field has been set. + +### GetTest + +`func (o *CreateLiveStreamRequest) GetTest() bool` + +GetTest returns the Test field if non-nil, zero value otherwise. + +### GetTestOk + +`func (o *CreateLiveStreamRequest) GetTestOk() (*bool, bool)` + +GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTest + +`func (o *CreateLiveStreamRequest) SetTest(v bool)` + +SetTest sets Test field to given value. + +### HasTest + +`func (o *CreateLiveStreamRequest) HasTest() bool` + +HasTest returns a boolean if a field has been set. + +### GetSimulcastTargets + +`func (o *CreateLiveStreamRequest) GetSimulcastTargets() []CreateSimulcastTargetRequest` + +GetSimulcastTargets returns the SimulcastTargets field if non-nil, zero value otherwise. + +### GetSimulcastTargetsOk + +`func (o *CreateLiveStreamRequest) GetSimulcastTargetsOk() (*[]CreateSimulcastTargetRequest, bool)` + +GetSimulcastTargetsOk returns a tuple with the SimulcastTargets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSimulcastTargets + +`func (o *CreateLiveStreamRequest) SetSimulcastTargets(v []CreateSimulcastTargetRequest)` + +SetSimulcastTargets sets SimulcastTargets field to given value. + +### HasSimulcastTargets + +`func (o *CreateLiveStreamRequest) HasSimulcastTargets() bool` + +HasSimulcastTargets returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreatePlaybackIdRequest.md b/docs/CreatePlaybackIdRequest.md deleted file mode 100644 index 62eab74..0000000 --- a/docs/CreatePlaybackIdRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreatePlaybackIdRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreatePlaybackIdResponse.md b/docs/CreatePlaybackIdResponse.md deleted file mode 100644 index 050e4ee..0000000 --- a/docs/CreatePlaybackIdResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreatePlaybackIdResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**PlaybackId**](.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateSimulcastTargetRequest.md b/docs/CreateSimulcastTargetRequest.md index a792928..d11438c 100644 --- a/docs/CreateSimulcastTargetRequest.md +++ b/docs/CreateSimulcastTargetRequest.md @@ -1,12 +1,103 @@ # CreateSimulcastTargetRequest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Passthrough** | **string** | Arbitrary metadata set by you when creating a simulcast target. | [optional] -**StreamKey** | **string** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. | [optional] +**Passthrough** | Pointer to **string** | Arbitrary metadata set by you when creating a simulcast target. | [optional] +**StreamKey** | Pointer to **string** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. | [optional] **Url** | **string** | RTMP hostname including application name for the third party live streaming service. Example: 'rtmp://live.example.com/app'. | +## Methods + +### NewCreateSimulcastTargetRequest + +`func NewCreateSimulcastTargetRequest(url string, ) *CreateSimulcastTargetRequest` + +NewCreateSimulcastTargetRequest instantiates a new CreateSimulcastTargetRequest 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 + +### NewCreateSimulcastTargetRequestWithDefaults + +`func NewCreateSimulcastTargetRequestWithDefaults() *CreateSimulcastTargetRequest` + +NewCreateSimulcastTargetRequestWithDefaults instantiates a new CreateSimulcastTargetRequest 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 + +### GetPassthrough + +`func (o *CreateSimulcastTargetRequest) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *CreateSimulcastTargetRequest) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *CreateSimulcastTargetRequest) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *CreateSimulcastTargetRequest) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetStreamKey + +`func (o *CreateSimulcastTargetRequest) GetStreamKey() string` + +GetStreamKey returns the StreamKey field if non-nil, zero value otherwise. + +### GetStreamKeyOk + +`func (o *CreateSimulcastTargetRequest) GetStreamKeyOk() (*string, bool)` + +GetStreamKeyOk returns a tuple with the StreamKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamKey + +`func (o *CreateSimulcastTargetRequest) SetStreamKey(v string)` + +SetStreamKey sets StreamKey field to given value. + +### HasStreamKey + +`func (o *CreateSimulcastTargetRequest) HasStreamKey() bool` + +HasStreamKey returns a boolean if a field has been set. + +### GetUrl + +`func (o *CreateSimulcastTargetRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *CreateSimulcastTargetRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *CreateSimulcastTargetRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateTrackRequest.md b/docs/CreateTrackRequest.md index c0e5543..9a9f2dc 100644 --- a/docs/CreateTrackRequest.md +++ b/docs/CreateTrackRequest.md @@ -1,15 +1,191 @@ # CreateTrackRequest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Url** | **string** | | **Type** | **string** | | **TextType** | **string** | | **LanguageCode** | **string** | The language code value must be a valid BCP 47 specification compliant value. For example, en for English or en-US for the US version of English. | -**Name** | **string** | The name of the track containing a human-readable description. This value must be unqiue across all the text type and subtitles text type tracks. HLS manifest will associate subtitle text track with this value. For example, set the value to \"English\" for subtitles text track with language_code as en-US. If this parameter is not included, Mux will auto-populate based on the language_code value. | [optional] -**ClosedCaptions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). | [optional] -**Passthrough** | **string** | Arbitrary metadata set for the track either when creating the asset or track. | [optional] +**Name** | Pointer to **string** | The name of the track containing a human-readable description. This value must be unqiue across all the text type and subtitles text type tracks. HLS manifest will associate subtitle text track with this value. For example, set the value to \"English\" for subtitles text track with language_code as en-US. If this parameter is not included, Mux will auto-populate based on the language_code value. | [optional] +**ClosedCaptions** | Pointer to **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). | [optional] +**Passthrough** | Pointer to **string** | Arbitrary metadata set for the track either when creating the asset or track. | [optional] + +## Methods + +### NewCreateTrackRequest + +`func NewCreateTrackRequest(url string, type_ string, textType string, languageCode string, ) *CreateTrackRequest` + +NewCreateTrackRequest instantiates a new CreateTrackRequest 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 + +### NewCreateTrackRequestWithDefaults + +`func NewCreateTrackRequestWithDefaults() *CreateTrackRequest` + +NewCreateTrackRequestWithDefaults instantiates a new CreateTrackRequest 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 + +### GetUrl + +`func (o *CreateTrackRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *CreateTrackRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *CreateTrackRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetType + +`func (o *CreateTrackRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateTrackRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CreateTrackRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTextType + +`func (o *CreateTrackRequest) GetTextType() string` + +GetTextType returns the TextType field if non-nil, zero value otherwise. + +### GetTextTypeOk + +`func (o *CreateTrackRequest) GetTextTypeOk() (*string, bool)` + +GetTextTypeOk returns a tuple with the TextType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTextType + +`func (o *CreateTrackRequest) SetTextType(v string)` + +SetTextType sets TextType field to given value. + + +### GetLanguageCode + +`func (o *CreateTrackRequest) GetLanguageCode() string` + +GetLanguageCode returns the LanguageCode field if non-nil, zero value otherwise. + +### GetLanguageCodeOk + +`func (o *CreateTrackRequest) GetLanguageCodeOk() (*string, bool)` + +GetLanguageCodeOk returns a tuple with the LanguageCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguageCode + +`func (o *CreateTrackRequest) SetLanguageCode(v string)` + +SetLanguageCode sets LanguageCode field to given value. + + +### GetName + +`func (o *CreateTrackRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateTrackRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateTrackRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CreateTrackRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetClosedCaptions + +`func (o *CreateTrackRequest) GetClosedCaptions() bool` + +GetClosedCaptions returns the ClosedCaptions field if non-nil, zero value otherwise. + +### GetClosedCaptionsOk + +`func (o *CreateTrackRequest) GetClosedCaptionsOk() (*bool, bool)` + +GetClosedCaptionsOk returns a tuple with the ClosedCaptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClosedCaptions + +`func (o *CreateTrackRequest) SetClosedCaptions(v bool)` + +SetClosedCaptions sets ClosedCaptions field to given value. + +### HasClosedCaptions + +`func (o *CreateTrackRequest) HasClosedCaptions() bool` + +HasClosedCaptions returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *CreateTrackRequest) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *CreateTrackRequest) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *CreateTrackRequest) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *CreateTrackRequest) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateTrackResponse.md b/docs/CreateTrackResponse.md index 799dc10..ce202a6 100644 --- a/docs/CreateTrackResponse.md +++ b/docs/CreateTrackResponse.md @@ -1,9 +1,55 @@ # CreateTrackResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**Track**](.md) | | [optional] +**Data** | Pointer to [**Track**](Track.md) | | [optional] + +## Methods + +### NewCreateTrackResponse + +`func NewCreateTrackResponse() *CreateTrackResponse` + +NewCreateTrackResponse instantiates a new CreateTrackResponse 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 + +### NewCreateTrackResponseWithDefaults + +`func NewCreateTrackResponseWithDefaults() *CreateTrackResponse` + +NewCreateTrackResponseWithDefaults instantiates a new CreateTrackResponse 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 + +### GetData + +`func (o *CreateTrackResponse) GetData() Track` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CreateTrackResponse) GetDataOk() (*Track, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CreateTrackResponse) SetData(v Track)` + +SetData sets Data field to given value. + +### HasData + +`func (o *CreateTrackResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUploadRequest.md b/docs/CreateUploadRequest.md index 983c71b..2ff6e5b 100644 --- a/docs/CreateUploadRequest.md +++ b/docs/CreateUploadRequest.md @@ -1,12 +1,128 @@ # CreateUploadRequest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Timeout** | **int32** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600] -**CorsOrigin** | **string** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional] +**Timeout** | Pointer to **int32** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600] +**CorsOrigin** | Pointer to **string** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional] **NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | -**Test** | **bool** | | [optional] +**Test** | Pointer to **bool** | | [optional] + +## Methods + +### NewCreateUploadRequest + +`func NewCreateUploadRequest(newAssetSettings CreateAssetRequest, ) *CreateUploadRequest` + +NewCreateUploadRequest instantiates a new CreateUploadRequest 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 + +### NewCreateUploadRequestWithDefaults + +`func NewCreateUploadRequestWithDefaults() *CreateUploadRequest` + +NewCreateUploadRequestWithDefaults instantiates a new CreateUploadRequest 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 + +### GetTimeout + +`func (o *CreateUploadRequest) GetTimeout() int32` + +GetTimeout returns the Timeout field if non-nil, zero value otherwise. + +### GetTimeoutOk + +`func (o *CreateUploadRequest) GetTimeoutOk() (*int32, bool)` + +GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeout + +`func (o *CreateUploadRequest) SetTimeout(v int32)` + +SetTimeout sets Timeout field to given value. + +### HasTimeout + +`func (o *CreateUploadRequest) HasTimeout() bool` + +HasTimeout returns a boolean if a field has been set. + +### GetCorsOrigin + +`func (o *CreateUploadRequest) GetCorsOrigin() string` + +GetCorsOrigin returns the CorsOrigin field if non-nil, zero value otherwise. + +### GetCorsOriginOk + +`func (o *CreateUploadRequest) GetCorsOriginOk() (*string, bool)` + +GetCorsOriginOk returns a tuple with the CorsOrigin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorsOrigin + +`func (o *CreateUploadRequest) SetCorsOrigin(v string)` + +SetCorsOrigin sets CorsOrigin field to given value. + +### HasCorsOrigin + +`func (o *CreateUploadRequest) HasCorsOrigin() bool` + +HasCorsOrigin returns a boolean if a field has been set. + +### GetNewAssetSettings + +`func (o *CreateUploadRequest) GetNewAssetSettings() CreateAssetRequest` + +GetNewAssetSettings returns the NewAssetSettings field if non-nil, zero value otherwise. + +### GetNewAssetSettingsOk + +`func (o *CreateUploadRequest) GetNewAssetSettingsOk() (*CreateAssetRequest, bool)` + +GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewAssetSettings + +`func (o *CreateUploadRequest) SetNewAssetSettings(v CreateAssetRequest)` + +SetNewAssetSettings sets NewAssetSettings field to given value. + + +### GetTest + +`func (o *CreateUploadRequest) GetTest() bool` + +GetTest returns the Test field if non-nil, zero value otherwise. + +### GetTestOk + +`func (o *CreateUploadRequest) GetTestOk() (*bool, bool)` + +GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTest + +`func (o *CreateUploadRequest) SetTest(v bool)` + +SetTest sets Test field to given value. + +### HasTest + +`func (o *CreateUploadRequest) HasTest() bool` + +HasTest returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryReport.md b/docs/DeliveryReport.md index 186efd5..2d5f975 100644 --- a/docs/DeliveryReport.md +++ b/docs/DeliveryReport.md @@ -1,15 +1,237 @@ # DeliveryReport ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**LiveStreamId** | **string** | | [optional] -**AssetId** | **string** | | [optional] -**Passthrough** | **string** | | [optional] -**CreatedAt** | **string** | | [optional] -**AssetState** | **string** | | [optional] -**AssetDuration** | **float64** | | [optional] -**DeliveredSeconds** | **float64** | | [optional] +**LiveStreamId** | Pointer to **string** | Unique identifier for the live stream that created the asset. | [optional] +**AssetId** | Pointer to **string** | Unique identifier for the asset. | [optional] +**Passthrough** | Pointer to **string** | The `passthrough` value for the asset. | [optional] +**CreatedAt** | Pointer to **string** | Time at which the asset was created. Measured in seconds since the Unix epoch. | [optional] +**DeletedAt** | Pointer to **string** | If exists, time at which the asset was deleted. Measured in seconds since the Unix epoch. | [optional] +**AssetState** | Pointer to **string** | The state of the asset. | [optional] +**AssetDuration** | Pointer to **float64** | The duration of the asset in seconds. | [optional] +**DeliveredSeconds** | Pointer to **float64** | Total number of delivered seconds during this time window. | [optional] + +## Methods + +### NewDeliveryReport + +`func NewDeliveryReport() *DeliveryReport` + +NewDeliveryReport instantiates a new DeliveryReport 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 + +### NewDeliveryReportWithDefaults + +`func NewDeliveryReportWithDefaults() *DeliveryReport` + +NewDeliveryReportWithDefaults instantiates a new DeliveryReport 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 + +### GetLiveStreamId + +`func (o *DeliveryReport) GetLiveStreamId() string` + +GetLiveStreamId returns the LiveStreamId field if non-nil, zero value otherwise. + +### GetLiveStreamIdOk + +`func (o *DeliveryReport) GetLiveStreamIdOk() (*string, bool)` + +GetLiveStreamIdOk returns a tuple with the LiveStreamId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLiveStreamId + +`func (o *DeliveryReport) SetLiveStreamId(v string)` + +SetLiveStreamId sets LiveStreamId field to given value. + +### HasLiveStreamId + +`func (o *DeliveryReport) HasLiveStreamId() bool` + +HasLiveStreamId returns a boolean if a field has been set. + +### GetAssetId + +`func (o *DeliveryReport) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *DeliveryReport) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *DeliveryReport) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *DeliveryReport) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *DeliveryReport) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *DeliveryReport) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *DeliveryReport) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *DeliveryReport) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DeliveryReport) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DeliveryReport) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DeliveryReport) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DeliveryReport) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetDeletedAt + +`func (o *DeliveryReport) GetDeletedAt() string` + +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. + +### GetDeletedAtOk + +`func (o *DeliveryReport) GetDeletedAtOk() (*string, bool)` + +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletedAt + +`func (o *DeliveryReport) SetDeletedAt(v string)` + +SetDeletedAt sets DeletedAt field to given value. + +### HasDeletedAt + +`func (o *DeliveryReport) HasDeletedAt() bool` + +HasDeletedAt returns a boolean if a field has been set. + +### GetAssetState + +`func (o *DeliveryReport) GetAssetState() string` + +GetAssetState returns the AssetState field if non-nil, zero value otherwise. + +### GetAssetStateOk + +`func (o *DeliveryReport) GetAssetStateOk() (*string, bool)` + +GetAssetStateOk returns a tuple with the AssetState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetState + +`func (o *DeliveryReport) SetAssetState(v string)` + +SetAssetState sets AssetState field to given value. + +### HasAssetState + +`func (o *DeliveryReport) HasAssetState() bool` + +HasAssetState returns a boolean if a field has been set. + +### GetAssetDuration + +`func (o *DeliveryReport) GetAssetDuration() float64` + +GetAssetDuration returns the AssetDuration field if non-nil, zero value otherwise. + +### GetAssetDurationOk + +`func (o *DeliveryReport) GetAssetDurationOk() (*float64, bool)` + +GetAssetDurationOk returns a tuple with the AssetDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetDuration + +`func (o *DeliveryReport) SetAssetDuration(v float64)` + +SetAssetDuration sets AssetDuration field to given value. + +### HasAssetDuration + +`func (o *DeliveryReport) HasAssetDuration() bool` + +HasAssetDuration returns a boolean if a field has been set. + +### GetDeliveredSeconds + +`func (o *DeliveryReport) GetDeliveredSeconds() float64` + +GetDeliveredSeconds returns the DeliveredSeconds field if non-nil, zero value otherwise. + +### GetDeliveredSecondsOk + +`func (o *DeliveryReport) GetDeliveredSecondsOk() (*float64, bool)` + +GetDeliveredSecondsOk returns a tuple with the DeliveredSeconds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeliveredSeconds + +`func (o *DeliveryReport) SetDeliveredSeconds(v float64)` + +SetDeliveredSeconds sets DeliveredSeconds field to given value. + +### HasDeliveredSeconds + +`func (o *DeliveryReport) HasDeliveredSeconds() bool` + +HasDeliveredSeconds returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeliveryUsageApi.md b/docs/DeliveryUsageApi.md index e1ca25e..7326a1f 100644 --- a/docs/DeliveryUsageApi.md +++ b/docs/DeliveryUsageApi.md @@ -7,28 +7,60 @@ Method | HTTP request | Description [**ListDeliveryUsage**](DeliveryUsageApi.md#ListDeliveryUsage) | **Get** /video/v1/delivery-usage | List Usage -# **ListDeliveryUsage** -> ListDeliveryUsageResponse ListDeliveryUsage(ctx, optional) + +## ListDeliveryUsage + +> ListDeliveryUsageResponse ListDeliveryUsage(ctx).Page(page).Limit(limit).AssetId(assetId).Timeframe(timeframe).Execute() + List Usage -Returns a list of delivery usage records and their associated Asset IDs or Live Stream IDs. -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListDeliveryUsageOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 100) + assetId := "assetId_example" // string | Filter response to return delivery usage for this asset only. (optional) + timeframe := []string{"Inner_example"} // []string | Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DeliveryUsageApi.ListDeliveryUsage(context.Background()).Page(page).Limit(limit).AssetId(assetId).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DeliveryUsageApi.ListDeliveryUsage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDeliveryUsage`: ListDeliveryUsageResponse + fmt.Fprintf(os.Stdout, "Response from `DeliveryUsageApi.ListDeliveryUsage`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDeliveryUsageRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListDeliveryUsageOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **limit** | **optional.Int32**| Number of items to include in the response | [default to 100] - **assetId** | **optional.String**| Filter response to return delivery usage for this asset only. | - **timeframe** | [**optional.Interface of []string**](string.md)| Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. | + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **limit** | **int32** | Number of items to include in the response | [default to 100] + **assetId** | **string** | Filter response to return delivery usage for this asset only. | + **timeframe** | **[]string** | Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. | ### Return type @@ -40,8 +72,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/DimensionValue.md b/docs/DimensionValue.md index a31d6ca..0979fb9 100644 --- a/docs/DimensionValue.md +++ b/docs/DimensionValue.md @@ -1,10 +1,81 @@ # DimensionValue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | | [optional] -**TotalCount** | **int64** | | [optional] +**Value** | Pointer to **string** | | [optional] +**TotalCount** | Pointer to **int64** | | [optional] + +## Methods + +### NewDimensionValue + +`func NewDimensionValue() *DimensionValue` + +NewDimensionValue instantiates a new DimensionValue 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 + +### NewDimensionValueWithDefaults + +`func NewDimensionValueWithDefaults() *DimensionValue` + +NewDimensionValueWithDefaults instantiates a new DimensionValue 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 + +### GetValue + +`func (o *DimensionValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DimensionValue) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *DimensionValue) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DimensionValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetTotalCount + +`func (o *DimensionValue) GetTotalCount() int64` + +GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. + +### GetTotalCountOk + +`func (o *DimensionValue) GetTotalCountOk() (*int64, bool)` + +GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalCount + +`func (o *DimensionValue) SetTotalCount(v int64)` + +SetTotalCount sets TotalCount field to given value. + +### HasTotalCount + +`func (o *DimensionValue) HasTotalCount() bool` + +HasTotalCount returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DimensionsApi.md b/docs/DimensionsApi.md index 76e2e1e..f014f41 100644 --- a/docs/DimensionsApi.md +++ b/docs/DimensionsApi.md @@ -8,30 +8,66 @@ Method | HTTP request | Description [**ListDimensions**](DimensionsApi.md#ListDimensions) | **Get** /data/v1/dimensions | List Dimensions -# **ListDimensionValues** -> ListDimensionValuesResponse ListDimensionValues(ctx, dIMENSIONID, optional) + +## ListDimensionValues + +> ListDimensionValuesResponse ListDimensionValues(ctx, dIMENSIONID).Limit(limit).Page(page).Filters(filters).Timeframe(timeframe).Execute() + Lists the values for a specific dimension -Lists the values for a dimension along with a total count of related views. Note: This API replaces the list-filter-values API call. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + dIMENSIONID := "abcd1234" // string | ID of the Dimension + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DimensionsApi.ListDimensionValues(context.Background(), dIMENSIONID).Limit(limit).Page(page).Filters(filters).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DimensionsApi.ListDimensionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDimensionValues`: ListDimensionValuesResponse + fmt.Fprintf(os.Stdout, "Response from `DimensionsApi.ListDimensionValues`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **dIMENSIONID** | **string**| ID of the Dimension | - **optional** | ***ListDimensionValuesOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dIMENSIONID** | **string** | ID of the Dimension | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDimensionValuesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListDimensionValuesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | ### Return type @@ -43,20 +79,57 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListDimensions** -> ListDimensionsResponse ListDimensions(ctx, ) +## ListDimensions + +> ListDimensionsResponse ListDimensions(ctx).Execute() + List Dimensions -List all available dimensions. Note: This API replaces the list-filters API call. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DimensionsApi.ListDimensions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DimensionsApi.ListDimensions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDimensions`: ListDimensionsResponse + fmt.Fprintf(os.Stdout, "Response from `DimensionsApi.ListDimensions`: %v\n", resp) +} +``` + +### Path Parameters + This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiListDimensionsRequest struct via the builder pattern + + ### Return type [**ListDimensionsResponse**](ListDimensionsResponse.md) @@ -67,8 +140,10 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/DirectUploadsApi.md b/docs/DirectUploadsApi.md index ddf6832..39db203 100644 --- a/docs/DirectUploadsApi.md +++ b/docs/DirectUploadsApi.md @@ -10,18 +10,58 @@ Method | HTTP request | Description [**ListDirectUploads**](DirectUploadsApi.md#ListDirectUploads) | **Get** /video/v1/uploads | List direct uploads -# **CancelDirectUpload** -> UploadResponse CancelDirectUpload(ctx, uPLOADID) + +## CancelDirectUpload + +> UploadResponse CancelDirectUpload(ctx, uPLOADID).Execute() + Cancel a direct upload -Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this request, no asset will be created. This request will only succeed if the upload is still in the `waiting` state. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + uPLOADID := "abcd1234" // string | ID of the Upload + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DirectUploadsApi.CancelDirectUpload(context.Background(), uPLOADID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DirectUploadsApi.CancelDirectUpload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CancelDirectUpload`: UploadResponse + fmt.Fprintf(os.Stdout, "Response from `DirectUploadsApi.CancelDirectUpload`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**uPLOADID** | **string** | ID of the Upload | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCancelDirectUploadRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **uPLOADID** | **string**| ID of the Upload | + ### Return type @@ -33,21 +73,59 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## CreateDirectUpload + +> UploadResponse CreateDirectUpload(ctx).CreateUploadRequest(createUploadRequest).Execute() -# **CreateDirectUpload** -> UploadResponse CreateDirectUpload(ctx, createUploadRequest) Create a new direct upload URL -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + createUploadRequest := *openapiclient.NewCreateUploadRequest(*openapiclient.NewCreateAssetRequest()) // CreateUploadRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DirectUploadsApi.CreateDirectUpload(context.Background()).CreateUploadRequest(createUploadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DirectUploadsApi.CreateDirectUpload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDirectUpload`: UploadResponse + fmt.Fprintf(os.Stdout, "Response from `DirectUploadsApi.CreateDirectUpload`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDirectUploadRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **createUploadRequest** | [**CreateUploadRequest**](CreateUploadRequest.md)| | + **createUploadRequest** | [**CreateUploadRequest**](CreateUploadRequest.md) | | ### Return type @@ -59,21 +137,63 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDirectUpload + +> UploadResponse GetDirectUpload(ctx, uPLOADID).Execute() -# **GetDirectUpload** -> UploadResponse GetDirectUpload(ctx, uPLOADID) Retrieve a single direct upload's info -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + uPLOADID := "abcd1234" // string | ID of the Upload + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DirectUploadsApi.GetDirectUpload(context.Background(), uPLOADID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DirectUploadsApi.GetDirectUpload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDirectUpload`: UploadResponse + fmt.Fprintf(os.Stdout, "Response from `DirectUploadsApi.GetDirectUpload`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**uPLOADID** | **string** | ID of the Upload | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDirectUploadRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **uPLOADID** | **string**| ID of the Upload | + ### Return type @@ -85,29 +205,61 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDirectUploads -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> ListUploadsResponse ListDirectUploads(ctx).Limit(limit).Page(page).Execute() -# **ListDirectUploads** -> ListUploadsResponse ListDirectUploads(ctx, optional) List direct uploads -### Required Parameters +### Example -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListDirectUploadsOpts** | optional parameters | nil if no parameters +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DirectUploadsApi.ListDirectUploads(context.Background()).Limit(limit).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DirectUploadsApi.ListDirectUploads``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDirectUploads`: ListUploadsResponse + fmt.Fprintf(os.Stdout, "Response from `DirectUploadsApi.ListDirectUploads`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDirectUploadsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListDirectUploadsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] ### Return type @@ -119,8 +271,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/DisableLiveStreamResponse.md b/docs/DisableLiveStreamResponse.md index cc77449..713814f 100644 --- a/docs/DisableLiveStreamResponse.md +++ b/docs/DisableLiveStreamResponse.md @@ -1,9 +1,55 @@ # DisableLiveStreamResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**map[string]interface{}**](.md) | | [optional] +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewDisableLiveStreamResponse + +`func NewDisableLiveStreamResponse() *DisableLiveStreamResponse` + +NewDisableLiveStreamResponse instantiates a new DisableLiveStreamResponse 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 + +### NewDisableLiveStreamResponseWithDefaults + +`func NewDisableLiveStreamResponseWithDefaults() *DisableLiveStreamResponse` + +NewDisableLiveStreamResponseWithDefaults instantiates a new DisableLiveStreamResponse 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 + +### GetData + +`func (o *DisableLiveStreamResponse) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DisableLiveStreamResponse) GetDataOk() (*map[string]interface{}, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *DisableLiveStreamResponse) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *DisableLiveStreamResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnableLiveStreamResponse.md b/docs/EnableLiveStreamResponse.md index 5cc4047..cbb1006 100644 --- a/docs/EnableLiveStreamResponse.md +++ b/docs/EnableLiveStreamResponse.md @@ -1,9 +1,55 @@ # EnableLiveStreamResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**map[string]interface{}**](.md) | | [optional] +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewEnableLiveStreamResponse + +`func NewEnableLiveStreamResponse() *EnableLiveStreamResponse` + +NewEnableLiveStreamResponse instantiates a new EnableLiveStreamResponse 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 + +### NewEnableLiveStreamResponseWithDefaults + +`func NewEnableLiveStreamResponseWithDefaults() *EnableLiveStreamResponse` + +NewEnableLiveStreamResponseWithDefaults instantiates a new EnableLiveStreamResponse 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 + +### GetData + +`func (o *EnableLiveStreamResponse) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EnableLiveStreamResponse) GetDataOk() (*map[string]interface{}, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *EnableLiveStreamResponse) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *EnableLiveStreamResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Error.md b/docs/Error.md index cd07cfb..f51eaf1 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -1,16 +1,237 @@ # Error ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Percentage** | **float64** | | [optional] -**Notes** | **string** | | [optional] -**Message** | **string** | | [optional] -**LastSeen** | **string** | | [optional] -**Description** | **string** | | [optional] -**Count** | **int64** | | [optional] -**Code** | **int64** | | [optional] +**Id** | Pointer to **int64** | A unique identifier for this error. | [optional] +**Percentage** | Pointer to **float64** | The percentage of views that experienced this error. | [optional] +**Notes** | Pointer to **string** | Notes that are attached to this error. | [optional] +**Message** | Pointer to **string** | The error message. | [optional] +**LastSeen** | Pointer to **string** | The last time this error was seen (ISO 8601 timestamp). | [optional] +**Description** | Pointer to **string** | Description of the error. | [optional] +**Count** | Pointer to **int64** | The total number of views that experiend this error. | [optional] +**Code** | Pointer to **int64** | The error code | [optional] + +## Methods + +### NewError + +`func NewError() *Error` + +NewError instantiates a new Error 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 + +### NewErrorWithDefaults + +`func NewErrorWithDefaults() *Error` + +NewErrorWithDefaults instantiates a new Error 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 + +### GetId + +`func (o *Error) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Error) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Error) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Error) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetPercentage + +`func (o *Error) GetPercentage() float64` + +GetPercentage returns the Percentage field if non-nil, zero value otherwise. + +### GetPercentageOk + +`func (o *Error) GetPercentageOk() (*float64, bool)` + +GetPercentageOk returns a tuple with the Percentage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPercentage + +`func (o *Error) SetPercentage(v float64)` + +SetPercentage sets Percentage field to given value. + +### HasPercentage + +`func (o *Error) HasPercentage() bool` + +HasPercentage returns a boolean if a field has been set. + +### GetNotes + +`func (o *Error) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *Error) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *Error) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *Error) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetMessage + +`func (o *Error) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Error) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Error) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Error) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetLastSeen + +`func (o *Error) GetLastSeen() string` + +GetLastSeen returns the LastSeen field if non-nil, zero value otherwise. + +### GetLastSeenOk + +`func (o *Error) GetLastSeenOk() (*string, bool)` + +GetLastSeenOk returns a tuple with the LastSeen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastSeen + +`func (o *Error) SetLastSeen(v string)` + +SetLastSeen sets LastSeen field to given value. + +### HasLastSeen + +`func (o *Error) HasLastSeen() bool` + +HasLastSeen returns a boolean if a field has been set. + +### GetDescription + +`func (o *Error) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Error) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Error) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Error) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCount + +`func (o *Error) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *Error) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *Error) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *Error) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetCode + +`func (o *Error) GetCode() int64` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *Error) GetCodeOk() (*int64, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *Error) SetCode(v int64)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *Error) HasCode() bool` + +HasCode returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ErrorsApi.md b/docs/ErrorsApi.md index e465489..bd9350f 100644 --- a/docs/ErrorsApi.md +++ b/docs/ErrorsApi.md @@ -7,26 +7,56 @@ Method | HTTP request | Description [**ListErrors**](ErrorsApi.md#ListErrors) | **Get** /data/v1/errors | List Errors -# **ListErrors** -> ListErrorsResponse ListErrors(ctx, optional) + +## ListErrors + +> ListErrorsResponse ListErrors(ctx).Filters(filters).Timeframe(timeframe).Execute() + List Errors -Returns a list of errors -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListErrorsOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.ErrorsApi.ListErrors(context.Background()).Filters(filters).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ErrorsApi.ListErrors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListErrors`: ListErrorsResponse + fmt.Fprintf(os.Stdout, "Response from `ErrorsApi.ListErrors`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListErrorsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListErrorsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | ### Return type @@ -38,8 +68,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/ExportsApi.md b/docs/ExportsApi.md index bc0a76b..be5bd9d 100644 --- a/docs/ExportsApi.md +++ b/docs/ExportsApi.md @@ -7,15 +7,50 @@ Method | HTTP request | Description [**ListExports**](ExportsApi.md#ListExports) | **Get** /data/v1/exports | List property video view export links -# **ListExports** -> ListExportsResponse ListExports(ctx, ) + +## ListExports + +> ListExportsResponse ListExports(ctx).Execute() + List property video view export links -Lists the available video view exports along with URLs to retrieve them -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.ExportsApi.ListExports(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ExportsApi.ListExports``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListExports`: ListExportsResponse + fmt.Fprintf(os.Stdout, "Response from `ExportsApi.ListExports`: %v\n", resp) +} +``` + +### Path Parameters + This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiListExportsRequest struct via the builder pattern + + ### Return type [**ListExportsResponse**](ListExportsResponse.md) @@ -26,8 +61,10 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/FilterValue.md b/docs/FilterValue.md index f84180c..aa50d82 100644 --- a/docs/FilterValue.md +++ b/docs/FilterValue.md @@ -1,10 +1,81 @@ # FilterValue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | | [optional] -**TotalCount** | **int64** | | [optional] +**Value** | Pointer to **string** | | [optional] +**TotalCount** | Pointer to **int64** | | [optional] + +## Methods + +### NewFilterValue + +`func NewFilterValue() *FilterValue` + +NewFilterValue instantiates a new FilterValue 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 + +### NewFilterValueWithDefaults + +`func NewFilterValueWithDefaults() *FilterValue` + +NewFilterValueWithDefaults instantiates a new FilterValue 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 + +### GetValue + +`func (o *FilterValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FilterValue) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FilterValue) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *FilterValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetTotalCount + +`func (o *FilterValue) GetTotalCount() int64` + +GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. + +### GetTotalCountOk + +`func (o *FilterValue) GetTotalCountOk() (*int64, bool)` + +GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalCount + +`func (o *FilterValue) SetTotalCount(v int64)` + +SetTotalCount sets TotalCount field to given value. + +### HasTotalCount + +`func (o *FilterValue) HasTotalCount() bool` + +HasTotalCount returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FiltersApi.md b/docs/FiltersApi.md index dbafe70..21bb82a 100644 --- a/docs/FiltersApi.md +++ b/docs/FiltersApi.md @@ -8,30 +8,66 @@ Method | HTTP request | Description [**ListFilters**](FiltersApi.md#ListFilters) | **Get** /data/v1/filters | List Filters -# **ListFilterValues** -> ListFilterValuesResponse ListFilterValues(ctx, fILTERID, optional) + +## ListFilterValues + +> ListFilterValuesResponse ListFilterValues(ctx, fILTERID).Limit(limit).Page(page).Filters(filters).Timeframe(timeframe).Execute() + Lists values for a specific filter -Deprecated: The API has been replaced by the list-dimension-values API call. Lists the values for a filter along with a total count of related views. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + fILTERID := "abcd1234" // string | ID of the Filter + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.FiltersApi.ListFilterValues(context.Background(), fILTERID).Limit(limit).Page(page).Filters(filters).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FiltersApi.ListFilterValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFilterValues`: ListFilterValuesResponse + fmt.Fprintf(os.Stdout, "Response from `FiltersApi.ListFilterValues`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **fILTERID** | **string**| ID of the Filter | - **optional** | ***ListFilterValuesOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**fILTERID** | **string** | ID of the Filter | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFilterValuesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListFilterValuesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | ### Return type @@ -43,20 +79,57 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListFilters** -> ListFiltersResponse ListFilters(ctx, ) +## ListFilters + +> ListFiltersResponse ListFilters(ctx).Execute() + List Filters -Deprecated: The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.FiltersApi.ListFilters(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FiltersApi.ListFilters``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFilters`: ListFiltersResponse + fmt.Fprintf(os.Stdout, "Response from `FiltersApi.ListFilters`: %v\n", resp) +} +``` + +### Path Parameters + This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiListFiltersRequest struct via the builder pattern + + ### Return type [**ListFiltersResponse**](ListFiltersResponse.md) @@ -67,8 +140,10 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/GetAssetInputInfoResponse.md b/docs/GetAssetInputInfoResponse.md index dbb8e89..b69d9ab 100644 --- a/docs/GetAssetInputInfoResponse.md +++ b/docs/GetAssetInputInfoResponse.md @@ -1,9 +1,55 @@ # GetAssetInputInfoResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]InputInfo**](InputInfo.md) | | [optional] +**Data** | Pointer to [**[]InputInfo**](InputInfo.md) | | [optional] + +## Methods + +### NewGetAssetInputInfoResponse + +`func NewGetAssetInputInfoResponse() *GetAssetInputInfoResponse` + +NewGetAssetInputInfoResponse instantiates a new GetAssetInputInfoResponse 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 + +### NewGetAssetInputInfoResponseWithDefaults + +`func NewGetAssetInputInfoResponseWithDefaults() *GetAssetInputInfoResponse` + +NewGetAssetInputInfoResponseWithDefaults instantiates a new GetAssetInputInfoResponse 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 + +### GetData + +`func (o *GetAssetInputInfoResponse) GetData() []InputInfo` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetAssetInputInfoResponse) GetDataOk() (*[]InputInfo, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetAssetInputInfoResponse) SetData(v []InputInfo)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetAssetInputInfoResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAssetOrLiveStreamIdResponse.md b/docs/GetAssetOrLiveStreamIdResponse.md index 495c989..0b1f0c8 100644 --- a/docs/GetAssetOrLiveStreamIdResponse.md +++ b/docs/GetAssetOrLiveStreamIdResponse.md @@ -1,9 +1,55 @@ # GetAssetOrLiveStreamIdResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**GetAssetOrLiveStreamIdResponseData**](GetAssetOrLiveStreamIdResponse_data.md) | | [optional] +**Data** | Pointer to [**GetAssetOrLiveStreamIdResponseData**](GetAssetOrLiveStreamIdResponse_data.md) | | [optional] + +## Methods + +### NewGetAssetOrLiveStreamIdResponse + +`func NewGetAssetOrLiveStreamIdResponse() *GetAssetOrLiveStreamIdResponse` + +NewGetAssetOrLiveStreamIdResponse instantiates a new GetAssetOrLiveStreamIdResponse 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 + +### NewGetAssetOrLiveStreamIdResponseWithDefaults + +`func NewGetAssetOrLiveStreamIdResponseWithDefaults() *GetAssetOrLiveStreamIdResponse` + +NewGetAssetOrLiveStreamIdResponseWithDefaults instantiates a new GetAssetOrLiveStreamIdResponse 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 + +### GetData + +`func (o *GetAssetOrLiveStreamIdResponse) GetData() GetAssetOrLiveStreamIdResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetAssetOrLiveStreamIdResponse) GetDataOk() (*GetAssetOrLiveStreamIdResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetAssetOrLiveStreamIdResponse) SetData(v GetAssetOrLiveStreamIdResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetAssetOrLiveStreamIdResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAssetOrLiveStreamIdResponseData.md b/docs/GetAssetOrLiveStreamIdResponseData.md index 6e5b14d..51a5e3c 100644 --- a/docs/GetAssetOrLiveStreamIdResponseData.md +++ b/docs/GetAssetOrLiveStreamIdResponseData.md @@ -1,11 +1,107 @@ # GetAssetOrLiveStreamIdResponseData ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | The Playback ID used to retrieve the corresponding asset or the live stream ID | [optional] -**Policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional] -**Object** | [**GetAssetOrLiveStreamIdResponseDataObject**](GetAssetOrLiveStreamIdResponse_data_object.md) | | [optional] +**Id** | Pointer to **string** | The Playback ID used to retrieve the corresponding asset or the live stream ID | [optional] +**Policy** | Pointer to [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional] +**Object** | Pointer to [**GetAssetOrLiveStreamIdResponseDataObject**](GetAssetOrLiveStreamIdResponse_data_object.md) | | [optional] + +## Methods + +### NewGetAssetOrLiveStreamIdResponseData + +`func NewGetAssetOrLiveStreamIdResponseData() *GetAssetOrLiveStreamIdResponseData` + +NewGetAssetOrLiveStreamIdResponseData instantiates a new GetAssetOrLiveStreamIdResponseData 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 + +### NewGetAssetOrLiveStreamIdResponseDataWithDefaults + +`func NewGetAssetOrLiveStreamIdResponseDataWithDefaults() *GetAssetOrLiveStreamIdResponseData` + +NewGetAssetOrLiveStreamIdResponseDataWithDefaults instantiates a new GetAssetOrLiveStreamIdResponseData 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 + +### GetId + +`func (o *GetAssetOrLiveStreamIdResponseData) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetAssetOrLiveStreamIdResponseData) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetAssetOrLiveStreamIdResponseData) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetAssetOrLiveStreamIdResponseData) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetPolicy + +`func (o *GetAssetOrLiveStreamIdResponseData) GetPolicy() PlaybackPolicy` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *GetAssetOrLiveStreamIdResponseData) GetPolicyOk() (*PlaybackPolicy, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *GetAssetOrLiveStreamIdResponseData) SetPolicy(v PlaybackPolicy)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *GetAssetOrLiveStreamIdResponseData) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetObject + +`func (o *GetAssetOrLiveStreamIdResponseData) GetObject() GetAssetOrLiveStreamIdResponseDataObject` + +GetObject returns the Object field if non-nil, zero value otherwise. + +### GetObjectOk + +`func (o *GetAssetOrLiveStreamIdResponseData) GetObjectOk() (*GetAssetOrLiveStreamIdResponseDataObject, bool)` + +GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObject + +`func (o *GetAssetOrLiveStreamIdResponseData) SetObject(v GetAssetOrLiveStreamIdResponseDataObject)` + +SetObject sets Object field to given value. + +### HasObject + +`func (o *GetAssetOrLiveStreamIdResponseData) HasObject() bool` + +HasObject returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAssetOrLiveStreamIdResponseDataObject.md b/docs/GetAssetOrLiveStreamIdResponseDataObject.md index 95c294b..c016ca5 100644 --- a/docs/GetAssetOrLiveStreamIdResponseDataObject.md +++ b/docs/GetAssetOrLiveStreamIdResponseDataObject.md @@ -1,10 +1,81 @@ # GetAssetOrLiveStreamIdResponseDataObject ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | The identifier of the object. | [optional] -**Type** | **string** | Identifies the object type associated with the playback ID. | [optional] +**Id** | Pointer to **string** | The identifier of the object. | [optional] +**Type** | Pointer to **string** | Identifies the object type associated with the playback ID. | [optional] + +## Methods + +### NewGetAssetOrLiveStreamIdResponseDataObject + +`func NewGetAssetOrLiveStreamIdResponseDataObject() *GetAssetOrLiveStreamIdResponseDataObject` + +NewGetAssetOrLiveStreamIdResponseDataObject instantiates a new GetAssetOrLiveStreamIdResponseDataObject 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 + +### NewGetAssetOrLiveStreamIdResponseDataObjectWithDefaults + +`func NewGetAssetOrLiveStreamIdResponseDataObjectWithDefaults() *GetAssetOrLiveStreamIdResponseDataObject` + +NewGetAssetOrLiveStreamIdResponseDataObjectWithDefaults instantiates a new GetAssetOrLiveStreamIdResponseDataObject 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 + +### GetId + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GetAssetOrLiveStreamIdResponseDataObject) HasType() bool` + +HasType returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetAssetPlaybackIdResponse.md b/docs/GetAssetPlaybackIdResponse.md deleted file mode 100644 index e1be8b4..0000000 --- a/docs/GetAssetPlaybackIdResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAssetPlaybackIdResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**PlaybackId**](.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetMetricTimeseriesDataResponse.md b/docs/GetMetricTimeseriesDataResponse.md index 3d990df..5c4ab1b 100644 --- a/docs/GetMetricTimeseriesDataResponse.md +++ b/docs/GetMetricTimeseriesDataResponse.md @@ -1,11 +1,107 @@ # GetMetricTimeseriesDataResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[][]string**](array.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to **[][]string** | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewGetMetricTimeseriesDataResponse + +`func NewGetMetricTimeseriesDataResponse() *GetMetricTimeseriesDataResponse` + +NewGetMetricTimeseriesDataResponse instantiates a new GetMetricTimeseriesDataResponse 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 + +### NewGetMetricTimeseriesDataResponseWithDefaults + +`func NewGetMetricTimeseriesDataResponseWithDefaults() *GetMetricTimeseriesDataResponse` + +NewGetMetricTimeseriesDataResponseWithDefaults instantiates a new GetMetricTimeseriesDataResponse 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 + +### GetData + +`func (o *GetMetricTimeseriesDataResponse) GetData() [][]string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetMetricTimeseriesDataResponse) GetDataOk() (*[][]string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetMetricTimeseriesDataResponse) SetData(v [][]string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetMetricTimeseriesDataResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *GetMetricTimeseriesDataResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *GetMetricTimeseriesDataResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *GetMetricTimeseriesDataResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *GetMetricTimeseriesDataResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *GetMetricTimeseriesDataResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *GetMetricTimeseriesDataResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *GetMetricTimeseriesDataResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *GetMetricTimeseriesDataResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetOverallValuesResponse.md b/docs/GetOverallValuesResponse.md index 669d82d..44f52c9 100644 --- a/docs/GetOverallValuesResponse.md +++ b/docs/GetOverallValuesResponse.md @@ -1,11 +1,107 @@ # GetOverallValuesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**OverallValues**](OverallValues.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**OverallValues**](OverallValues.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewGetOverallValuesResponse + +`func NewGetOverallValuesResponse() *GetOverallValuesResponse` + +NewGetOverallValuesResponse instantiates a new GetOverallValuesResponse 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 + +### NewGetOverallValuesResponseWithDefaults + +`func NewGetOverallValuesResponseWithDefaults() *GetOverallValuesResponse` + +NewGetOverallValuesResponseWithDefaults instantiates a new GetOverallValuesResponse 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 + +### GetData + +`func (o *GetOverallValuesResponse) GetData() OverallValues` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetOverallValuesResponse) GetDataOk() (*OverallValues, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetOverallValuesResponse) SetData(v OverallValues)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetOverallValuesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *GetOverallValuesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *GetOverallValuesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *GetOverallValuesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *GetOverallValuesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *GetOverallValuesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *GetOverallValuesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *GetOverallValuesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *GetOverallValuesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetRealTimeBreakdownResponse.md b/docs/GetRealTimeBreakdownResponse.md index b6fdc16..2f18392 100644 --- a/docs/GetRealTimeBreakdownResponse.md +++ b/docs/GetRealTimeBreakdownResponse.md @@ -1,11 +1,107 @@ # GetRealTimeBreakdownResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]RealTimeBreakdownValue**](RealTimeBreakdownValue.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]RealTimeBreakdownValue**](RealTimeBreakdownValue.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewGetRealTimeBreakdownResponse + +`func NewGetRealTimeBreakdownResponse() *GetRealTimeBreakdownResponse` + +NewGetRealTimeBreakdownResponse instantiates a new GetRealTimeBreakdownResponse 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 + +### NewGetRealTimeBreakdownResponseWithDefaults + +`func NewGetRealTimeBreakdownResponseWithDefaults() *GetRealTimeBreakdownResponse` + +NewGetRealTimeBreakdownResponseWithDefaults instantiates a new GetRealTimeBreakdownResponse 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 + +### GetData + +`func (o *GetRealTimeBreakdownResponse) GetData() []RealTimeBreakdownValue` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetRealTimeBreakdownResponse) GetDataOk() (*[]RealTimeBreakdownValue, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetRealTimeBreakdownResponse) SetData(v []RealTimeBreakdownValue)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetRealTimeBreakdownResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *GetRealTimeBreakdownResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *GetRealTimeBreakdownResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *GetRealTimeBreakdownResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *GetRealTimeBreakdownResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *GetRealTimeBreakdownResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *GetRealTimeBreakdownResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *GetRealTimeBreakdownResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *GetRealTimeBreakdownResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetRealTimeHistogramTimeseriesResponse.md b/docs/GetRealTimeHistogramTimeseriesResponse.md index 680c501..0ee9266 100644 --- a/docs/GetRealTimeHistogramTimeseriesResponse.md +++ b/docs/GetRealTimeHistogramTimeseriesResponse.md @@ -1,12 +1,133 @@ # GetRealTimeHistogramTimeseriesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Meta** | [**GetRealTimeHistogramTimeseriesResponseMeta**](GetRealTimeHistogramTimeseriesResponse_meta.md) | | [optional] -**Data** | [**[]RealTimeHistogramTimeseriesDatapoint**](RealTimeHistogramTimeseriesDatapoint.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Meta** | Pointer to [**GetRealTimeHistogramTimeseriesResponseMeta**](GetRealTimeHistogramTimeseriesResponse_meta.md) | | [optional] +**Data** | Pointer to [**[]RealTimeHistogramTimeseriesDatapoint**](RealTimeHistogramTimeseriesDatapoint.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewGetRealTimeHistogramTimeseriesResponse + +`func NewGetRealTimeHistogramTimeseriesResponse() *GetRealTimeHistogramTimeseriesResponse` + +NewGetRealTimeHistogramTimeseriesResponse instantiates a new GetRealTimeHistogramTimeseriesResponse 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 + +### NewGetRealTimeHistogramTimeseriesResponseWithDefaults + +`func NewGetRealTimeHistogramTimeseriesResponseWithDefaults() *GetRealTimeHistogramTimeseriesResponse` + +NewGetRealTimeHistogramTimeseriesResponseWithDefaults instantiates a new GetRealTimeHistogramTimeseriesResponse 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 + +### GetMeta + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetMeta() GetRealTimeHistogramTimeseriesResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetMetaOk() (*GetRealTimeHistogramTimeseriesResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *GetRealTimeHistogramTimeseriesResponse) SetMeta(v GetRealTimeHistogramTimeseriesResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *GetRealTimeHistogramTimeseriesResponse) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + +### GetData + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetData() []RealTimeHistogramTimeseriesDatapoint` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetDataOk() (*[]RealTimeHistogramTimeseriesDatapoint, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetRealTimeHistogramTimeseriesResponse) SetData(v []RealTimeHistogramTimeseriesDatapoint)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetRealTimeHistogramTimeseriesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *GetRealTimeHistogramTimeseriesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *GetRealTimeHistogramTimeseriesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *GetRealTimeHistogramTimeseriesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *GetRealTimeHistogramTimeseriesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *GetRealTimeHistogramTimeseriesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetRealTimeHistogramTimeseriesResponseMeta.md b/docs/GetRealTimeHistogramTimeseriesResponseMeta.md index 7a51c22..608ad8c 100644 --- a/docs/GetRealTimeHistogramTimeseriesResponseMeta.md +++ b/docs/GetRealTimeHistogramTimeseriesResponseMeta.md @@ -1,9 +1,55 @@ # GetRealTimeHistogramTimeseriesResponseMeta ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Buckets** | [**[]RealTimeHistogramTimeseriesBucket**](RealTimeHistogramTimeseriesBucket.md) | | [optional] +**Buckets** | Pointer to [**[]RealTimeHistogramTimeseriesBucket**](RealTimeHistogramTimeseriesBucket.md) | | [optional] + +## Methods + +### NewGetRealTimeHistogramTimeseriesResponseMeta + +`func NewGetRealTimeHistogramTimeseriesResponseMeta() *GetRealTimeHistogramTimeseriesResponseMeta` + +NewGetRealTimeHistogramTimeseriesResponseMeta instantiates a new GetRealTimeHistogramTimeseriesResponseMeta 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 + +### NewGetRealTimeHistogramTimeseriesResponseMetaWithDefaults + +`func NewGetRealTimeHistogramTimeseriesResponseMetaWithDefaults() *GetRealTimeHistogramTimeseriesResponseMeta` + +NewGetRealTimeHistogramTimeseriesResponseMetaWithDefaults instantiates a new GetRealTimeHistogramTimeseriesResponseMeta 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 + +### GetBuckets + +`func (o *GetRealTimeHistogramTimeseriesResponseMeta) GetBuckets() []RealTimeHistogramTimeseriesBucket` + +GetBuckets returns the Buckets field if non-nil, zero value otherwise. + +### GetBucketsOk + +`func (o *GetRealTimeHistogramTimeseriesResponseMeta) GetBucketsOk() (*[]RealTimeHistogramTimeseriesBucket, bool)` + +GetBucketsOk returns a tuple with the Buckets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuckets + +`func (o *GetRealTimeHistogramTimeseriesResponseMeta) SetBuckets(v []RealTimeHistogramTimeseriesBucket)` + +SetBuckets sets Buckets field to given value. + +### HasBuckets + +`func (o *GetRealTimeHistogramTimeseriesResponseMeta) HasBuckets() bool` + +HasBuckets returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetRealTimeTimeseriesResponse.md b/docs/GetRealTimeTimeseriesResponse.md index 0510fa8..c5120a4 100644 --- a/docs/GetRealTimeTimeseriesResponse.md +++ b/docs/GetRealTimeTimeseriesResponse.md @@ -1,11 +1,107 @@ # GetRealTimeTimeseriesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]RealTimeTimeseriesDatapoint**](RealTimeTimeseriesDatapoint.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]RealTimeTimeseriesDatapoint**](RealTimeTimeseriesDatapoint.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewGetRealTimeTimeseriesResponse + +`func NewGetRealTimeTimeseriesResponse() *GetRealTimeTimeseriesResponse` + +NewGetRealTimeTimeseriesResponse instantiates a new GetRealTimeTimeseriesResponse 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 + +### NewGetRealTimeTimeseriesResponseWithDefaults + +`func NewGetRealTimeTimeseriesResponseWithDefaults() *GetRealTimeTimeseriesResponse` + +NewGetRealTimeTimeseriesResponseWithDefaults instantiates a new GetRealTimeTimeseriesResponse 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 + +### GetData + +`func (o *GetRealTimeTimeseriesResponse) GetData() []RealTimeTimeseriesDatapoint` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetRealTimeTimeseriesResponse) GetDataOk() (*[]RealTimeTimeseriesDatapoint, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetRealTimeTimeseriesResponse) SetData(v []RealTimeTimeseriesDatapoint)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetRealTimeTimeseriesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *GetRealTimeTimeseriesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *GetRealTimeTimeseriesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *GetRealTimeTimeseriesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *GetRealTimeTimeseriesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *GetRealTimeTimeseriesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *GetRealTimeTimeseriesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *GetRealTimeTimeseriesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *GetRealTimeTimeseriesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Incident.md b/docs/Incident.md index 41d5416..dc28a23 100644 --- a/docs/Incident.md +++ b/docs/Incident.md @@ -1,29 +1,575 @@ # Incident ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Threshold** | **float64** | | [optional] -**Status** | **string** | | [optional] -**StartedAt** | **string** | | [optional] -**Severity** | **string** | | [optional] -**SampleSizeUnit** | **string** | | [optional] -**SampleSize** | **int64** | | [optional] -**ResolvedAt** | **string** | | [optional] -**Notifications** | [**[]IncidentNotification**](IncidentNotification.md) | | [optional] -**NotificationRules** | [**[]IncidentNotificationRule**](IncidentNotificationRule.md) | | [optional] -**Measurement** | **string** | | [optional] -**MeasuredValueOnClose** | **float64** | | [optional] -**MeasuredValue** | **float64** | | [optional] -**IncidentKey** | **string** | | [optional] -**Impact** | **string** | | [optional] -**Id** | **string** | | [optional] -**ErrorDescription** | **string** | | [optional] -**Description** | **string** | | [optional] -**Breakdowns** | [**[]IncidentBreakdown**](IncidentBreakdown.md) | | [optional] -**AffectedViewsPerHourOnOpen** | **int64** | | [optional] -**AffectedViewsPerHour** | **int64** | | [optional] -**AffectedViews** | **int64** | | [optional] +**Threshold** | Pointer to **float64** | | [optional] +**Status** | Pointer to **string** | | [optional] +**StartedAt** | Pointer to **string** | | [optional] +**Severity** | Pointer to **string** | | [optional] +**SampleSizeUnit** | Pointer to **string** | | [optional] +**SampleSize** | Pointer to **int64** | | [optional] +**ResolvedAt** | Pointer to **string** | | [optional] +**Notifications** | Pointer to [**[]IncidentNotification**](IncidentNotification.md) | | [optional] +**NotificationRules** | Pointer to [**[]IncidentNotificationRule**](IncidentNotificationRule.md) | | [optional] +**Measurement** | Pointer to **string** | | [optional] +**MeasuredValueOnClose** | Pointer to **float64** | | [optional] +**MeasuredValue** | Pointer to **float64** | | [optional] +**IncidentKey** | Pointer to **string** | | [optional] +**Impact** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**ErrorDescription** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Breakdowns** | Pointer to [**[]IncidentBreakdown**](IncidentBreakdown.md) | | [optional] +**AffectedViewsPerHourOnOpen** | Pointer to **int64** | | [optional] +**AffectedViewsPerHour** | Pointer to **int64** | | [optional] +**AffectedViews** | Pointer to **int64** | | [optional] + +## Methods + +### NewIncident + +`func NewIncident() *Incident` + +NewIncident instantiates a new Incident 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 + +### NewIncidentWithDefaults + +`func NewIncidentWithDefaults() *Incident` + +NewIncidentWithDefaults instantiates a new Incident 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 + +### GetThreshold + +`func (o *Incident) GetThreshold() float64` + +GetThreshold returns the Threshold field if non-nil, zero value otherwise. + +### GetThresholdOk + +`func (o *Incident) GetThresholdOk() (*float64, bool)` + +GetThresholdOk returns a tuple with the Threshold field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreshold + +`func (o *Incident) SetThreshold(v float64)` + +SetThreshold sets Threshold field to given value. + +### HasThreshold + +`func (o *Incident) HasThreshold() bool` + +HasThreshold returns a boolean if a field has been set. + +### GetStatus + +`func (o *Incident) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Incident) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Incident) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Incident) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStartedAt + +`func (o *Incident) GetStartedAt() string` + +GetStartedAt returns the StartedAt field if non-nil, zero value otherwise. + +### GetStartedAtOk + +`func (o *Incident) GetStartedAtOk() (*string, bool)` + +GetStartedAtOk returns a tuple with the StartedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartedAt + +`func (o *Incident) SetStartedAt(v string)` + +SetStartedAt sets StartedAt field to given value. + +### HasStartedAt + +`func (o *Incident) HasStartedAt() bool` + +HasStartedAt returns a boolean if a field has been set. + +### GetSeverity + +`func (o *Incident) GetSeverity() string` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *Incident) GetSeverityOk() (*string, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *Incident) SetSeverity(v string)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *Incident) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetSampleSizeUnit + +`func (o *Incident) GetSampleSizeUnit() string` + +GetSampleSizeUnit returns the SampleSizeUnit field if non-nil, zero value otherwise. + +### GetSampleSizeUnitOk + +`func (o *Incident) GetSampleSizeUnitOk() (*string, bool)` + +GetSampleSizeUnitOk returns a tuple with the SampleSizeUnit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleSizeUnit + +`func (o *Incident) SetSampleSizeUnit(v string)` + +SetSampleSizeUnit sets SampleSizeUnit field to given value. + +### HasSampleSizeUnit + +`func (o *Incident) HasSampleSizeUnit() bool` + +HasSampleSizeUnit returns a boolean if a field has been set. + +### GetSampleSize + +`func (o *Incident) GetSampleSize() int64` + +GetSampleSize returns the SampleSize field if non-nil, zero value otherwise. + +### GetSampleSizeOk + +`func (o *Incident) GetSampleSizeOk() (*int64, bool)` + +GetSampleSizeOk returns a tuple with the SampleSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleSize + +`func (o *Incident) SetSampleSize(v int64)` + +SetSampleSize sets SampleSize field to given value. + +### HasSampleSize + +`func (o *Incident) HasSampleSize() bool` + +HasSampleSize returns a boolean if a field has been set. + +### GetResolvedAt + +`func (o *Incident) GetResolvedAt() string` + +GetResolvedAt returns the ResolvedAt field if non-nil, zero value otherwise. + +### GetResolvedAtOk + +`func (o *Incident) GetResolvedAtOk() (*string, bool)` + +GetResolvedAtOk returns a tuple with the ResolvedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResolvedAt + +`func (o *Incident) SetResolvedAt(v string)` + +SetResolvedAt sets ResolvedAt field to given value. + +### HasResolvedAt + +`func (o *Incident) HasResolvedAt() bool` + +HasResolvedAt returns a boolean if a field has been set. + +### GetNotifications + +`func (o *Incident) GetNotifications() []IncidentNotification` + +GetNotifications returns the Notifications field if non-nil, zero value otherwise. + +### GetNotificationsOk + +`func (o *Incident) GetNotificationsOk() (*[]IncidentNotification, bool)` + +GetNotificationsOk returns a tuple with the Notifications field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotifications + +`func (o *Incident) SetNotifications(v []IncidentNotification)` + +SetNotifications sets Notifications field to given value. + +### HasNotifications + +`func (o *Incident) HasNotifications() bool` + +HasNotifications returns a boolean if a field has been set. + +### GetNotificationRules + +`func (o *Incident) GetNotificationRules() []IncidentNotificationRule` + +GetNotificationRules returns the NotificationRules field if non-nil, zero value otherwise. + +### GetNotificationRulesOk + +`func (o *Incident) GetNotificationRulesOk() (*[]IncidentNotificationRule, bool)` + +GetNotificationRulesOk returns a tuple with the NotificationRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotificationRules + +`func (o *Incident) SetNotificationRules(v []IncidentNotificationRule)` + +SetNotificationRules sets NotificationRules field to given value. + +### HasNotificationRules + +`func (o *Incident) HasNotificationRules() bool` + +HasNotificationRules returns a boolean if a field has been set. + +### GetMeasurement + +`func (o *Incident) GetMeasurement() string` + +GetMeasurement returns the Measurement field if non-nil, zero value otherwise. + +### GetMeasurementOk + +`func (o *Incident) GetMeasurementOk() (*string, bool)` + +GetMeasurementOk returns a tuple with the Measurement field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeasurement + +`func (o *Incident) SetMeasurement(v string)` + +SetMeasurement sets Measurement field to given value. + +### HasMeasurement + +`func (o *Incident) HasMeasurement() bool` + +HasMeasurement returns a boolean if a field has been set. + +### GetMeasuredValueOnClose + +`func (o *Incident) GetMeasuredValueOnClose() float64` + +GetMeasuredValueOnClose returns the MeasuredValueOnClose field if non-nil, zero value otherwise. + +### GetMeasuredValueOnCloseOk + +`func (o *Incident) GetMeasuredValueOnCloseOk() (*float64, bool)` + +GetMeasuredValueOnCloseOk returns a tuple with the MeasuredValueOnClose field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeasuredValueOnClose + +`func (o *Incident) SetMeasuredValueOnClose(v float64)` + +SetMeasuredValueOnClose sets MeasuredValueOnClose field to given value. + +### HasMeasuredValueOnClose + +`func (o *Incident) HasMeasuredValueOnClose() bool` + +HasMeasuredValueOnClose returns a boolean if a field has been set. + +### GetMeasuredValue + +`func (o *Incident) GetMeasuredValue() float64` + +GetMeasuredValue returns the MeasuredValue field if non-nil, zero value otherwise. + +### GetMeasuredValueOk + +`func (o *Incident) GetMeasuredValueOk() (*float64, bool)` + +GetMeasuredValueOk returns a tuple with the MeasuredValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeasuredValue + +`func (o *Incident) SetMeasuredValue(v float64)` + +SetMeasuredValue sets MeasuredValue field to given value. + +### HasMeasuredValue + +`func (o *Incident) HasMeasuredValue() bool` + +HasMeasuredValue returns a boolean if a field has been set. + +### GetIncidentKey + +`func (o *Incident) GetIncidentKey() string` + +GetIncidentKey returns the IncidentKey field if non-nil, zero value otherwise. + +### GetIncidentKeyOk + +`func (o *Incident) GetIncidentKeyOk() (*string, bool)` + +GetIncidentKeyOk returns a tuple with the IncidentKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncidentKey + +`func (o *Incident) SetIncidentKey(v string)` + +SetIncidentKey sets IncidentKey field to given value. + +### HasIncidentKey + +`func (o *Incident) HasIncidentKey() bool` + +HasIncidentKey returns a boolean if a field has been set. + +### GetImpact + +`func (o *Incident) GetImpact() string` + +GetImpact returns the Impact field if non-nil, zero value otherwise. + +### GetImpactOk + +`func (o *Incident) GetImpactOk() (*string, bool)` + +GetImpactOk returns a tuple with the Impact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImpact + +`func (o *Incident) SetImpact(v string)` + +SetImpact sets Impact field to given value. + +### HasImpact + +`func (o *Incident) HasImpact() bool` + +HasImpact returns a boolean if a field has been set. + +### GetId + +`func (o *Incident) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Incident) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Incident) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Incident) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetErrorDescription + +`func (o *Incident) GetErrorDescription() string` + +GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. + +### GetErrorDescriptionOk + +`func (o *Incident) GetErrorDescriptionOk() (*string, bool)` + +GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorDescription + +`func (o *Incident) SetErrorDescription(v string)` + +SetErrorDescription sets ErrorDescription field to given value. + +### HasErrorDescription + +`func (o *Incident) HasErrorDescription() bool` + +HasErrorDescription returns a boolean if a field has been set. + +### GetDescription + +`func (o *Incident) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Incident) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Incident) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Incident) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetBreakdowns + +`func (o *Incident) GetBreakdowns() []IncidentBreakdown` + +GetBreakdowns returns the Breakdowns field if non-nil, zero value otherwise. + +### GetBreakdownsOk + +`func (o *Incident) GetBreakdownsOk() (*[]IncidentBreakdown, bool)` + +GetBreakdownsOk returns a tuple with the Breakdowns field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBreakdowns + +`func (o *Incident) SetBreakdowns(v []IncidentBreakdown)` + +SetBreakdowns sets Breakdowns field to given value. + +### HasBreakdowns + +`func (o *Incident) HasBreakdowns() bool` + +HasBreakdowns returns a boolean if a field has been set. + +### GetAffectedViewsPerHourOnOpen + +`func (o *Incident) GetAffectedViewsPerHourOnOpen() int64` + +GetAffectedViewsPerHourOnOpen returns the AffectedViewsPerHourOnOpen field if non-nil, zero value otherwise. + +### GetAffectedViewsPerHourOnOpenOk + +`func (o *Incident) GetAffectedViewsPerHourOnOpenOk() (*int64, bool)` + +GetAffectedViewsPerHourOnOpenOk returns a tuple with the AffectedViewsPerHourOnOpen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAffectedViewsPerHourOnOpen + +`func (o *Incident) SetAffectedViewsPerHourOnOpen(v int64)` + +SetAffectedViewsPerHourOnOpen sets AffectedViewsPerHourOnOpen field to given value. + +### HasAffectedViewsPerHourOnOpen + +`func (o *Incident) HasAffectedViewsPerHourOnOpen() bool` + +HasAffectedViewsPerHourOnOpen returns a boolean if a field has been set. + +### GetAffectedViewsPerHour + +`func (o *Incident) GetAffectedViewsPerHour() int64` + +GetAffectedViewsPerHour returns the AffectedViewsPerHour field if non-nil, zero value otherwise. + +### GetAffectedViewsPerHourOk + +`func (o *Incident) GetAffectedViewsPerHourOk() (*int64, bool)` + +GetAffectedViewsPerHourOk returns a tuple with the AffectedViewsPerHour field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAffectedViewsPerHour + +`func (o *Incident) SetAffectedViewsPerHour(v int64)` + +SetAffectedViewsPerHour sets AffectedViewsPerHour field to given value. + +### HasAffectedViewsPerHour + +`func (o *Incident) HasAffectedViewsPerHour() bool` + +HasAffectedViewsPerHour returns a boolean if a field has been set. + +### GetAffectedViews + +`func (o *Incident) GetAffectedViews() int64` + +GetAffectedViews returns the AffectedViews field if non-nil, zero value otherwise. + +### GetAffectedViewsOk + +`func (o *Incident) GetAffectedViewsOk() (*int64, bool)` + +GetAffectedViewsOk returns a tuple with the AffectedViews field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAffectedViews + +`func (o *Incident) SetAffectedViews(v int64)` + +SetAffectedViews sets AffectedViews field to given value. + +### HasAffectedViews + +`func (o *Incident) HasAffectedViews() bool` + +HasAffectedViews returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncidentBreakdown.md b/docs/IncidentBreakdown.md index 08ad0da..9835ad4 100644 --- a/docs/IncidentBreakdown.md +++ b/docs/IncidentBreakdown.md @@ -1,11 +1,107 @@ # IncidentBreakdown ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | | [optional] -**Name** | **string** | | [optional] -**Id** | **string** | | [optional] +**Value** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] + +## Methods + +### NewIncidentBreakdown + +`func NewIncidentBreakdown() *IncidentBreakdown` + +NewIncidentBreakdown instantiates a new IncidentBreakdown 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 + +### NewIncidentBreakdownWithDefaults + +`func NewIncidentBreakdownWithDefaults() *IncidentBreakdown` + +NewIncidentBreakdownWithDefaults instantiates a new IncidentBreakdown 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 + +### GetValue + +`func (o *IncidentBreakdown) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IncidentBreakdown) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IncidentBreakdown) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *IncidentBreakdown) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetName + +`func (o *IncidentBreakdown) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IncidentBreakdown) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IncidentBreakdown) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *IncidentBreakdown) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetId + +`func (o *IncidentBreakdown) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IncidentBreakdown) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IncidentBreakdown) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *IncidentBreakdown) HasId() bool` + +HasId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncidentNotification.md b/docs/IncidentNotification.md index b8fa797..9a673d7 100644 --- a/docs/IncidentNotification.md +++ b/docs/IncidentNotification.md @@ -1,11 +1,107 @@ # IncidentNotification ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**QueuedAt** | **string** | | [optional] -**Id** | **int64** | | [optional] -**AttemptedAt** | **string** | | [optional] +**QueuedAt** | Pointer to **string** | | [optional] +**Id** | Pointer to **int64** | | [optional] +**AttemptedAt** | Pointer to **string** | | [optional] + +## Methods + +### NewIncidentNotification + +`func NewIncidentNotification() *IncidentNotification` + +NewIncidentNotification instantiates a new IncidentNotification 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 + +### NewIncidentNotificationWithDefaults + +`func NewIncidentNotificationWithDefaults() *IncidentNotification` + +NewIncidentNotificationWithDefaults instantiates a new IncidentNotification 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 + +### GetQueuedAt + +`func (o *IncidentNotification) GetQueuedAt() string` + +GetQueuedAt returns the QueuedAt field if non-nil, zero value otherwise. + +### GetQueuedAtOk + +`func (o *IncidentNotification) GetQueuedAtOk() (*string, bool)` + +GetQueuedAtOk returns a tuple with the QueuedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueuedAt + +`func (o *IncidentNotification) SetQueuedAt(v string)` + +SetQueuedAt sets QueuedAt field to given value. + +### HasQueuedAt + +`func (o *IncidentNotification) HasQueuedAt() bool` + +HasQueuedAt returns a boolean if a field has been set. + +### GetId + +`func (o *IncidentNotification) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IncidentNotification) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IncidentNotification) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *IncidentNotification) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetAttemptedAt + +`func (o *IncidentNotification) GetAttemptedAt() string` + +GetAttemptedAt returns the AttemptedAt field if non-nil, zero value otherwise. + +### GetAttemptedAtOk + +`func (o *IncidentNotification) GetAttemptedAtOk() (*string, bool)` + +GetAttemptedAtOk returns a tuple with the AttemptedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttemptedAt + +`func (o *IncidentNotification) SetAttemptedAt(v string)` + +SetAttemptedAt sets AttemptedAt field to given value. + +### HasAttemptedAt + +`func (o *IncidentNotification) HasAttemptedAt() bool` + +HasAttemptedAt returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncidentNotificationRule.md b/docs/IncidentNotificationRule.md index 8d14acb..bde637c 100644 --- a/docs/IncidentNotificationRule.md +++ b/docs/IncidentNotificationRule.md @@ -1,13 +1,159 @@ # IncidentNotificationRule ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | **string** | | [optional] -**Rules** | [**[]NotificationRule**](NotificationRule.md) | | [optional] -**PropertyId** | **string** | | [optional] -**Id** | **string** | | [optional] -**Action** | **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Rules** | Pointer to [**[]NotificationRule**](NotificationRule.md) | | [optional] +**PropertyId** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**Action** | Pointer to **string** | | [optional] + +## Methods + +### NewIncidentNotificationRule + +`func NewIncidentNotificationRule() *IncidentNotificationRule` + +NewIncidentNotificationRule instantiates a new IncidentNotificationRule 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 + +### NewIncidentNotificationRuleWithDefaults + +`func NewIncidentNotificationRuleWithDefaults() *IncidentNotificationRule` + +NewIncidentNotificationRuleWithDefaults instantiates a new IncidentNotificationRule 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 + +### GetStatus + +`func (o *IncidentNotificationRule) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *IncidentNotificationRule) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *IncidentNotificationRule) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *IncidentNotificationRule) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetRules + +`func (o *IncidentNotificationRule) GetRules() []NotificationRule` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *IncidentNotificationRule) GetRulesOk() (*[]NotificationRule, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *IncidentNotificationRule) SetRules(v []NotificationRule)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *IncidentNotificationRule) HasRules() bool` + +HasRules returns a boolean if a field has been set. + +### GetPropertyId + +`func (o *IncidentNotificationRule) GetPropertyId() string` + +GetPropertyId returns the PropertyId field if non-nil, zero value otherwise. + +### GetPropertyIdOk + +`func (o *IncidentNotificationRule) GetPropertyIdOk() (*string, bool)` + +GetPropertyIdOk returns a tuple with the PropertyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPropertyId + +`func (o *IncidentNotificationRule) SetPropertyId(v string)` + +SetPropertyId sets PropertyId field to given value. + +### HasPropertyId + +`func (o *IncidentNotificationRule) HasPropertyId() bool` + +HasPropertyId returns a boolean if a field has been set. + +### GetId + +`func (o *IncidentNotificationRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IncidentNotificationRule) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IncidentNotificationRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *IncidentNotificationRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetAction + +`func (o *IncidentNotificationRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *IncidentNotificationRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *IncidentNotificationRule) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *IncidentNotificationRule) HasAction() bool` + +HasAction returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncidentResponse.md b/docs/IncidentResponse.md index 1cb1748..8130a3e 100644 --- a/docs/IncidentResponse.md +++ b/docs/IncidentResponse.md @@ -1,10 +1,81 @@ # IncidentResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**Incident**](.md) | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**Incident**](Incident.md) | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewIncidentResponse + +`func NewIncidentResponse() *IncidentResponse` + +NewIncidentResponse instantiates a new IncidentResponse 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 + +### NewIncidentResponseWithDefaults + +`func NewIncidentResponseWithDefaults() *IncidentResponse` + +NewIncidentResponseWithDefaults instantiates a new IncidentResponse 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 + +### GetData + +`func (o *IncidentResponse) GetData() Incident` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *IncidentResponse) GetDataOk() (*Incident, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *IncidentResponse) SetData(v Incident)` + +SetData sets Data field to given value. + +### HasData + +`func (o *IncidentResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *IncidentResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *IncidentResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *IncidentResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *IncidentResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncidentsApi.md b/docs/IncidentsApi.md index e0b3557..a75803c 100644 --- a/docs/IncidentsApi.md +++ b/docs/IncidentsApi.md @@ -9,18 +9,58 @@ Method | HTTP request | Description [**ListRelatedIncidents**](IncidentsApi.md#ListRelatedIncidents) | **Get** /data/v1/incidents/{INCIDENT_ID}/related | List Related Incidents -# **GetIncident** -> IncidentResponse GetIncident(ctx, iNCIDENTID) + +## GetIncident + +> IncidentResponse GetIncident(ctx, iNCIDENTID).Execute() + Get an Incident -Returns the details of an incident -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + iNCIDENTID := "abcd1234" // string | ID of the Incident + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.GetIncident(context.Background(), iNCIDENTID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.GetIncident``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetIncident`: IncidentResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.GetIncident`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**iNCIDENTID** | **string** | ID of the Incident | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetIncidentRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **iNCIDENTID** | **string**| ID of the Incident | + ### Return type @@ -32,35 +72,71 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncidents + +> ListIncidentsResponse ListIncidents(ctx).Limit(limit).Page(page).OrderBy(orderBy).OrderDirection(orderDirection).Status(status).Severity(severity).Execute() -# **ListIncidents** -> ListIncidentsResponse ListIncidents(ctx, optional) List Incidents -Returns a list of incidents -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListIncidentsOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + orderBy := "orderBy_example" // string | Value to order the results by (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + status := "status_example" // string | Status to filter incidents by (optional) + severity := "severity_example" // string | Severity to filter incidents by (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.ListIncidents(context.Background()).Limit(limit).Page(page).OrderBy(orderBy).OrderDirection(orderDirection).Status(status).Severity(severity).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.ListIncidents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListIncidents`: ListIncidentsResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.ListIncidents`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListIncidentsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListIncidentsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **orderBy** | **optional.String**| Value to order the results by | - **orderDirection** | **optional.String**| Sort order. | - **status** | **optional.String**| Status to filter incidents by | - **severity** | **optional.String**| Severity to filter incidents by | + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **orderBy** | **string** | Value to order the results by | + **orderDirection** | **string** | Sort order. | + **status** | **string** | Status to filter incidents by | + **severity** | **string** | Severity to filter incidents by | ### Return type @@ -72,35 +148,73 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## ListRelatedIncidents + +> ListRelatedIncidentsResponse ListRelatedIncidents(ctx, iNCIDENTID).Limit(limit).Page(page).OrderBy(orderBy).OrderDirection(orderDirection).Execute() -# **ListRelatedIncidents** -> ListRelatedIncidentsResponse ListRelatedIncidents(ctx, iNCIDENTID, optional) List Related Incidents -Returns all the incidents that seem related to a specific incident -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + iNCIDENTID := "abcd1234" // string | ID of the Incident + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + orderBy := "orderBy_example" // string | Value to order the results by (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.ListRelatedIncidents(context.Background(), iNCIDENTID).Limit(limit).Page(page).OrderBy(orderBy).OrderDirection(orderDirection).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.ListRelatedIncidents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRelatedIncidents`: ListRelatedIncidentsResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.ListRelatedIncidents`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **iNCIDENTID** | **string**| ID of the Incident | - **optional** | ***ListRelatedIncidentsOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**iNCIDENTID** | **string** | ID of the Incident | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRelatedIncidentsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListRelatedIncidentsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **orderBy** | **optional.String**| Value to order the results by | - **orderDirection** | **optional.String**| Sort order. | + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **orderBy** | **string** | Value to order the results by | + **orderDirection** | **string** | Sort order. | ### Return type @@ -112,8 +226,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/InputFile.md b/docs/InputFile.md index 86ce87b..b7058a5 100644 --- a/docs/InputFile.md +++ b/docs/InputFile.md @@ -1,10 +1,81 @@ # InputFile ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ContainerFormat** | **string** | | [optional] -**Tracks** | [**[]InputTrack**](InputTrack.md) | | [optional] +**ContainerFormat** | Pointer to **string** | | [optional] +**Tracks** | Pointer to [**[]InputTrack**](InputTrack.md) | | [optional] + +## Methods + +### NewInputFile + +`func NewInputFile() *InputFile` + +NewInputFile instantiates a new InputFile 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 + +### NewInputFileWithDefaults + +`func NewInputFileWithDefaults() *InputFile` + +NewInputFileWithDefaults instantiates a new InputFile 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 + +### GetContainerFormat + +`func (o *InputFile) GetContainerFormat() string` + +GetContainerFormat returns the ContainerFormat field if non-nil, zero value otherwise. + +### GetContainerFormatOk + +`func (o *InputFile) GetContainerFormatOk() (*string, bool)` + +GetContainerFormatOk returns a tuple with the ContainerFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainerFormat + +`func (o *InputFile) SetContainerFormat(v string)` + +SetContainerFormat sets ContainerFormat field to given value. + +### HasContainerFormat + +`func (o *InputFile) HasContainerFormat() bool` + +HasContainerFormat returns a boolean if a field has been set. + +### GetTracks + +`func (o *InputFile) GetTracks() []InputTrack` + +GetTracks returns the Tracks field if non-nil, zero value otherwise. + +### GetTracksOk + +`func (o *InputFile) GetTracksOk() (*[]InputTrack, bool)` + +GetTracksOk returns a tuple with the Tracks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTracks + +`func (o *InputFile) SetTracks(v []InputTrack)` + +SetTracks sets Tracks field to given value. + +### HasTracks + +`func (o *InputFile) HasTracks() bool` + +HasTracks returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InputInfo.md b/docs/InputInfo.md index 9321a40..77c5e78 100644 --- a/docs/InputInfo.md +++ b/docs/InputInfo.md @@ -1,10 +1,81 @@ # InputInfo ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Settings** | [**InputSettings**](InputSettings.md) | | [optional] -**File** | [**InputFile**](InputFile.md) | | [optional] +**Settings** | Pointer to [**InputSettings**](InputSettings.md) | | [optional] +**File** | Pointer to [**InputFile**](InputFile.md) | | [optional] + +## Methods + +### NewInputInfo + +`func NewInputInfo() *InputInfo` + +NewInputInfo instantiates a new InputInfo 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 + +### NewInputInfoWithDefaults + +`func NewInputInfoWithDefaults() *InputInfo` + +NewInputInfoWithDefaults instantiates a new InputInfo 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 + +### GetSettings + +`func (o *InputInfo) GetSettings() InputSettings` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *InputInfo) GetSettingsOk() (*InputSettings, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *InputInfo) SetSettings(v InputSettings)` + +SetSettings sets Settings field to given value. + +### HasSettings + +`func (o *InputInfo) HasSettings() bool` + +HasSettings returns a boolean if a field has been set. + +### GetFile + +`func (o *InputInfo) GetFile() InputFile` + +GetFile returns the File field if non-nil, zero value otherwise. + +### GetFileOk + +`func (o *InputInfo) GetFileOk() (*InputFile, bool)` + +GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFile + +`func (o *InputInfo) SetFile(v InputFile)` + +SetFile sets File field to given value. + +### HasFile + +`func (o *InputInfo) HasFile() bool` + +HasFile returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InputSettings.md b/docs/InputSettings.md index c9a6580..8b2d38d 100644 --- a/docs/InputSettings.md +++ b/docs/InputSettings.md @@ -1,18 +1,289 @@ # InputSettings ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Url** | **string** | The web address of the file that Mux should download and use. * For subtitles text tracks, the url is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the url is the location of the watermark image. * When creating clips from existing Mux assets, the url is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. | [optional] -**OverlaySettings** | [**InputSettingsOverlaySettings**](InputSettings_overlay_settings.md) | | [optional] -**StartTime** | **float64** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. | [optional] -**EndTime** | **float64** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. | [optional] -**Type** | **string** | This parameter is required for the `text` track type. | [optional] -**TextType** | **string** | Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` track type. | [optional] -**LanguageCode** | **string** | The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track. | [optional] -**Name** | **string** | The name of the track containing a human-readable description. This value must be unique across all text type and subtitles `text` type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for subtitles text track with language_code as en. This optional parameter should be used only for `text` type and subtitles `text` type track. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value. | [optional] -**ClosedCaptions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional] -**Passthrough** | **string** | This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional] +**Url** | Pointer to **string** | The web address of the file that Mux should download and use. * For subtitles text tracks, the url is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the url is the location of the watermark image. * When creating clips from existing Mux assets, the url is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. | [optional] +**OverlaySettings** | Pointer to [**InputSettingsOverlaySettings**](InputSettings_overlay_settings.md) | | [optional] +**StartTime** | Pointer to **float64** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] +**EndTime** | Pointer to **float64** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] +**Type** | Pointer to **string** | This parameter is required for the `text` track type. | [optional] +**TextType** | Pointer to **string** | Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` track type. | [optional] +**LanguageCode** | Pointer to **string** | The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track. | [optional] +**Name** | Pointer to **string** | The name of the track containing a human-readable description. This value must be unique across all text type and subtitles `text` type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for subtitles text track with language_code as en. This optional parameter should be used only for `text` type and subtitles `text` type track. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value. | [optional] +**ClosedCaptions** | Pointer to **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional] +**Passthrough** | Pointer to **string** | This optional parameter should be used for `text` type and subtitles `text` type tracks. | [optional] + +## Methods + +### NewInputSettings + +`func NewInputSettings() *InputSettings` + +NewInputSettings instantiates a new InputSettings 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 + +### NewInputSettingsWithDefaults + +`func NewInputSettingsWithDefaults() *InputSettings` + +NewInputSettingsWithDefaults instantiates a new InputSettings 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 + +### GetUrl + +`func (o *InputSettings) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *InputSettings) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *InputSettings) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *InputSettings) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetOverlaySettings + +`func (o *InputSettings) GetOverlaySettings() InputSettingsOverlaySettings` + +GetOverlaySettings returns the OverlaySettings field if non-nil, zero value otherwise. + +### GetOverlaySettingsOk + +`func (o *InputSettings) GetOverlaySettingsOk() (*InputSettingsOverlaySettings, bool)` + +GetOverlaySettingsOk returns a tuple with the OverlaySettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOverlaySettings + +`func (o *InputSettings) SetOverlaySettings(v InputSettingsOverlaySettings)` + +SetOverlaySettings sets OverlaySettings field to given value. + +### HasOverlaySettings + +`func (o *InputSettings) HasOverlaySettings() bool` + +HasOverlaySettings returns a boolean if a field has been set. + +### GetStartTime + +`func (o *InputSettings) GetStartTime() float64` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *InputSettings) GetStartTimeOk() (*float64, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *InputSettings) SetStartTime(v float64)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *InputSettings) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetEndTime + +`func (o *InputSettings) GetEndTime() float64` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *InputSettings) GetEndTimeOk() (*float64, bool)` + +GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndTime + +`func (o *InputSettings) SetEndTime(v float64)` + +SetEndTime sets EndTime field to given value. + +### HasEndTime + +`func (o *InputSettings) HasEndTime() bool` + +HasEndTime returns a boolean if a field has been set. + +### GetType + +`func (o *InputSettings) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputSettings) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputSettings) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *InputSettings) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetTextType + +`func (o *InputSettings) GetTextType() string` + +GetTextType returns the TextType field if non-nil, zero value otherwise. + +### GetTextTypeOk + +`func (o *InputSettings) GetTextTypeOk() (*string, bool)` + +GetTextTypeOk returns a tuple with the TextType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTextType + +`func (o *InputSettings) SetTextType(v string)` + +SetTextType sets TextType field to given value. + +### HasTextType + +`func (o *InputSettings) HasTextType() bool` + +HasTextType returns a boolean if a field has been set. + +### GetLanguageCode + +`func (o *InputSettings) GetLanguageCode() string` + +GetLanguageCode returns the LanguageCode field if non-nil, zero value otherwise. + +### GetLanguageCodeOk + +`func (o *InputSettings) GetLanguageCodeOk() (*string, bool)` + +GetLanguageCodeOk returns a tuple with the LanguageCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguageCode + +`func (o *InputSettings) SetLanguageCode(v string)` + +SetLanguageCode sets LanguageCode field to given value. + +### HasLanguageCode + +`func (o *InputSettings) HasLanguageCode() bool` + +HasLanguageCode returns a boolean if a field has been set. + +### GetName + +`func (o *InputSettings) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *InputSettings) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *InputSettings) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *InputSettings) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetClosedCaptions + +`func (o *InputSettings) GetClosedCaptions() bool` + +GetClosedCaptions returns the ClosedCaptions field if non-nil, zero value otherwise. + +### GetClosedCaptionsOk + +`func (o *InputSettings) GetClosedCaptionsOk() (*bool, bool)` + +GetClosedCaptionsOk returns a tuple with the ClosedCaptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClosedCaptions + +`func (o *InputSettings) SetClosedCaptions(v bool)` + +SetClosedCaptions sets ClosedCaptions field to given value. + +### HasClosedCaptions + +`func (o *InputSettings) HasClosedCaptions() bool` + +HasClosedCaptions returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *InputSettings) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *InputSettings) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *InputSettings) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *InputSettings) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InputSettingsOverlaySettings.md b/docs/InputSettingsOverlaySettings.md index de66928..11d13bf 100644 --- a/docs/InputSettingsOverlaySettings.md +++ b/docs/InputSettingsOverlaySettings.md @@ -1,15 +1,211 @@ # InputSettingsOverlaySettings ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**VerticalAlign** | **string** | Where the vertical positioning of the overlay/watermark should begin from. Defaults to `\"top\"` | [optional] -**VerticalMargin** | **string** | The distance from the vertical_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'middle', a positive value will shift the overlay towards the bottom and and a negative value will shift it towards the top. | [optional] -**HorizontalAlign** | **string** | Where the horizontal positioning of the overlay/watermark should begin from. | [optional] -**HorizontalMargin** | **string** | The distance from the horizontal_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'center', a positive value will shift the image towards the right and and a negative value will shift it towards the left. | [optional] -**Width** | **string** | How wide the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the width will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If height is supplied with no width, the width will scale proportionally to the height. | [optional] -**Height** | **string** | How tall the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the height will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If width is supplied with no height, the height will scale proportionally to the width. | [optional] -**Opacity** | **string** | How opaque the overlay should appear, expressed as a percent. (Default 100%) | [optional] +**VerticalAlign** | Pointer to **string** | Where the vertical positioning of the overlay/watermark should begin from. Defaults to `\"top\"` | [optional] +**VerticalMargin** | Pointer to **string** | The distance from the vertical_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'middle', a positive value will shift the overlay towards the bottom and and a negative value will shift it towards the top. | [optional] +**HorizontalAlign** | Pointer to **string** | Where the horizontal positioning of the overlay/watermark should begin from. | [optional] +**HorizontalMargin** | Pointer to **string** | The distance from the horizontal_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'center', a positive value will shift the image towards the right and and a negative value will shift it towards the left. | [optional] +**Width** | Pointer to **string** | How wide the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the width will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If height is supplied with no width, the width will scale proportionally to the height. | [optional] +**Height** | Pointer to **string** | How tall the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the height will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If width is supplied with no height, the height will scale proportionally to the width. | [optional] +**Opacity** | Pointer to **string** | How opaque the overlay should appear, expressed as a percent. (Default 100%) | [optional] + +## Methods + +### NewInputSettingsOverlaySettings + +`func NewInputSettingsOverlaySettings() *InputSettingsOverlaySettings` + +NewInputSettingsOverlaySettings instantiates a new InputSettingsOverlaySettings 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 + +### NewInputSettingsOverlaySettingsWithDefaults + +`func NewInputSettingsOverlaySettingsWithDefaults() *InputSettingsOverlaySettings` + +NewInputSettingsOverlaySettingsWithDefaults instantiates a new InputSettingsOverlaySettings 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 + +### GetVerticalAlign + +`func (o *InputSettingsOverlaySettings) GetVerticalAlign() string` + +GetVerticalAlign returns the VerticalAlign field if non-nil, zero value otherwise. + +### GetVerticalAlignOk + +`func (o *InputSettingsOverlaySettings) GetVerticalAlignOk() (*string, bool)` + +GetVerticalAlignOk returns a tuple with the VerticalAlign field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerticalAlign + +`func (o *InputSettingsOverlaySettings) SetVerticalAlign(v string)` + +SetVerticalAlign sets VerticalAlign field to given value. + +### HasVerticalAlign + +`func (o *InputSettingsOverlaySettings) HasVerticalAlign() bool` + +HasVerticalAlign returns a boolean if a field has been set. + +### GetVerticalMargin + +`func (o *InputSettingsOverlaySettings) GetVerticalMargin() string` + +GetVerticalMargin returns the VerticalMargin field if non-nil, zero value otherwise. + +### GetVerticalMarginOk + +`func (o *InputSettingsOverlaySettings) GetVerticalMarginOk() (*string, bool)` + +GetVerticalMarginOk returns a tuple with the VerticalMargin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerticalMargin + +`func (o *InputSettingsOverlaySettings) SetVerticalMargin(v string)` + +SetVerticalMargin sets VerticalMargin field to given value. + +### HasVerticalMargin + +`func (o *InputSettingsOverlaySettings) HasVerticalMargin() bool` + +HasVerticalMargin returns a boolean if a field has been set. + +### GetHorizontalAlign + +`func (o *InputSettingsOverlaySettings) GetHorizontalAlign() string` + +GetHorizontalAlign returns the HorizontalAlign field if non-nil, zero value otherwise. + +### GetHorizontalAlignOk + +`func (o *InputSettingsOverlaySettings) GetHorizontalAlignOk() (*string, bool)` + +GetHorizontalAlignOk returns a tuple with the HorizontalAlign field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHorizontalAlign + +`func (o *InputSettingsOverlaySettings) SetHorizontalAlign(v string)` + +SetHorizontalAlign sets HorizontalAlign field to given value. + +### HasHorizontalAlign + +`func (o *InputSettingsOverlaySettings) HasHorizontalAlign() bool` + +HasHorizontalAlign returns a boolean if a field has been set. + +### GetHorizontalMargin + +`func (o *InputSettingsOverlaySettings) GetHorizontalMargin() string` + +GetHorizontalMargin returns the HorizontalMargin field if non-nil, zero value otherwise. + +### GetHorizontalMarginOk + +`func (o *InputSettingsOverlaySettings) GetHorizontalMarginOk() (*string, bool)` + +GetHorizontalMarginOk returns a tuple with the HorizontalMargin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHorizontalMargin + +`func (o *InputSettingsOverlaySettings) SetHorizontalMargin(v string)` + +SetHorizontalMargin sets HorizontalMargin field to given value. + +### HasHorizontalMargin + +`func (o *InputSettingsOverlaySettings) HasHorizontalMargin() bool` + +HasHorizontalMargin returns a boolean if a field has been set. + +### GetWidth + +`func (o *InputSettingsOverlaySettings) GetWidth() string` + +GetWidth returns the Width field if non-nil, zero value otherwise. + +### GetWidthOk + +`func (o *InputSettingsOverlaySettings) GetWidthOk() (*string, bool)` + +GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWidth + +`func (o *InputSettingsOverlaySettings) SetWidth(v string)` + +SetWidth sets Width field to given value. + +### HasWidth + +`func (o *InputSettingsOverlaySettings) HasWidth() bool` + +HasWidth returns a boolean if a field has been set. + +### GetHeight + +`func (o *InputSettingsOverlaySettings) GetHeight() string` + +GetHeight returns the Height field if non-nil, zero value otherwise. + +### GetHeightOk + +`func (o *InputSettingsOverlaySettings) GetHeightOk() (*string, bool)` + +GetHeightOk returns a tuple with the Height field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeight + +`func (o *InputSettingsOverlaySettings) SetHeight(v string)` + +SetHeight sets Height field to given value. + +### HasHeight + +`func (o *InputSettingsOverlaySettings) HasHeight() bool` + +HasHeight returns a boolean if a field has been set. + +### GetOpacity + +`func (o *InputSettingsOverlaySettings) GetOpacity() string` + +GetOpacity returns the Opacity field if non-nil, zero value otherwise. + +### GetOpacityOk + +`func (o *InputSettingsOverlaySettings) GetOpacityOk() (*string, bool)` + +GetOpacityOk returns a tuple with the Opacity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOpacity + +`func (o *InputSettingsOverlaySettings) SetOpacity(v string)` + +SetOpacity sets Opacity field to given value. + +### HasOpacity + +`func (o *InputSettingsOverlaySettings) HasOpacity() bool` + +HasOpacity returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InputTrack.md b/docs/InputTrack.md index 9b5683f..9f19d41 100644 --- a/docs/InputTrack.md +++ b/docs/InputTrack.md @@ -1,17 +1,263 @@ # InputTrack ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**Duration** | **float64** | | [optional] -**Encoding** | **string** | | [optional] -**Width** | **int64** | | [optional] -**Height** | **int64** | | [optional] -**FrameRate** | **float64** | | [optional] -**SampleRate** | **int64** | | [optional] -**SampleSize** | **int64** | | [optional] -**Channels** | **int64** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Duration** | Pointer to **float64** | | [optional] +**Encoding** | Pointer to **string** | | [optional] +**Width** | Pointer to **int64** | | [optional] +**Height** | Pointer to **int64** | | [optional] +**FrameRate** | Pointer to **float64** | | [optional] +**SampleRate** | Pointer to **int64** | | [optional] +**SampleSize** | Pointer to **int64** | | [optional] +**Channels** | Pointer to **int64** | | [optional] + +## Methods + +### NewInputTrack + +`func NewInputTrack() *InputTrack` + +NewInputTrack instantiates a new InputTrack 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 + +### NewInputTrackWithDefaults + +`func NewInputTrackWithDefaults() *InputTrack` + +NewInputTrackWithDefaults instantiates a new InputTrack 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 + +### GetType + +`func (o *InputTrack) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputTrack) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputTrack) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *InputTrack) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDuration + +`func (o *InputTrack) GetDuration() float64` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *InputTrack) GetDurationOk() (*float64, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *InputTrack) SetDuration(v float64)` + +SetDuration sets Duration field to given value. + +### HasDuration + +`func (o *InputTrack) HasDuration() bool` + +HasDuration returns a boolean if a field has been set. + +### GetEncoding + +`func (o *InputTrack) GetEncoding() string` + +GetEncoding returns the Encoding field if non-nil, zero value otherwise. + +### GetEncodingOk + +`func (o *InputTrack) GetEncodingOk() (*string, bool)` + +GetEncodingOk returns a tuple with the Encoding field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEncoding + +`func (o *InputTrack) SetEncoding(v string)` + +SetEncoding sets Encoding field to given value. + +### HasEncoding + +`func (o *InputTrack) HasEncoding() bool` + +HasEncoding returns a boolean if a field has been set. + +### GetWidth + +`func (o *InputTrack) GetWidth() int64` + +GetWidth returns the Width field if non-nil, zero value otherwise. + +### GetWidthOk + +`func (o *InputTrack) GetWidthOk() (*int64, bool)` + +GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWidth + +`func (o *InputTrack) SetWidth(v int64)` + +SetWidth sets Width field to given value. + +### HasWidth + +`func (o *InputTrack) HasWidth() bool` + +HasWidth returns a boolean if a field has been set. + +### GetHeight + +`func (o *InputTrack) GetHeight() int64` + +GetHeight returns the Height field if non-nil, zero value otherwise. + +### GetHeightOk + +`func (o *InputTrack) GetHeightOk() (*int64, bool)` + +GetHeightOk returns a tuple with the Height field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeight + +`func (o *InputTrack) SetHeight(v int64)` + +SetHeight sets Height field to given value. + +### HasHeight + +`func (o *InputTrack) HasHeight() bool` + +HasHeight returns a boolean if a field has been set. + +### GetFrameRate + +`func (o *InputTrack) GetFrameRate() float64` + +GetFrameRate returns the FrameRate field if non-nil, zero value otherwise. + +### GetFrameRateOk + +`func (o *InputTrack) GetFrameRateOk() (*float64, bool)` + +GetFrameRateOk returns a tuple with the FrameRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrameRate + +`func (o *InputTrack) SetFrameRate(v float64)` + +SetFrameRate sets FrameRate field to given value. + +### HasFrameRate + +`func (o *InputTrack) HasFrameRate() bool` + +HasFrameRate returns a boolean if a field has been set. + +### GetSampleRate + +`func (o *InputTrack) GetSampleRate() int64` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *InputTrack) GetSampleRateOk() (*int64, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *InputTrack) SetSampleRate(v int64)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *InputTrack) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetSampleSize + +`func (o *InputTrack) GetSampleSize() int64` + +GetSampleSize returns the SampleSize field if non-nil, zero value otherwise. + +### GetSampleSizeOk + +`func (o *InputTrack) GetSampleSizeOk() (*int64, bool)` + +GetSampleSizeOk returns a tuple with the SampleSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleSize + +`func (o *InputTrack) SetSampleSize(v int64)` + +SetSampleSize sets SampleSize field to given value. + +### HasSampleSize + +`func (o *InputTrack) HasSampleSize() bool` + +HasSampleSize returns a boolean if a field has been set. + +### GetChannels + +`func (o *InputTrack) GetChannels() int64` + +GetChannels returns the Channels field if non-nil, zero value otherwise. + +### GetChannelsOk + +`func (o *InputTrack) GetChannelsOk() (*int64, bool)` + +GetChannelsOk returns a tuple with the Channels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChannels + +`func (o *InputTrack) SetChannels(v int64)` + +SetChannels sets Channels field to given value. + +### HasChannels + +`func (o *InputTrack) HasChannels() bool` + +HasChannels returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Insight.md b/docs/Insight.md index 6d7aad7..c64e94f 100644 --- a/docs/Insight.md +++ b/docs/Insight.md @@ -1,14 +1,185 @@ # Insight ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalWatchTime** | **int64** | | [optional] -**TotalViews** | **int64** | | [optional] -**NegativeImpactScore** | **float32** | | [optional] -**Metric** | **float64** | | [optional] -**FilterValue** | **string** | | [optional] -**FilterColumn** | **string** | | [optional] +**TotalWatchTime** | Pointer to **int64** | | [optional] +**TotalViews** | Pointer to **int64** | | [optional] +**NegativeImpactScore** | Pointer to **float32** | | [optional] +**Metric** | Pointer to **float64** | | [optional] +**FilterValue** | Pointer to **string** | | [optional] +**FilterColumn** | Pointer to **string** | | [optional] + +## Methods + +### NewInsight + +`func NewInsight() *Insight` + +NewInsight instantiates a new Insight 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 + +### NewInsightWithDefaults + +`func NewInsightWithDefaults() *Insight` + +NewInsightWithDefaults instantiates a new Insight 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 + +### GetTotalWatchTime + +`func (o *Insight) GetTotalWatchTime() int64` + +GetTotalWatchTime returns the TotalWatchTime field if non-nil, zero value otherwise. + +### GetTotalWatchTimeOk + +`func (o *Insight) GetTotalWatchTimeOk() (*int64, bool)` + +GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalWatchTime + +`func (o *Insight) SetTotalWatchTime(v int64)` + +SetTotalWatchTime sets TotalWatchTime field to given value. + +### HasTotalWatchTime + +`func (o *Insight) HasTotalWatchTime() bool` + +HasTotalWatchTime returns a boolean if a field has been set. + +### GetTotalViews + +`func (o *Insight) GetTotalViews() int64` + +GetTotalViews returns the TotalViews field if non-nil, zero value otherwise. + +### GetTotalViewsOk + +`func (o *Insight) GetTotalViewsOk() (*int64, bool)` + +GetTotalViewsOk returns a tuple with the TotalViews field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalViews + +`func (o *Insight) SetTotalViews(v int64)` + +SetTotalViews sets TotalViews field to given value. + +### HasTotalViews + +`func (o *Insight) HasTotalViews() bool` + +HasTotalViews returns a boolean if a field has been set. + +### GetNegativeImpactScore + +`func (o *Insight) GetNegativeImpactScore() float32` + +GetNegativeImpactScore returns the NegativeImpactScore field if non-nil, zero value otherwise. + +### GetNegativeImpactScoreOk + +`func (o *Insight) GetNegativeImpactScoreOk() (*float32, bool)` + +GetNegativeImpactScoreOk returns a tuple with the NegativeImpactScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNegativeImpactScore + +`func (o *Insight) SetNegativeImpactScore(v float32)` + +SetNegativeImpactScore sets NegativeImpactScore field to given value. + +### HasNegativeImpactScore + +`func (o *Insight) HasNegativeImpactScore() bool` + +HasNegativeImpactScore returns a boolean if a field has been set. + +### GetMetric + +`func (o *Insight) GetMetric() float64` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *Insight) GetMetricOk() (*float64, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *Insight) SetMetric(v float64)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *Insight) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + +### GetFilterValue + +`func (o *Insight) GetFilterValue() string` + +GetFilterValue returns the FilterValue field if non-nil, zero value otherwise. + +### GetFilterValueOk + +`func (o *Insight) GetFilterValueOk() (*string, bool)` + +GetFilterValueOk returns a tuple with the FilterValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterValue + +`func (o *Insight) SetFilterValue(v string)` + +SetFilterValue sets FilterValue field to given value. + +### HasFilterValue + +`func (o *Insight) HasFilterValue() bool` + +HasFilterValue returns a boolean if a field has been set. + +### GetFilterColumn + +`func (o *Insight) GetFilterColumn() string` + +GetFilterColumn returns the FilterColumn field if non-nil, zero value otherwise. + +### GetFilterColumnOk + +`func (o *Insight) GetFilterColumnOk() (*string, bool)` + +GetFilterColumnOk returns a tuple with the FilterColumn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterColumn + +`func (o *Insight) SetFilterColumn(v string)` + +SetFilterColumn sets FilterColumn field to given value. + +### HasFilterColumn + +`func (o *Insight) HasFilterColumn() bool` + +HasFilterColumn returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListAllMetricValuesResponse.md b/docs/ListAllMetricValuesResponse.md index d1370d6..56c25a8 100644 --- a/docs/ListAllMetricValuesResponse.md +++ b/docs/ListAllMetricValuesResponse.md @@ -1,11 +1,107 @@ # ListAllMetricValuesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Score**](Score.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]Score**](Score.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListAllMetricValuesResponse + +`func NewListAllMetricValuesResponse() *ListAllMetricValuesResponse` + +NewListAllMetricValuesResponse instantiates a new ListAllMetricValuesResponse 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 + +### NewListAllMetricValuesResponseWithDefaults + +`func NewListAllMetricValuesResponseWithDefaults() *ListAllMetricValuesResponse` + +NewListAllMetricValuesResponseWithDefaults instantiates a new ListAllMetricValuesResponse 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 + +### GetData + +`func (o *ListAllMetricValuesResponse) GetData() []Score` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListAllMetricValuesResponse) GetDataOk() (*[]Score, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListAllMetricValuesResponse) SetData(v []Score)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListAllMetricValuesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListAllMetricValuesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListAllMetricValuesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListAllMetricValuesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListAllMetricValuesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListAllMetricValuesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListAllMetricValuesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListAllMetricValuesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListAllMetricValuesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListAssetsResponse.md b/docs/ListAssetsResponse.md index ce08531..afdb5cb 100644 --- a/docs/ListAssetsResponse.md +++ b/docs/ListAssetsResponse.md @@ -1,9 +1,55 @@ # ListAssetsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Asset**](Asset.md) | | [optional] +**Data** | Pointer to [**[]Asset**](Asset.md) | | [optional] + +## Methods + +### NewListAssetsResponse + +`func NewListAssetsResponse() *ListAssetsResponse` + +NewListAssetsResponse instantiates a new ListAssetsResponse 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 + +### NewListAssetsResponseWithDefaults + +`func NewListAssetsResponseWithDefaults() *ListAssetsResponse` + +NewListAssetsResponseWithDefaults instantiates a new ListAssetsResponse 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 + +### GetData + +`func (o *ListAssetsResponse) GetData() []Asset` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListAssetsResponse) GetDataOk() (*[]Asset, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListAssetsResponse) SetData(v []Asset)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListAssetsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListBreakdownValuesResponse.md b/docs/ListBreakdownValuesResponse.md index e9e3d23..971c799 100644 --- a/docs/ListBreakdownValuesResponse.md +++ b/docs/ListBreakdownValuesResponse.md @@ -1,11 +1,107 @@ # ListBreakdownValuesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]BreakdownValue**](BreakdownValue.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]BreakdownValue**](BreakdownValue.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListBreakdownValuesResponse + +`func NewListBreakdownValuesResponse() *ListBreakdownValuesResponse` + +NewListBreakdownValuesResponse instantiates a new ListBreakdownValuesResponse 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 + +### NewListBreakdownValuesResponseWithDefaults + +`func NewListBreakdownValuesResponseWithDefaults() *ListBreakdownValuesResponse` + +NewListBreakdownValuesResponseWithDefaults instantiates a new ListBreakdownValuesResponse 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 + +### GetData + +`func (o *ListBreakdownValuesResponse) GetData() []BreakdownValue` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListBreakdownValuesResponse) GetDataOk() (*[]BreakdownValue, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListBreakdownValuesResponse) SetData(v []BreakdownValue)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListBreakdownValuesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListBreakdownValuesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListBreakdownValuesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListBreakdownValuesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListBreakdownValuesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListBreakdownValuesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListBreakdownValuesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListBreakdownValuesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListBreakdownValuesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListDeliveryUsageResponse.md b/docs/ListDeliveryUsageResponse.md index 6a5f690..a049a4f 100644 --- a/docs/ListDeliveryUsageResponse.md +++ b/docs/ListDeliveryUsageResponse.md @@ -1,12 +1,133 @@ # ListDeliveryUsageResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]DeliveryReport**](DeliveryReport.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] -**Limit** | **int64** | Number of assets returned in this response. Default value is 100. | [optional] +**Data** | Pointer to [**[]DeliveryReport**](DeliveryReport.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] +**Limit** | Pointer to **int64** | Number of assets returned in this response. Default value is 100. | [optional] + +## Methods + +### NewListDeliveryUsageResponse + +`func NewListDeliveryUsageResponse() *ListDeliveryUsageResponse` + +NewListDeliveryUsageResponse instantiates a new ListDeliveryUsageResponse 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 + +### NewListDeliveryUsageResponseWithDefaults + +`func NewListDeliveryUsageResponseWithDefaults() *ListDeliveryUsageResponse` + +NewListDeliveryUsageResponseWithDefaults instantiates a new ListDeliveryUsageResponse 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 + +### GetData + +`func (o *ListDeliveryUsageResponse) GetData() []DeliveryReport` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListDeliveryUsageResponse) GetDataOk() (*[]DeliveryReport, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListDeliveryUsageResponse) SetData(v []DeliveryReport)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListDeliveryUsageResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListDeliveryUsageResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListDeliveryUsageResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListDeliveryUsageResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListDeliveryUsageResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListDeliveryUsageResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListDeliveryUsageResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListDeliveryUsageResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListDeliveryUsageResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + +### GetLimit + +`func (o *ListDeliveryUsageResponse) GetLimit() int64` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *ListDeliveryUsageResponse) GetLimitOk() (*int64, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *ListDeliveryUsageResponse) SetLimit(v int64)` + +SetLimit sets Limit field to given value. + +### HasLimit + +`func (o *ListDeliveryUsageResponse) HasLimit() bool` + +HasLimit returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListDimensionValuesResponse.md b/docs/ListDimensionValuesResponse.md index 55d1021..39994f7 100644 --- a/docs/ListDimensionValuesResponse.md +++ b/docs/ListDimensionValuesResponse.md @@ -1,11 +1,107 @@ # ListDimensionValuesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]DimensionValue**](DimensionValue.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]DimensionValue**](DimensionValue.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListDimensionValuesResponse + +`func NewListDimensionValuesResponse() *ListDimensionValuesResponse` + +NewListDimensionValuesResponse instantiates a new ListDimensionValuesResponse 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 + +### NewListDimensionValuesResponseWithDefaults + +`func NewListDimensionValuesResponseWithDefaults() *ListDimensionValuesResponse` + +NewListDimensionValuesResponseWithDefaults instantiates a new ListDimensionValuesResponse 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 + +### GetData + +`func (o *ListDimensionValuesResponse) GetData() []DimensionValue` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListDimensionValuesResponse) GetDataOk() (*[]DimensionValue, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListDimensionValuesResponse) SetData(v []DimensionValue)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListDimensionValuesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListDimensionValuesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListDimensionValuesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListDimensionValuesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListDimensionValuesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListDimensionValuesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListDimensionValuesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListDimensionValuesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListDimensionValuesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListDimensionsResponse.md b/docs/ListDimensionsResponse.md index 0aa9fe1..b2bf9c1 100644 --- a/docs/ListDimensionsResponse.md +++ b/docs/ListDimensionsResponse.md @@ -1,11 +1,107 @@ # ListDimensionsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**ListFiltersResponseData**](ListFiltersResponse_data.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**ListFiltersResponseData**](ListFiltersResponse_data.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListDimensionsResponse + +`func NewListDimensionsResponse() *ListDimensionsResponse` + +NewListDimensionsResponse instantiates a new ListDimensionsResponse 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 + +### NewListDimensionsResponseWithDefaults + +`func NewListDimensionsResponseWithDefaults() *ListDimensionsResponse` + +NewListDimensionsResponseWithDefaults instantiates a new ListDimensionsResponse 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 + +### GetData + +`func (o *ListDimensionsResponse) GetData() ListFiltersResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListDimensionsResponse) GetDataOk() (*ListFiltersResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListDimensionsResponse) SetData(v ListFiltersResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListDimensionsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListDimensionsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListDimensionsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListDimensionsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListDimensionsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListDimensionsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListDimensionsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListDimensionsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListDimensionsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListErrorsResponse.md b/docs/ListErrorsResponse.md index 9a69737..f2486f6 100644 --- a/docs/ListErrorsResponse.md +++ b/docs/ListErrorsResponse.md @@ -1,11 +1,107 @@ # ListErrorsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Error**](Error.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]Error**](Error.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListErrorsResponse + +`func NewListErrorsResponse() *ListErrorsResponse` + +NewListErrorsResponse instantiates a new ListErrorsResponse 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 + +### NewListErrorsResponseWithDefaults + +`func NewListErrorsResponseWithDefaults() *ListErrorsResponse` + +NewListErrorsResponseWithDefaults instantiates a new ListErrorsResponse 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 + +### GetData + +`func (o *ListErrorsResponse) GetData() []Error` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListErrorsResponse) GetDataOk() (*[]Error, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListErrorsResponse) SetData(v []Error)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListErrorsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListErrorsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListErrorsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListErrorsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListErrorsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListErrorsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListErrorsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListErrorsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListErrorsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListExportsResponse.md b/docs/ListExportsResponse.md index 62c7f97..f44722e 100644 --- a/docs/ListExportsResponse.md +++ b/docs/ListExportsResponse.md @@ -1,11 +1,107 @@ # ListExportsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | **[]string** | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to **[]string** | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListExportsResponse + +`func NewListExportsResponse() *ListExportsResponse` + +NewListExportsResponse instantiates a new ListExportsResponse 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 + +### NewListExportsResponseWithDefaults + +`func NewListExportsResponseWithDefaults() *ListExportsResponse` + +NewListExportsResponseWithDefaults instantiates a new ListExportsResponse 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 + +### GetData + +`func (o *ListExportsResponse) GetData() []string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListExportsResponse) GetDataOk() (*[]string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListExportsResponse) SetData(v []string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListExportsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListExportsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListExportsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListExportsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListExportsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListExportsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListExportsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListExportsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListExportsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListFilterValuesResponse.md b/docs/ListFilterValuesResponse.md index 7b3bfbd..d0f52d2 100644 --- a/docs/ListFilterValuesResponse.md +++ b/docs/ListFilterValuesResponse.md @@ -1,11 +1,107 @@ # ListFilterValuesResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]FilterValue**](FilterValue.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]FilterValue**](FilterValue.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListFilterValuesResponse + +`func NewListFilterValuesResponse() *ListFilterValuesResponse` + +NewListFilterValuesResponse instantiates a new ListFilterValuesResponse 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 + +### NewListFilterValuesResponseWithDefaults + +`func NewListFilterValuesResponseWithDefaults() *ListFilterValuesResponse` + +NewListFilterValuesResponseWithDefaults instantiates a new ListFilterValuesResponse 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 + +### GetData + +`func (o *ListFilterValuesResponse) GetData() []FilterValue` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListFilterValuesResponse) GetDataOk() (*[]FilterValue, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListFilterValuesResponse) SetData(v []FilterValue)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListFilterValuesResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListFilterValuesResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListFilterValuesResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListFilterValuesResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListFilterValuesResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListFilterValuesResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListFilterValuesResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListFilterValuesResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListFilterValuesResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListFiltersResponse.md b/docs/ListFiltersResponse.md index f338d8b..10889f4 100644 --- a/docs/ListFiltersResponse.md +++ b/docs/ListFiltersResponse.md @@ -1,11 +1,107 @@ # ListFiltersResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**ListFiltersResponseData**](ListFiltersResponse_data.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**ListFiltersResponseData**](ListFiltersResponse_data.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListFiltersResponse + +`func NewListFiltersResponse() *ListFiltersResponse` + +NewListFiltersResponse instantiates a new ListFiltersResponse 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 + +### NewListFiltersResponseWithDefaults + +`func NewListFiltersResponseWithDefaults() *ListFiltersResponse` + +NewListFiltersResponseWithDefaults instantiates a new ListFiltersResponse 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 + +### GetData + +`func (o *ListFiltersResponse) GetData() ListFiltersResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListFiltersResponse) GetDataOk() (*ListFiltersResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListFiltersResponse) SetData(v ListFiltersResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListFiltersResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListFiltersResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListFiltersResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListFiltersResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListFiltersResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListFiltersResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListFiltersResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListFiltersResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListFiltersResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListFiltersResponseData.md b/docs/ListFiltersResponseData.md index a7b011e..98df95e 100644 --- a/docs/ListFiltersResponseData.md +++ b/docs/ListFiltersResponseData.md @@ -1,10 +1,81 @@ # ListFiltersResponseData ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Basic** | **[]string** | | [optional] -**Advanced** | **[]string** | | [optional] +**Basic** | Pointer to **[]string** | | [optional] +**Advanced** | Pointer to **[]string** | | [optional] + +## Methods + +### NewListFiltersResponseData + +`func NewListFiltersResponseData() *ListFiltersResponseData` + +NewListFiltersResponseData instantiates a new ListFiltersResponseData 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 + +### NewListFiltersResponseDataWithDefaults + +`func NewListFiltersResponseDataWithDefaults() *ListFiltersResponseData` + +NewListFiltersResponseDataWithDefaults instantiates a new ListFiltersResponseData 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 + +### GetBasic + +`func (o *ListFiltersResponseData) GetBasic() []string` + +GetBasic returns the Basic field if non-nil, zero value otherwise. + +### GetBasicOk + +`func (o *ListFiltersResponseData) GetBasicOk() (*[]string, bool)` + +GetBasicOk returns a tuple with the Basic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBasic + +`func (o *ListFiltersResponseData) SetBasic(v []string)` + +SetBasic sets Basic field to given value. + +### HasBasic + +`func (o *ListFiltersResponseData) HasBasic() bool` + +HasBasic returns a boolean if a field has been set. + +### GetAdvanced + +`func (o *ListFiltersResponseData) GetAdvanced() []string` + +GetAdvanced returns the Advanced field if non-nil, zero value otherwise. + +### GetAdvancedOk + +`func (o *ListFiltersResponseData) GetAdvancedOk() (*[]string, bool)` + +GetAdvancedOk returns a tuple with the Advanced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdvanced + +`func (o *ListFiltersResponseData) SetAdvanced(v []string)` + +SetAdvanced sets Advanced field to given value. + +### HasAdvanced + +`func (o *ListFiltersResponseData) HasAdvanced() bool` + +HasAdvanced returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListIncidentsResponse.md b/docs/ListIncidentsResponse.md index acfaf31..235527a 100644 --- a/docs/ListIncidentsResponse.md +++ b/docs/ListIncidentsResponse.md @@ -1,11 +1,107 @@ # ListIncidentsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Incident**](Incident.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]Incident**](Incident.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListIncidentsResponse + +`func NewListIncidentsResponse() *ListIncidentsResponse` + +NewListIncidentsResponse instantiates a new ListIncidentsResponse 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 + +### NewListIncidentsResponseWithDefaults + +`func NewListIncidentsResponseWithDefaults() *ListIncidentsResponse` + +NewListIncidentsResponseWithDefaults instantiates a new ListIncidentsResponse 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 + +### GetData + +`func (o *ListIncidentsResponse) GetData() []Incident` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListIncidentsResponse) GetDataOk() (*[]Incident, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListIncidentsResponse) SetData(v []Incident)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListIncidentsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListIncidentsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListIncidentsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListIncidentsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListIncidentsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListIncidentsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListIncidentsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListIncidentsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListIncidentsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListInsightsResponse.md b/docs/ListInsightsResponse.md index de60301..17676bf 100644 --- a/docs/ListInsightsResponse.md +++ b/docs/ListInsightsResponse.md @@ -1,11 +1,107 @@ # ListInsightsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Insight**](Insight.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]Insight**](Insight.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListInsightsResponse + +`func NewListInsightsResponse() *ListInsightsResponse` + +NewListInsightsResponse instantiates a new ListInsightsResponse 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 + +### NewListInsightsResponseWithDefaults + +`func NewListInsightsResponseWithDefaults() *ListInsightsResponse` + +NewListInsightsResponseWithDefaults instantiates a new ListInsightsResponse 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 + +### GetData + +`func (o *ListInsightsResponse) GetData() []Insight` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListInsightsResponse) GetDataOk() (*[]Insight, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListInsightsResponse) SetData(v []Insight)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListInsightsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListInsightsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListInsightsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListInsightsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListInsightsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListInsightsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListInsightsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListInsightsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListInsightsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListLiveStreamsResponse.md b/docs/ListLiveStreamsResponse.md index 6a7b8ab..b35c055 100644 --- a/docs/ListLiveStreamsResponse.md +++ b/docs/ListLiveStreamsResponse.md @@ -1,9 +1,55 @@ # ListLiveStreamsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]LiveStream**](LiveStream.md) | | [optional] +**Data** | Pointer to [**[]LiveStream**](LiveStream.md) | | [optional] + +## Methods + +### NewListLiveStreamsResponse + +`func NewListLiveStreamsResponse() *ListLiveStreamsResponse` + +NewListLiveStreamsResponse instantiates a new ListLiveStreamsResponse 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 + +### NewListLiveStreamsResponseWithDefaults + +`func NewListLiveStreamsResponseWithDefaults() *ListLiveStreamsResponse` + +NewListLiveStreamsResponseWithDefaults instantiates a new ListLiveStreamsResponse 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 + +### GetData + +`func (o *ListLiveStreamsResponse) GetData() []LiveStream` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListLiveStreamsResponse) GetDataOk() (*[]LiveStream, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListLiveStreamsResponse) SetData(v []LiveStream)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListLiveStreamsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListRealTimeDimensionsResponse.md b/docs/ListRealTimeDimensionsResponse.md index fed007c..8a039ec 100644 --- a/docs/ListRealTimeDimensionsResponse.md +++ b/docs/ListRealTimeDimensionsResponse.md @@ -1,11 +1,107 @@ # ListRealTimeDimensionsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponse_data.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponseData.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListRealTimeDimensionsResponse + +`func NewListRealTimeDimensionsResponse() *ListRealTimeDimensionsResponse` + +NewListRealTimeDimensionsResponse instantiates a new ListRealTimeDimensionsResponse 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 + +### NewListRealTimeDimensionsResponseWithDefaults + +`func NewListRealTimeDimensionsResponseWithDefaults() *ListRealTimeDimensionsResponse` + +NewListRealTimeDimensionsResponseWithDefaults instantiates a new ListRealTimeDimensionsResponse 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 + +### GetData + +`func (o *ListRealTimeDimensionsResponse) GetData() []ListRealTimeDimensionsResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListRealTimeDimensionsResponse) GetDataOk() (*[]ListRealTimeDimensionsResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListRealTimeDimensionsResponse) SetData(v []ListRealTimeDimensionsResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListRealTimeDimensionsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListRealTimeDimensionsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListRealTimeDimensionsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListRealTimeDimensionsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListRealTimeDimensionsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListRealTimeDimensionsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListRealTimeDimensionsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListRealTimeDimensionsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListRealTimeDimensionsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListRealTimeDimensionsResponseData.md b/docs/ListRealTimeDimensionsResponseData.md index ebae1b3..9d97f0f 100644 --- a/docs/ListRealTimeDimensionsResponseData.md +++ b/docs/ListRealTimeDimensionsResponseData.md @@ -1,10 +1,81 @@ # ListRealTimeDimensionsResponseData ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] -**DisplayName** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**DisplayName** | Pointer to **string** | | [optional] + +## Methods + +### NewListRealTimeDimensionsResponseData + +`func NewListRealTimeDimensionsResponseData() *ListRealTimeDimensionsResponseData` + +NewListRealTimeDimensionsResponseData instantiates a new ListRealTimeDimensionsResponseData 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 + +### NewListRealTimeDimensionsResponseDataWithDefaults + +`func NewListRealTimeDimensionsResponseDataWithDefaults() *ListRealTimeDimensionsResponseData` + +NewListRealTimeDimensionsResponseDataWithDefaults instantiates a new ListRealTimeDimensionsResponseData 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 + +### GetName + +`func (o *ListRealTimeDimensionsResponseData) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListRealTimeDimensionsResponseData) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ListRealTimeDimensionsResponseData) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListRealTimeDimensionsResponseData) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *ListRealTimeDimensionsResponseData) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *ListRealTimeDimensionsResponseData) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *ListRealTimeDimensionsResponseData) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *ListRealTimeDimensionsResponseData) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListRealTimeMetricsResponse.md b/docs/ListRealTimeMetricsResponse.md index 532de6c..a6ea1dc 100644 --- a/docs/ListRealTimeMetricsResponse.md +++ b/docs/ListRealTimeMetricsResponse.md @@ -1,11 +1,107 @@ # ListRealTimeMetricsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponse_data.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponseData.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListRealTimeMetricsResponse + +`func NewListRealTimeMetricsResponse() *ListRealTimeMetricsResponse` + +NewListRealTimeMetricsResponse instantiates a new ListRealTimeMetricsResponse 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 + +### NewListRealTimeMetricsResponseWithDefaults + +`func NewListRealTimeMetricsResponseWithDefaults() *ListRealTimeMetricsResponse` + +NewListRealTimeMetricsResponseWithDefaults instantiates a new ListRealTimeMetricsResponse 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 + +### GetData + +`func (o *ListRealTimeMetricsResponse) GetData() []ListRealTimeDimensionsResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListRealTimeMetricsResponse) GetDataOk() (*[]ListRealTimeDimensionsResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListRealTimeMetricsResponse) SetData(v []ListRealTimeDimensionsResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListRealTimeMetricsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListRealTimeMetricsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListRealTimeMetricsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListRealTimeMetricsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListRealTimeMetricsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListRealTimeMetricsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListRealTimeMetricsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListRealTimeMetricsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListRealTimeMetricsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListRelatedIncidentsResponse.md b/docs/ListRelatedIncidentsResponse.md index c60872e..c20d0b4 100644 --- a/docs/ListRelatedIncidentsResponse.md +++ b/docs/ListRelatedIncidentsResponse.md @@ -1,11 +1,107 @@ # ListRelatedIncidentsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Incident**](Incident.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]Incident**](Incident.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListRelatedIncidentsResponse + +`func NewListRelatedIncidentsResponse() *ListRelatedIncidentsResponse` + +NewListRelatedIncidentsResponse instantiates a new ListRelatedIncidentsResponse 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 + +### NewListRelatedIncidentsResponseWithDefaults + +`func NewListRelatedIncidentsResponseWithDefaults() *ListRelatedIncidentsResponse` + +NewListRelatedIncidentsResponseWithDefaults instantiates a new ListRelatedIncidentsResponse 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 + +### GetData + +`func (o *ListRelatedIncidentsResponse) GetData() []Incident` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListRelatedIncidentsResponse) GetDataOk() (*[]Incident, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListRelatedIncidentsResponse) SetData(v []Incident)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListRelatedIncidentsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListRelatedIncidentsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListRelatedIncidentsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListRelatedIncidentsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListRelatedIncidentsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListRelatedIncidentsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListRelatedIncidentsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListRelatedIncidentsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListRelatedIncidentsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListSigningKeysResponse.md b/docs/ListSigningKeysResponse.md index 0e69281..67805ce 100644 --- a/docs/ListSigningKeysResponse.md +++ b/docs/ListSigningKeysResponse.md @@ -1,9 +1,55 @@ # ListSigningKeysResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]SigningKey**](SigningKey.md) | | [optional] +**Data** | Pointer to [**[]SigningKey**](SigningKey.md) | | [optional] + +## Methods + +### NewListSigningKeysResponse + +`func NewListSigningKeysResponse() *ListSigningKeysResponse` + +NewListSigningKeysResponse instantiates a new ListSigningKeysResponse 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 + +### NewListSigningKeysResponseWithDefaults + +`func NewListSigningKeysResponseWithDefaults() *ListSigningKeysResponse` + +NewListSigningKeysResponseWithDefaults instantiates a new ListSigningKeysResponse 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 + +### GetData + +`func (o *ListSigningKeysResponse) GetData() []SigningKey` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListSigningKeysResponse) GetDataOk() (*[]SigningKey, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListSigningKeysResponse) SetData(v []SigningKey)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListSigningKeysResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListUploadsResponse.md b/docs/ListUploadsResponse.md index 64c15e5..fbdc1df 100644 --- a/docs/ListUploadsResponse.md +++ b/docs/ListUploadsResponse.md @@ -1,9 +1,55 @@ # ListUploadsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]Upload**](Upload.md) | | [optional] +**Data** | Pointer to [**[]Upload**](Upload.md) | | [optional] + +## Methods + +### NewListUploadsResponse + +`func NewListUploadsResponse() *ListUploadsResponse` + +NewListUploadsResponse instantiates a new ListUploadsResponse 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 + +### NewListUploadsResponseWithDefaults + +`func NewListUploadsResponseWithDefaults() *ListUploadsResponse` + +NewListUploadsResponseWithDefaults instantiates a new ListUploadsResponse 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 + +### GetData + +`func (o *ListUploadsResponse) GetData() []Upload` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListUploadsResponse) GetDataOk() (*[]Upload, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListUploadsResponse) SetData(v []Upload)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListUploadsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ListVideoViewsResponse.md b/docs/ListVideoViewsResponse.md index 4f50db0..62ac814 100644 --- a/docs/ListVideoViewsResponse.md +++ b/docs/ListVideoViewsResponse.md @@ -1,11 +1,107 @@ # ListVideoViewsResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**[]AbridgedVideoView**](AbridgedVideoView.md) | | [optional] -**TotalRowCount** | **int64** | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**[]AbridgedVideoView**](AbridgedVideoView.md) | | [optional] +**TotalRowCount** | Pointer to **int64** | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewListVideoViewsResponse + +`func NewListVideoViewsResponse() *ListVideoViewsResponse` + +NewListVideoViewsResponse instantiates a new ListVideoViewsResponse 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 + +### NewListVideoViewsResponseWithDefaults + +`func NewListVideoViewsResponseWithDefaults() *ListVideoViewsResponse` + +NewListVideoViewsResponseWithDefaults instantiates a new ListVideoViewsResponse 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 + +### GetData + +`func (o *ListVideoViewsResponse) GetData() []AbridgedVideoView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListVideoViewsResponse) GetDataOk() (*[]AbridgedVideoView, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ListVideoViewsResponse) SetData(v []AbridgedVideoView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListVideoViewsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTotalRowCount + +`func (o *ListVideoViewsResponse) GetTotalRowCount() int64` + +GetTotalRowCount returns the TotalRowCount field if non-nil, zero value otherwise. + +### GetTotalRowCountOk + +`func (o *ListVideoViewsResponse) GetTotalRowCountOk() (*int64, bool)` + +GetTotalRowCountOk returns a tuple with the TotalRowCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalRowCount + +`func (o *ListVideoViewsResponse) SetTotalRowCount(v int64)` + +SetTotalRowCount sets TotalRowCount field to given value. + +### HasTotalRowCount + +`func (o *ListVideoViewsResponse) HasTotalRowCount() bool` + +HasTotalRowCount returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *ListVideoViewsResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *ListVideoViewsResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *ListVideoViewsResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *ListVideoViewsResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStream.md b/docs/LiveStream.md index b4004c4..987418d 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -1,21 +1,367 @@ # LiveStream ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**CreatedAt** | **string** | | [optional] -**StreamKey** | **string** | | [optional] -**ActiveAssetId** | **string** | | [optional] -**RecentAssetIds** | **[]string** | | [optional] -**Status** | **string** | | [optional] -**PlaybackIds** | [**[]PlaybackId**](PlaybackID.md) | | [optional] -**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] -**Passthrough** | **string** | | [optional] -**ReconnectWindow** | **float32** | | [optional] -**ReducedLatency** | **bool** | | [optional] -**SimulcastTargets** | [**[]SimulcastTarget**](SimulcastTarget.md) | | [optional] -**Test** | **bool** | | [optional] +**Id** | Pointer to **string** | Unique identifier for the Live Stream. Max 255 characters. | [optional] +**CreatedAt** | Pointer to **string** | Time the Live Stream was created, defined as a Unix timestamp (seconds since epoch). | [optional] +**StreamKey** | Pointer to **string** | Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. | [optional] +**ActiveAssetId** | Pointer to **string** | The Asset that is currently being created if there is an active broadcast. | [optional] +**RecentAssetIds** | Pointer to **[]string** | An array of strings with the most recent Assets that were created from this live stream. | [optional] +**Status** | Pointer to **string** | `idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published. | [optional] +**PlaybackIds** | Pointer to [**[]PlaybackID**](PlaybackID.md) | An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/video/play-your-videos) for more details. | [optional] +**NewAssetSettings** | Pointer to [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] +**Passthrough** | Pointer to **string** | Arbitrary metadata set for the asset. Max 255 characters. | [optional] +**ReconnectWindow** | Pointer to **float32** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. **Min**: 0.1s. **Max**: 300s (5 minutes). | [optional] [default to 60] +**ReducedLatency** | Pointer to **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. | [optional] +**SimulcastTargets** | Pointer to [**[]SimulcastTarget**](SimulcastTarget.md) | Each Simulcast Target contains configuration details to broadcast (or \"restream\") a live stream to a third-party streaming service. [See the Stream live to 3rd party platforms guide](https://docs.mux.com/guides/video/stream-live-to-3rd-party-platforms). | [optional] +**Test** | Pointer to **bool** | True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. | [optional] + +## Methods + +### NewLiveStream + +`func NewLiveStream() *LiveStream` + +NewLiveStream instantiates a new LiveStream 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 + +### NewLiveStreamWithDefaults + +`func NewLiveStreamWithDefaults() *LiveStream` + +NewLiveStreamWithDefaults instantiates a new LiveStream 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 + +### GetId + +`func (o *LiveStream) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LiveStream) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *LiveStream) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LiveStream) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *LiveStream) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *LiveStream) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *LiveStream) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *LiveStream) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetStreamKey + +`func (o *LiveStream) GetStreamKey() string` + +GetStreamKey returns the StreamKey field if non-nil, zero value otherwise. + +### GetStreamKeyOk + +`func (o *LiveStream) GetStreamKeyOk() (*string, bool)` + +GetStreamKeyOk returns a tuple with the StreamKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamKey + +`func (o *LiveStream) SetStreamKey(v string)` + +SetStreamKey sets StreamKey field to given value. + +### HasStreamKey + +`func (o *LiveStream) HasStreamKey() bool` + +HasStreamKey returns a boolean if a field has been set. + +### GetActiveAssetId + +`func (o *LiveStream) GetActiveAssetId() string` + +GetActiveAssetId returns the ActiveAssetId field if non-nil, zero value otherwise. + +### GetActiveAssetIdOk + +`func (o *LiveStream) GetActiveAssetIdOk() (*string, bool)` + +GetActiveAssetIdOk returns a tuple with the ActiveAssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActiveAssetId + +`func (o *LiveStream) SetActiveAssetId(v string)` + +SetActiveAssetId sets ActiveAssetId field to given value. + +### HasActiveAssetId + +`func (o *LiveStream) HasActiveAssetId() bool` + +HasActiveAssetId returns a boolean if a field has been set. + +### GetRecentAssetIds + +`func (o *LiveStream) GetRecentAssetIds() []string` + +GetRecentAssetIds returns the RecentAssetIds field if non-nil, zero value otherwise. + +### GetRecentAssetIdsOk + +`func (o *LiveStream) GetRecentAssetIdsOk() (*[]string, bool)` + +GetRecentAssetIdsOk returns a tuple with the RecentAssetIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecentAssetIds + +`func (o *LiveStream) SetRecentAssetIds(v []string)` + +SetRecentAssetIds sets RecentAssetIds field to given value. + +### HasRecentAssetIds + +`func (o *LiveStream) HasRecentAssetIds() bool` + +HasRecentAssetIds returns a boolean if a field has been set. + +### GetStatus + +`func (o *LiveStream) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LiveStream) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *LiveStream) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LiveStream) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetPlaybackIds + +`func (o *LiveStream) GetPlaybackIds() []PlaybackID` + +GetPlaybackIds returns the PlaybackIds field if non-nil, zero value otherwise. + +### GetPlaybackIdsOk + +`func (o *LiveStream) GetPlaybackIdsOk() (*[]PlaybackID, bool)` + +GetPlaybackIdsOk returns a tuple with the PlaybackIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaybackIds + +`func (o *LiveStream) SetPlaybackIds(v []PlaybackID)` + +SetPlaybackIds sets PlaybackIds field to given value. + +### HasPlaybackIds + +`func (o *LiveStream) HasPlaybackIds() bool` + +HasPlaybackIds returns a boolean if a field has been set. + +### GetNewAssetSettings + +`func (o *LiveStream) GetNewAssetSettings() CreateAssetRequest` + +GetNewAssetSettings returns the NewAssetSettings field if non-nil, zero value otherwise. + +### GetNewAssetSettingsOk + +`func (o *LiveStream) GetNewAssetSettingsOk() (*CreateAssetRequest, bool)` + +GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewAssetSettings + +`func (o *LiveStream) SetNewAssetSettings(v CreateAssetRequest)` + +SetNewAssetSettings sets NewAssetSettings field to given value. + +### HasNewAssetSettings + +`func (o *LiveStream) HasNewAssetSettings() bool` + +HasNewAssetSettings returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *LiveStream) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *LiveStream) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *LiveStream) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *LiveStream) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetReconnectWindow + +`func (o *LiveStream) GetReconnectWindow() float32` + +GetReconnectWindow returns the ReconnectWindow field if non-nil, zero value otherwise. + +### GetReconnectWindowOk + +`func (o *LiveStream) GetReconnectWindowOk() (*float32, bool)` + +GetReconnectWindowOk returns a tuple with the ReconnectWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReconnectWindow + +`func (o *LiveStream) SetReconnectWindow(v float32)` + +SetReconnectWindow sets ReconnectWindow field to given value. + +### HasReconnectWindow + +`func (o *LiveStream) HasReconnectWindow() bool` + +HasReconnectWindow returns a boolean if a field has been set. + +### GetReducedLatency + +`func (o *LiveStream) GetReducedLatency() bool` + +GetReducedLatency returns the ReducedLatency field if non-nil, zero value otherwise. + +### GetReducedLatencyOk + +`func (o *LiveStream) GetReducedLatencyOk() (*bool, bool)` + +GetReducedLatencyOk returns a tuple with the ReducedLatency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReducedLatency + +`func (o *LiveStream) SetReducedLatency(v bool)` + +SetReducedLatency sets ReducedLatency field to given value. + +### HasReducedLatency + +`func (o *LiveStream) HasReducedLatency() bool` + +HasReducedLatency returns a boolean if a field has been set. + +### GetSimulcastTargets + +`func (o *LiveStream) GetSimulcastTargets() []SimulcastTarget` + +GetSimulcastTargets returns the SimulcastTargets field if non-nil, zero value otherwise. + +### GetSimulcastTargetsOk + +`func (o *LiveStream) GetSimulcastTargetsOk() (*[]SimulcastTarget, bool)` + +GetSimulcastTargetsOk returns a tuple with the SimulcastTargets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSimulcastTargets + +`func (o *LiveStream) SetSimulcastTargets(v []SimulcastTarget)` + +SetSimulcastTargets sets SimulcastTargets field to given value. + +### HasSimulcastTargets + +`func (o *LiveStream) HasSimulcastTargets() bool` + +HasSimulcastTargets returns a boolean if a field has been set. + +### GetTest + +`func (o *LiveStream) GetTest() bool` + +GetTest returns the Test field if non-nil, zero value otherwise. + +### GetTestOk + +`func (o *LiveStream) GetTestOk() (*bool, bool)` + +GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTest + +`func (o *LiveStream) SetTest(v bool)` + +SetTest sets Test field to given value. + +### HasTest + +`func (o *LiveStream) HasTest() bool` + +HasTest returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStreamResponse.md b/docs/LiveStreamResponse.md index 3ced9ea..9014330 100644 --- a/docs/LiveStreamResponse.md +++ b/docs/LiveStreamResponse.md @@ -1,9 +1,55 @@ # LiveStreamResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**LiveStream**](.md) | | [optional] +**Data** | Pointer to [**LiveStream**](LiveStream.md) | | [optional] + +## Methods + +### NewLiveStreamResponse + +`func NewLiveStreamResponse() *LiveStreamResponse` + +NewLiveStreamResponse instantiates a new LiveStreamResponse 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 + +### NewLiveStreamResponseWithDefaults + +`func NewLiveStreamResponseWithDefaults() *LiveStreamResponse` + +NewLiveStreamResponseWithDefaults instantiates a new LiveStreamResponse 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 + +### GetData + +`func (o *LiveStreamResponse) GetData() LiveStream` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LiveStreamResponse) GetDataOk() (*LiveStream, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *LiveStreamResponse) SetData(v LiveStream)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LiveStreamResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 15b64dc..ac6d726 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -19,16 +19,52 @@ Method | HTTP request | Description [**SignalLiveStreamComplete**](LiveStreamsApi.md#SignalLiveStreamComplete) | **Put** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished -# **CreateLiveStream** -> LiveStreamResponse CreateLiveStream(ctx, createLiveStreamRequest) + +## CreateLiveStream + +> LiveStreamResponse CreateLiveStream(ctx).CreateLiveStreamRequest(createLiveStreamRequest).Execute() + Create a live stream -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + createLiveStreamRequest := *openapiclient.NewCreateLiveStreamRequest() // CreateLiveStreamRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.CreateLiveStream(context.Background()).CreateLiveStreamRequest(createLiveStreamRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.CreateLiveStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateLiveStream`: LiveStreamResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.CreateLiveStream`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateLiveStreamRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **createLiveStreamRequest** | [**CreateLiveStreamRequest**](CreateLiveStreamRequest.md)| | + **createLiveStreamRequest** | [**CreateLiveStreamRequest**](CreateLiveStreamRequest.md) | | ### Return type @@ -40,26 +76,69 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CreateLiveStreamPlaybackId** -> CreatePlaybackIdResponse CreateLiveStreamPlaybackId(ctx, lIVESTREAMID, createPlaybackIdRequest) +## CreateLiveStreamPlaybackId + +> CreatePlaybackIDResponse CreateLiveStreamPlaybackId(ctx, lIVESTREAMID).CreatePlaybackIDRequest(createPlaybackIDRequest).Execute() + Create a live stream playback ID -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + createPlaybackIDRequest := *openapiclient.NewCreatePlaybackIDRequest() // CreatePlaybackIDRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.CreateLiveStreamPlaybackId(context.Background(), lIVESTREAMID).CreatePlaybackIDRequest(createPlaybackIDRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.CreateLiveStreamPlaybackId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateLiveStreamPlaybackId`: CreatePlaybackIDResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.CreateLiveStreamPlaybackId`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateLiveStreamPlaybackIdRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | - **createPlaybackIdRequest** | [**CreatePlaybackIdRequest**](CreatePlaybackIdRequest.md)| | + + **createPlaybackIDRequest** | [**CreatePlaybackIDRequest**](CreatePlaybackIDRequest.md) | | ### Return type -[**CreatePlaybackIdResponse**](CreatePlaybackIDResponse.md) +[**CreatePlaybackIDResponse**](CreatePlaybackIDResponse.md) ### Authorization @@ -67,24 +146,67 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## CreateLiveStreamSimulcastTarget + +> SimulcastTargetResponse CreateLiveStreamSimulcastTarget(ctx, lIVESTREAMID).CreateSimulcastTargetRequest(createSimulcastTargetRequest).Execute() -# **CreateLiveStreamSimulcastTarget** -> SimulcastTargetResponse CreateLiveStreamSimulcastTarget(ctx, lIVESTREAMID, createSimulcastTargetRequest) Create a live stream simulcast target -Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + createSimulcastTargetRequest := *openapiclient.NewCreateSimulcastTargetRequest("Url_example") // CreateSimulcastTargetRequest | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.CreateLiveStreamSimulcastTarget(context.Background(), lIVESTREAMID).CreateSimulcastTargetRequest(createSimulcastTargetRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.CreateLiveStreamSimulcastTarget``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateLiveStreamSimulcastTarget`: SimulcastTargetResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.CreateLiveStreamSimulcastTarget`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | - **createSimulcastTargetRequest** | [**CreateSimulcastTargetRequest**](CreateSimulcastTargetRequest.md)| | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateLiveStreamSimulcastTargetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createSimulcastTargetRequest** | [**CreateSimulcastTargetRequest**](CreateSimulcastTargetRequest.md) | | ### Return type @@ -96,21 +218,61 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## DeleteLiveStream + +> DeleteLiveStream(ctx, lIVESTREAMID).Execute() -# **DeleteLiveStream** -> DeleteLiveStream(ctx, lIVESTREAMID) Delete a live stream -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.DeleteLiveStream(context.Background(), lIVESTREAMID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.DeleteLiveStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteLiveStreamRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | + ### Return type @@ -122,22 +284,64 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteLiveStreamPlaybackId -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> DeleteLiveStreamPlaybackId(ctx, lIVESTREAMID, pLAYBACKID).Execute() -# **DeleteLiveStreamPlaybackId** -> DeleteLiveStreamPlaybackId(ctx, lIVESTREAMID, pLAYBACKID) Delete a live stream playback ID -### Required Parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + pLAYBACKID := "pLAYBACKID_example" // string | The live stream's playback ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.DeleteLiveStreamPlaybackId(context.Background(), lIVESTREAMID, pLAYBACKID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.DeleteLiveStreamPlaybackId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | - **pLAYBACKID** | **string**| The live stream's playback ID. | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | +**pLAYBACKID** | **string** | The live stream's playback ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteLiveStreamPlaybackIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + ### Return type @@ -149,24 +353,66 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## DeleteLiveStreamSimulcastTarget + +> DeleteLiveStreamSimulcastTarget(ctx, lIVESTREAMID, sIMULCASTTARGETID).Execute() -# **DeleteLiveStreamSimulcastTarget** -> DeleteLiveStreamSimulcastTarget(ctx, lIVESTREAMID, sIMULCASTTARGETID) Delete a Live Stream Simulcast Target -Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + sIMULCASTTARGETID := "sIMULCASTTARGETID_example" // string | The ID of the simulcast target. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.DeleteLiveStreamSimulcastTarget(context.Background(), lIVESTREAMID, sIMULCASTTARGETID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.DeleteLiveStreamSimulcastTarget``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | +**sIMULCASTTARGETID** | **string** | The ID of the simulcast target. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteLiveStreamSimulcastTargetRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | - **sIMULCASTTARGETID** | **string**| The ID of the simulcast target. | + + ### Return type @@ -178,23 +424,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **DisableLiveStream** -> DisableLiveStreamResponse DisableLiveStream(ctx, lIVESTREAMID) +## DisableLiveStream + +> DisableLiveStreamResponse DisableLiveStream(ctx, lIVESTREAMID).Execute() + Disable a live stream -Disables a live stream, making it reject incoming RTMP streams until re-enabled. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.DisableLiveStream(context.Background(), lIVESTREAMID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.DisableLiveStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DisableLiveStream`: DisableLiveStreamResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.DisableLiveStream`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDisableLiveStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -206,23 +494,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## EnableLiveStream + +> EnableLiveStreamResponse EnableLiveStream(ctx, lIVESTREAMID).Execute() -# **EnableLiveStream** -> EnableLiveStreamResponse EnableLiveStream(ctx, lIVESTREAMID) Enable a live stream -Enables a live stream, allowing it to accept an incoming RTMP stream. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.EnableLiveStream(context.Background(), lIVESTREAMID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.EnableLiveStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EnableLiveStream`: EnableLiveStreamResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.EnableLiveStream`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEnableLiveStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -234,23 +564,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetLiveStream -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> LiveStreamResponse GetLiveStream(ctx, lIVESTREAMID).Execute() -# **GetLiveStream** -> LiveStreamResponse GetLiveStream(ctx, lIVESTREAMID) Retrieve a live stream -Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.GetLiveStream(context.Background(), lIVESTREAMID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.GetLiveStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLiveStream`: LiveStreamResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.GetLiveStream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetLiveStreamRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | + ### Return type @@ -262,24 +634,68 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetLiveStreamSimulcastTarget -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> SimulcastTargetResponse GetLiveStreamSimulcastTarget(ctx, lIVESTREAMID, sIMULCASTTARGETID).Execute() -# **GetLiveStreamSimulcastTarget** -> SimulcastTargetResponse GetLiveStreamSimulcastTarget(ctx, lIVESTREAMID, sIMULCASTTARGETID) Retrieve a Live Stream Simulcast Target -Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + sIMULCASTTARGETID := "sIMULCASTTARGETID_example" // string | The ID of the simulcast target. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.GetLiveStreamSimulcastTarget(context.Background(), lIVESTREAMID, sIMULCASTTARGETID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.GetLiveStreamSimulcastTarget``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLiveStreamSimulcastTarget`: SimulcastTargetResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.GetLiveStreamSimulcastTarget`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | +**sIMULCASTTARGETID** | **string** | The ID of the simulcast target. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetLiveStreamSimulcastTargetRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | - **sIMULCASTTARGETID** | **string**| The ID of the simulcast target. | + + ### Return type @@ -291,29 +707,63 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListLiveStreams** -> ListLiveStreamsResponse ListLiveStreams(ctx, optional) +## ListLiveStreams + +> ListLiveStreamsResponse ListLiveStreams(ctx).Limit(limit).Page(page).StreamKey(streamKey).Execute() + List live streams -### Required Parameters +### Example -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListLiveStreamsOpts** | optional parameters | nil if no parameters +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + streamKey := "streamKey_example" // string | Filter response to return live stream for this stream key only (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.ListLiveStreams(context.Background()).Limit(limit).Page(page).StreamKey(streamKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.ListLiveStreams``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListLiveStreams`: ListLiveStreamsResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.ListLiveStreams`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListLiveStreamsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListLiveStreamsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **streamKey** | **string** | Filter response to return live stream for this stream key only | ### Return type @@ -325,23 +775,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## ResetStreamKey + +> LiveStreamResponse ResetStreamKey(ctx, lIVESTREAMID).Execute() -# **ResetStreamKey** -> LiveStreamResponse ResetStreamKey(ctx, lIVESTREAMID) Reset a live stream’s stream key -Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.ResetStreamKey(context.Background(), lIVESTREAMID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.ResetStreamKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ResetStreamKey`: LiveStreamResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.ResetStreamKey`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetStreamKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -353,23 +845,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **SignalLiveStreamComplete** -> SignalLiveStreamCompleteResponse SignalLiveStreamComplete(ctx, lIVESTREAMID) +## SignalLiveStreamComplete + +> SignalLiveStreamCompleteResponse SignalLiveStreamComplete(ctx, lIVESTREAMID).Execute() + Signal a live stream is finished -(Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + lIVESTREAMID := "lIVESTREAMID_example" // string | The live stream ID + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.LiveStreamsApi.SignalLiveStreamComplete(context.Background(), lIVESTREAMID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LiveStreamsApi.SignalLiveStreamComplete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SignalLiveStreamComplete`: SignalLiveStreamCompleteResponse + fmt.Fprintf(os.Stdout, "Response from `LiveStreamsApi.SignalLiveStreamComplete`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **lIVESTREAMID** | **string**| The live stream ID | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**lIVESTREAMID** | **string** | The live stream ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSignalLiveStreamCompleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -381,8 +915,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/Metric.md b/docs/Metric.md index 9a52993..8a1128f 100644 --- a/docs/Metric.md +++ b/docs/Metric.md @@ -1,13 +1,159 @@ # Metric ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **float64** | | [optional] -**Type** | **string** | | [optional] -**Name** | **string** | | [optional] -**Metric** | **string** | | [optional] -**Measurement** | **string** | | [optional] +**Value** | Pointer to **float64** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Metric** | Pointer to **string** | | [optional] +**Measurement** | Pointer to **string** | | [optional] + +## Methods + +### NewMetric + +`func NewMetric() *Metric` + +NewMetric instantiates a new Metric 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 + +### NewMetricWithDefaults + +`func NewMetricWithDefaults() *Metric` + +NewMetricWithDefaults instantiates a new Metric 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 + +### GetValue + +`func (o *Metric) GetValue() float64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *Metric) GetValueOk() (*float64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *Metric) SetValue(v float64)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *Metric) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *Metric) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Metric) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Metric) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Metric) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetName + +`func (o *Metric) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Metric) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Metric) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Metric) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMetric + +`func (o *Metric) GetMetric() string` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *Metric) GetMetricOk() (*string, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *Metric) SetMetric(v string)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *Metric) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + +### GetMeasurement + +`func (o *Metric) GetMeasurement() string` + +GetMeasurement returns the Measurement field if non-nil, zero value otherwise. + +### GetMeasurementOk + +`func (o *Metric) GetMeasurementOk() (*string, bool)` + +GetMeasurementOk returns a tuple with the Measurement field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeasurement + +`func (o *Metric) SetMeasurement(v string)` + +SetMeasurement sets Measurement field to given value. + +### HasMeasurement + +`func (o *Metric) HasMeasurement() bool` + +HasMeasurement returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index 77297f6..4411d0d 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -11,31 +11,68 @@ Method | HTTP request | Description [**ListInsights**](MetricsApi.md#ListInsights) | **Get** /data/v1/metrics/{METRIC_ID}/insights | List Insights -# **GetMetricTimeseriesData** -> GetMetricTimeseriesDataResponse GetMetricTimeseriesData(ctx, mETRICID, optional) + +## GetMetricTimeseriesData + +> GetMetricTimeseriesDataResponse GetMetricTimeseriesData(ctx, mETRICID).Timeframe(timeframe).Filters(filters).Measurement(measurement).OrderDirection(orderDirection).GroupBy(groupBy).Execute() + Get metric timeseries data -Returns timeseries data for a specific metric -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mETRICID := "video_startup_time" // string | ID of the Metric + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + measurement := "measurement_example" // string | Measurement for the provided metric. If omitted, the deafult for the metric will be used. (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + groupBy := "groupBy_example" // string | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the supplied timeframe. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.MetricsApi.GetMetricTimeseriesData(context.Background(), mETRICID).Timeframe(timeframe).Filters(filters).Measurement(measurement).OrderDirection(orderDirection).GroupBy(groupBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.GetMetricTimeseriesData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMetricTimeseriesData`: GetMetricTimeseriesDataResponse + fmt.Fprintf(os.Stdout, "Response from `MetricsApi.GetMetricTimeseriesData`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **mETRICID** | **string**| ID of the Metric | - **optional** | ***GetMetricTimeseriesDataOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mETRICID** | **string** | ID of the Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMetricTimeseriesDataRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a GetMetricTimeseriesDataOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the deafult for the metric will be used. | - **orderDirection** | **optional.String**| Sort order. | - **groupBy** | **optional.String**| Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the supplied timeframe. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **measurement** | **string** | Measurement for the provided metric. If omitted, the deafult for the metric will be used. | + **orderDirection** | **string** | Sort order. | + **groupBy** | **string** | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the supplied timeframe. | ### Return type @@ -47,34 +84,71 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOverallValues + +> GetOverallValuesResponse GetOverallValues(ctx, mETRICID).Timeframe(timeframe).Filters(filters).Measurement(measurement).Execute() -# **GetOverallValues** -> GetOverallValuesResponse GetOverallValues(ctx, mETRICID, optional) Get Overall values -Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mETRICID := "video_startup_time" // string | ID of the Metric + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + measurement := "measurement_example" // string | Measurement for the provided metric. If omitted, the deafult for the metric will be used. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.MetricsApi.GetOverallValues(context.Background(), mETRICID).Timeframe(timeframe).Filters(filters).Measurement(measurement).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.GetOverallValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOverallValues`: GetOverallValuesResponse + fmt.Fprintf(os.Stdout, "Response from `MetricsApi.GetOverallValues`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **mETRICID** | **string**| ID of the Metric | - **optional** | ***GetOverallValuesOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mETRICID** | **string** | ID of the Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOverallValuesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a GetOverallValuesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the deafult for the metric will be used. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **measurement** | **string** | Measurement for the provided metric. If omitted, the deafult for the metric will be used. | ### Return type @@ -86,33 +160,67 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAllMetricValues + +> ListAllMetricValuesResponse ListAllMetricValues(ctx).Timeframe(timeframe).Filters(filters).Dimension(dimension).Value(value).Execute() -# **ListAllMetricValues** -> ListAllMetricValuesResponse ListAllMetricValues(ctx, optional) List all metric values -List all of the values across every breakdown for a specific metric -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListAllMetricValuesOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + dimension := "dimension_example" // string | Dimension the specified value belongs to (optional) + value := "value_example" // string | Value to show all available metrics for (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.MetricsApi.ListAllMetricValues(context.Background()).Timeframe(timeframe).Filters(filters).Dimension(dimension).Value(value).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.ListAllMetricValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAllMetricValues`: ListAllMetricValuesResponse + fmt.Fprintf(os.Stdout, "Response from `MetricsApi.ListAllMetricValues`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAllMetricValuesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListAllMetricValuesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **dimension** | **optional.String**| Dimension the specified value belongs to | - **value** | **optional.String**| Value to show all available metrics for | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **dimension** | **string** | Dimension the specified value belongs to | + **value** | **string** | Value to show all available metrics for | ### Return type @@ -124,39 +232,81 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListBreakdownValues** -> ListBreakdownValuesResponse ListBreakdownValues(ctx, mETRICID, optional) +## ListBreakdownValues + +> ListBreakdownValuesResponse ListBreakdownValues(ctx, mETRICID).GroupBy(groupBy).Measurement(measurement).Filters(filters).Limit(limit).Page(page).OrderBy(orderBy).OrderDirection(orderDirection).Timeframe(timeframe).Execute() + List breakdown values -List the breakdown values for a specific metric -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mETRICID := "video_startup_time" // string | ID of the Metric + groupBy := "groupBy_example" // string | Breakdown value to group the results by (optional) + measurement := "measurement_example" // string | Measurement for the provided metric. If omitted, the deafult for the metric will be used. (optional) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + orderBy := "orderBy_example" // string | Value to order the results by (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.MetricsApi.ListBreakdownValues(context.Background(), mETRICID).GroupBy(groupBy).Measurement(measurement).Filters(filters).Limit(limit).Page(page).OrderBy(orderBy).OrderDirection(orderDirection).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.ListBreakdownValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListBreakdownValues`: ListBreakdownValuesResponse + fmt.Fprintf(os.Stdout, "Response from `MetricsApi.ListBreakdownValues`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **mETRICID** | **string**| ID of the Metric | - **optional** | ***ListBreakdownValuesOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mETRICID** | **string** | ID of the Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListBreakdownValuesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListBreakdownValuesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **groupBy** | **optional.String**| Breakdown value to group the results by | - **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the deafult for the metric will be used. | - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **orderBy** | **optional.String**| Value to order the results by | - **orderDirection** | **optional.String**| Sort order. | - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **groupBy** | **string** | Breakdown value to group the results by | + **measurement** | **string** | Measurement for the provided metric. If omitted, the deafult for the metric will be used. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **orderBy** | **string** | Value to order the results by | + **orderDirection** | **string** | Sort order. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | ### Return type @@ -168,34 +318,71 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ListInsights** -> ListInsightsResponse ListInsights(ctx, mETRICID, optional) +## ListInsights + +> ListInsightsResponse ListInsights(ctx, mETRICID).Measurement(measurement).OrderDirection(orderDirection).Timeframe(timeframe).Execute() + List Insights -Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mETRICID := "video_startup_time" // string | ID of the Metric + measurement := "measurement_example" // string | Measurement for the provided metric. If omitted, the deafult for the metric will be used. (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.MetricsApi.ListInsights(context.Background(), mETRICID).Measurement(measurement).OrderDirection(orderDirection).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsApi.ListInsights``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListInsights`: ListInsightsResponse + fmt.Fprintf(os.Stdout, "Response from `MetricsApi.ListInsights`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **mETRICID** | **string**| ID of the Metric | - **optional** | ***ListInsightsOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mETRICID** | **string** | ID of the Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListInsightsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListInsightsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the deafult for the metric will be used. | - **orderDirection** | **optional.String**| Sort order. | - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **measurement** | **string** | Measurement for the provided metric. If omitted, the deafult for the metric will be used. | + **orderDirection** | **string** | Sort order. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | ### Return type @@ -207,8 +394,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/NotificationRule.md b/docs/NotificationRule.md index 5f2ca8b..90b8768 100644 --- a/docs/NotificationRule.md +++ b/docs/NotificationRule.md @@ -1,11 +1,107 @@ # NotificationRule ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | | [optional] -**Name** | **string** | | [optional] -**Id** | **string** | | [optional] +**Value** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] + +## Methods + +### NewNotificationRule + +`func NewNotificationRule() *NotificationRule` + +NewNotificationRule instantiates a new NotificationRule 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 + +### NewNotificationRuleWithDefaults + +`func NewNotificationRuleWithDefaults() *NotificationRule` + +NewNotificationRuleWithDefaults instantiates a new NotificationRule 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 + +### GetValue + +`func (o *NotificationRule) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *NotificationRule) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *NotificationRule) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *NotificationRule) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetName + +`func (o *NotificationRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NotificationRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NotificationRule) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NotificationRule) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetId + +`func (o *NotificationRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NotificationRule) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NotificationRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *NotificationRule) HasId() bool` + +HasId returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OverallValues.md b/docs/OverallValues.md index 4c31c66..4e8a7d6 100644 --- a/docs/OverallValues.md +++ b/docs/OverallValues.md @@ -1,12 +1,133 @@ # OverallValues ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **float64** | | [optional] -**TotalWatchTime** | **int64** | | [optional] -**TotalViews** | **int64** | | [optional] -**GlobalValue** | **float64** | | [optional] +**Value** | Pointer to **float64** | | [optional] +**TotalWatchTime** | Pointer to **int64** | | [optional] +**TotalViews** | Pointer to **int64** | | [optional] +**GlobalValue** | Pointer to **float64** | | [optional] + +## Methods + +### NewOverallValues + +`func NewOverallValues() *OverallValues` + +NewOverallValues instantiates a new OverallValues 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 + +### NewOverallValuesWithDefaults + +`func NewOverallValuesWithDefaults() *OverallValues` + +NewOverallValuesWithDefaults instantiates a new OverallValues 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 + +### GetValue + +`func (o *OverallValues) GetValue() float64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *OverallValues) GetValueOk() (*float64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *OverallValues) SetValue(v float64)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *OverallValues) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetTotalWatchTime + +`func (o *OverallValues) GetTotalWatchTime() int64` + +GetTotalWatchTime returns the TotalWatchTime field if non-nil, zero value otherwise. + +### GetTotalWatchTimeOk + +`func (o *OverallValues) GetTotalWatchTimeOk() (*int64, bool)` + +GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalWatchTime + +`func (o *OverallValues) SetTotalWatchTime(v int64)` + +SetTotalWatchTime sets TotalWatchTime field to given value. + +### HasTotalWatchTime + +`func (o *OverallValues) HasTotalWatchTime() bool` + +HasTotalWatchTime returns a boolean if a field has been set. + +### GetTotalViews + +`func (o *OverallValues) GetTotalViews() int64` + +GetTotalViews returns the TotalViews field if non-nil, zero value otherwise. + +### GetTotalViewsOk + +`func (o *OverallValues) GetTotalViewsOk() (*int64, bool)` + +GetTotalViewsOk returns a tuple with the TotalViews field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalViews + +`func (o *OverallValues) SetTotalViews(v int64)` + +SetTotalViews sets TotalViews field to given value. + +### HasTotalViews + +`func (o *OverallValues) HasTotalViews() bool` + +HasTotalViews returns a boolean if a field has been set. + +### GetGlobalValue + +`func (o *OverallValues) GetGlobalValue() float64` + +GetGlobalValue returns the GlobalValue field if non-nil, zero value otherwise. + +### GetGlobalValueOk + +`func (o *OverallValues) GetGlobalValueOk() (*float64, bool)` + +GetGlobalValueOk returns a tuple with the GlobalValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGlobalValue + +`func (o *OverallValues) SetGlobalValue(v float64)` + +SetGlobalValue sets GlobalValue field to given value. + +### HasGlobalValue + +`func (o *OverallValues) HasGlobalValue() bool` + +HasGlobalValue returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlaybackIDApi.md b/docs/PlaybackIDApi.md index 139b29b..6f8e694 100644 --- a/docs/PlaybackIDApi.md +++ b/docs/PlaybackIDApi.md @@ -7,18 +7,58 @@ Method | HTTP request | Description [**GetAssetOrLivestreamId**](PlaybackIDApi.md#GetAssetOrLivestreamId) | **Get** /video/v1/playback-ids/{PLAYBACK_ID} | Retrieve an Asset or Live Stream ID -# **GetAssetOrLivestreamId** -> GetAssetOrLiveStreamIdResponse GetAssetOrLivestreamId(ctx, pLAYBACKID) + +## GetAssetOrLivestreamId + +> GetAssetOrLiveStreamIdResponse GetAssetOrLivestreamId(ctx, pLAYBACKID).Execute() + Retrieve an Asset or Live Stream ID -Retrieves the Identifier of the Asset or Live Stream associated with the Playback ID. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + pLAYBACKID := "pLAYBACKID_example" // string | The live stream's playback ID. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.PlaybackIDApi.GetAssetOrLivestreamId(context.Background(), pLAYBACKID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PlaybackIDApi.GetAssetOrLivestreamId``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAssetOrLivestreamId`: GetAssetOrLiveStreamIdResponse + fmt.Fprintf(os.Stdout, "Response from `PlaybackIDApi.GetAssetOrLivestreamId`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pLAYBACKID** | **string** | The live stream's playback ID. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssetOrLivestreamIdRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **pLAYBACKID** | **string**| The live stream's playback ID. | + ### Return type @@ -30,8 +70,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/PlaybackId.md b/docs/PlaybackId.md deleted file mode 100644 index 6a1063b..0000000 --- a/docs/PlaybackId.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlaybackId - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | Unique identifier for the PlaybackID | [optional] -**Policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlaybackPolicy.md b/docs/PlaybackPolicy.md index 1d7cd3b..de591d3 100644 --- a/docs/PlaybackPolicy.md +++ b/docs/PlaybackPolicy.md @@ -1,8 +1,12 @@ # PlaybackPolicy -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +## Enum + + +* `PUBLIC` (value: `"public"`) + +* `SIGNED` (value: `"signed"`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RealTimeApi.md b/docs/RealTimeApi.md index 6219d88..6733253 100644 --- a/docs/RealTimeApi.md +++ b/docs/RealTimeApi.md @@ -5,37 +5,74 @@ All URIs are relative to *https://api.mux.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**GetRealtimeBreakdown**](RealTimeApi.md#GetRealtimeBreakdown) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown | Get Real-Time Breakdown -[**GetRealtimeHistogramTimeseries**](RealTimeApi.md#GetRealtimeHistogramTimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/histogram-timeseries | Get Real-Time Histogram Timeseries +[**GetRealtimeHistogramTimeseries**](RealTimeApi.md#GetRealtimeHistogramTimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_HISTOGRAM_METRIC_ID}/histogram-timeseries | Get Real-Time Histogram Timeseries [**GetRealtimeTimeseries**](RealTimeApi.md#GetRealtimeTimeseries) | **Get** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries | Get Real-Time Timeseries [**ListRealtimeDimensions**](RealTimeApi.md#ListRealtimeDimensions) | **Get** /data/v1/realtime/dimensions | List Real-Time Dimensions [**ListRealtimeMetrics**](RealTimeApi.md#ListRealtimeMetrics) | **Get** /data/v1/realtime/metrics | List Real-Time Metrics -# **GetRealtimeBreakdown** -> GetRealTimeBreakdownResponse GetRealtimeBreakdown(ctx, rEALTIMEMETRICID, optional) + +## GetRealtimeBreakdown + +> GetRealTimeBreakdownResponse GetRealtimeBreakdown(ctx, rEALTIMEMETRICID).Dimension(dimension).Timestamp(timestamp).Filters(filters).OrderBy(orderBy).OrderDirection(orderDirection).Execute() + Get Real-Time Breakdown -Gets breakdown information for a specific dimension and metric along with the number of concurrent viewers and negative impact score. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + rEALTIMEMETRICID := "current-concurrent-viewers" // string | ID of the Realtime Metric + dimension := "dimension_example" // string | Dimension the specified value belongs to (optional) + timestamp := float32(8.14) // float32 | Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. (optional) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + orderBy := "orderBy_example" // string | Value to order the results by (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.RealTimeApi.GetRealtimeBreakdown(context.Background(), rEALTIMEMETRICID).Dimension(dimension).Timestamp(timestamp).Filters(filters).OrderBy(orderBy).OrderDirection(orderDirection).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RealTimeApi.GetRealtimeBreakdown``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRealtimeBreakdown`: GetRealTimeBreakdownResponse + fmt.Fprintf(os.Stdout, "Response from `RealTimeApi.GetRealtimeBreakdown`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **rEALTIMEMETRICID** | **string**| ID of the Realtime Metric | - **optional** | ***GetRealtimeBreakdownOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**rEALTIMEMETRICID** | **string** | ID of the Realtime Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRealtimeBreakdownRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a GetRealtimeBreakdownOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **dimension** | **optional.String**| Dimension the specified value belongs to | - **timestamp** | **optional.Float64**| Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. | - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **orderBy** | **optional.String**| Value to order the results by | - **orderDirection** | **optional.String**| Sort order. | + **dimension** | **string** | Dimension the specified value belongs to | + **timestamp** | **float32** | Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **orderBy** | **string** | Value to order the results by | + **orderDirection** | **string** | Sort order. | ### Return type @@ -47,32 +84,67 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRealtimeHistogramTimeseries + +> GetRealTimeHistogramTimeseriesResponse GetRealtimeHistogramTimeseries(ctx, rEALTIMEMETRICID).Filters(filters).Execute() -# **GetRealtimeHistogramTimeseries** -> GetRealTimeHistogramTimeseriesResponse GetRealtimeHistogramTimeseries(ctx, rEALTIMEMETRICID, optional) Get Real-Time Histogram Timeseries -Gets histogram timeseries information for a specific metric. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + rEALTIMEMETRICID := "current-concurrent-viewers" // string | ID of the Realtime Metric + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.RealTimeApi.GetRealtimeHistogramTimeseries(context.Background(), rEALTIMEMETRICID).Filters(filters).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RealTimeApi.GetRealtimeHistogramTimeseries``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRealtimeHistogramTimeseries`: GetRealTimeHistogramTimeseriesResponse + fmt.Fprintf(os.Stdout, "Response from `RealTimeApi.GetRealtimeHistogramTimeseries`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **rEALTIMEMETRICID** | **string**| ID of the Realtime Metric | - **optional** | ***GetRealtimeHistogramTimeseriesOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**rEALTIMEMETRICID** | **string** | ID of the Realtime Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRealtimeHistogramTimeseriesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a GetRealtimeHistogramTimeseriesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | ### Return type @@ -84,32 +156,67 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRealtimeTimeseries + +> GetRealTimeTimeseriesResponse GetRealtimeTimeseries(ctx, rEALTIMEMETRICID).Filters(filters).Execute() -# **GetRealtimeTimeseries** -> GetRealTimeTimeseriesResponse GetRealtimeTimeseries(ctx, rEALTIMEMETRICID, optional) Get Real-Time Timeseries -Gets Time series information for a specific metric along with the number of concurrent viewers. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + rEALTIMEMETRICID := "current-concurrent-viewers" // string | ID of the Realtime Metric + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.RealTimeApi.GetRealtimeTimeseries(context.Background(), rEALTIMEMETRICID).Filters(filters).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RealTimeApi.GetRealtimeTimeseries``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRealtimeTimeseries`: GetRealTimeTimeseriesResponse + fmt.Fprintf(os.Stdout, "Response from `RealTimeApi.GetRealtimeTimeseries`: %v\n", resp) +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **rEALTIMEMETRICID** | **string**| ID of the Realtime Metric | - **optional** | ***GetRealtimeTimeseriesOpts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**rEALTIMEMETRICID** | **string** | ID of the Realtime Metric | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRealtimeTimeseriesRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a GetRealtimeTimeseriesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | ### Return type @@ -121,20 +228,57 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRealtimeDimensions -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> ListRealTimeDimensionsResponse ListRealtimeDimensions(ctx).Execute() -# **ListRealtimeDimensions** -> ListRealTimeDimensionsResponse ListRealtimeDimensions(ctx, ) List Real-Time Dimensions -Lists availiable real-time dimensions -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.RealTimeApi.ListRealtimeDimensions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RealTimeApi.ListRealtimeDimensions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRealtimeDimensions`: ListRealTimeDimensionsResponse + fmt.Fprintf(os.Stdout, "Response from `RealTimeApi.ListRealtimeDimensions`: %v\n", resp) +} +``` + +### Path Parameters + This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiListRealtimeDimensionsRequest struct via the builder pattern + + ### Return type [**ListRealTimeDimensionsResponse**](ListRealTimeDimensionsResponse.md) @@ -145,20 +289,57 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## ListRealtimeMetrics + +> ListRealTimeMetricsResponse ListRealtimeMetrics(ctx).Execute() -# **ListRealtimeMetrics** -> ListRealTimeMetricsResponse ListRealtimeMetrics(ctx, ) List Real-Time Metrics -Lists availiable real-time metrics. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.RealTimeApi.ListRealtimeMetrics(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RealTimeApi.ListRealtimeMetrics``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRealtimeMetrics`: ListRealTimeMetricsResponse + fmt.Fprintf(os.Stdout, "Response from `RealTimeApi.ListRealtimeMetrics`: %v\n", resp) +} +``` + +### Path Parameters + This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiListRealtimeMetricsRequest struct via the builder pattern + + ### Return type [**ListRealTimeMetricsResponse**](ListRealTimeMetricsResponse.md) @@ -169,8 +350,10 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/RealTimeBreakdownValue.md b/docs/RealTimeBreakdownValue.md index 7a0146c..25c3484 100644 --- a/docs/RealTimeBreakdownValue.md +++ b/docs/RealTimeBreakdownValue.md @@ -1,13 +1,159 @@ # RealTimeBreakdownValue ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | | [optional] -**NegativeImpact** | **int64** | | [optional] -**MetricValue** | **float64** | | [optional] -**DisplayValue** | **string** | | [optional] -**ConcurentViewers** | **int64** | | [optional] +**Value** | Pointer to **string** | | [optional] +**NegativeImpact** | Pointer to **int64** | | [optional] +**MetricValue** | Pointer to **float64** | | [optional] +**DisplayValue** | Pointer to **string** | | [optional] +**ConcurentViewers** | Pointer to **int64** | | [optional] + +## Methods + +### NewRealTimeBreakdownValue + +`func NewRealTimeBreakdownValue() *RealTimeBreakdownValue` + +NewRealTimeBreakdownValue instantiates a new RealTimeBreakdownValue 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 + +### NewRealTimeBreakdownValueWithDefaults + +`func NewRealTimeBreakdownValueWithDefaults() *RealTimeBreakdownValue` + +NewRealTimeBreakdownValueWithDefaults instantiates a new RealTimeBreakdownValue 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 + +### GetValue + +`func (o *RealTimeBreakdownValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *RealTimeBreakdownValue) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *RealTimeBreakdownValue) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *RealTimeBreakdownValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetNegativeImpact + +`func (o *RealTimeBreakdownValue) GetNegativeImpact() int64` + +GetNegativeImpact returns the NegativeImpact field if non-nil, zero value otherwise. + +### GetNegativeImpactOk + +`func (o *RealTimeBreakdownValue) GetNegativeImpactOk() (*int64, bool)` + +GetNegativeImpactOk returns a tuple with the NegativeImpact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNegativeImpact + +`func (o *RealTimeBreakdownValue) SetNegativeImpact(v int64)` + +SetNegativeImpact sets NegativeImpact field to given value. + +### HasNegativeImpact + +`func (o *RealTimeBreakdownValue) HasNegativeImpact() bool` + +HasNegativeImpact returns a boolean if a field has been set. + +### GetMetricValue + +`func (o *RealTimeBreakdownValue) GetMetricValue() float64` + +GetMetricValue returns the MetricValue field if non-nil, zero value otherwise. + +### GetMetricValueOk + +`func (o *RealTimeBreakdownValue) GetMetricValueOk() (*float64, bool)` + +GetMetricValueOk returns a tuple with the MetricValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetricValue + +`func (o *RealTimeBreakdownValue) SetMetricValue(v float64)` + +SetMetricValue sets MetricValue field to given value. + +### HasMetricValue + +`func (o *RealTimeBreakdownValue) HasMetricValue() bool` + +HasMetricValue returns a boolean if a field has been set. + +### GetDisplayValue + +`func (o *RealTimeBreakdownValue) GetDisplayValue() string` + +GetDisplayValue returns the DisplayValue field if non-nil, zero value otherwise. + +### GetDisplayValueOk + +`func (o *RealTimeBreakdownValue) GetDisplayValueOk() (*string, bool)` + +GetDisplayValueOk returns a tuple with the DisplayValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayValue + +`func (o *RealTimeBreakdownValue) SetDisplayValue(v string)` + +SetDisplayValue sets DisplayValue field to given value. + +### HasDisplayValue + +`func (o *RealTimeBreakdownValue) HasDisplayValue() bool` + +HasDisplayValue returns a boolean if a field has been set. + +### GetConcurentViewers + +`func (o *RealTimeBreakdownValue) GetConcurentViewers() int64` + +GetConcurentViewers returns the ConcurentViewers field if non-nil, zero value otherwise. + +### GetConcurentViewersOk + +`func (o *RealTimeBreakdownValue) GetConcurentViewersOk() (*int64, bool)` + +GetConcurentViewersOk returns a tuple with the ConcurentViewers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConcurentViewers + +`func (o *RealTimeBreakdownValue) SetConcurentViewers(v int64)` + +SetConcurentViewers sets ConcurentViewers field to given value. + +### HasConcurentViewers + +`func (o *RealTimeBreakdownValue) HasConcurentViewers() bool` + +HasConcurentViewers returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RealTimeHistogramTimeseriesBucket.md b/docs/RealTimeHistogramTimeseriesBucket.md index 82a3dae..616e995 100644 --- a/docs/RealTimeHistogramTimeseriesBucket.md +++ b/docs/RealTimeHistogramTimeseriesBucket.md @@ -1,10 +1,81 @@ # RealTimeHistogramTimeseriesBucket ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Start** | **int64** | | [optional] -**End** | **int64** | | [optional] +**Start** | Pointer to **int64** | | [optional] +**End** | Pointer to **int64** | | [optional] + +## Methods + +### NewRealTimeHistogramTimeseriesBucket + +`func NewRealTimeHistogramTimeseriesBucket() *RealTimeHistogramTimeseriesBucket` + +NewRealTimeHistogramTimeseriesBucket instantiates a new RealTimeHistogramTimeseriesBucket 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 + +### NewRealTimeHistogramTimeseriesBucketWithDefaults + +`func NewRealTimeHistogramTimeseriesBucketWithDefaults() *RealTimeHistogramTimeseriesBucket` + +NewRealTimeHistogramTimeseriesBucketWithDefaults instantiates a new RealTimeHistogramTimeseriesBucket 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 + +### GetStart + +`func (o *RealTimeHistogramTimeseriesBucket) GetStart() int64` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *RealTimeHistogramTimeseriesBucket) GetStartOk() (*int64, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *RealTimeHistogramTimeseriesBucket) SetStart(v int64)` + +SetStart sets Start field to given value. + +### HasStart + +`func (o *RealTimeHistogramTimeseriesBucket) HasStart() bool` + +HasStart returns a boolean if a field has been set. + +### GetEnd + +`func (o *RealTimeHistogramTimeseriesBucket) GetEnd() int64` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *RealTimeHistogramTimeseriesBucket) GetEndOk() (*int64, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *RealTimeHistogramTimeseriesBucket) SetEnd(v int64)` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *RealTimeHistogramTimeseriesBucket) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RealTimeHistogramTimeseriesBucketValues.md b/docs/RealTimeHistogramTimeseriesBucketValues.md index 001fc43..a16a1c4 100644 --- a/docs/RealTimeHistogramTimeseriesBucketValues.md +++ b/docs/RealTimeHistogramTimeseriesBucketValues.md @@ -1,10 +1,81 @@ # RealTimeHistogramTimeseriesBucketValues ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Percentage** | **float64** | | [optional] -**Count** | **int64** | | [optional] +**Percentage** | Pointer to **float64** | | [optional] +**Count** | Pointer to **int64** | | [optional] + +## Methods + +### NewRealTimeHistogramTimeseriesBucketValues + +`func NewRealTimeHistogramTimeseriesBucketValues() *RealTimeHistogramTimeseriesBucketValues` + +NewRealTimeHistogramTimeseriesBucketValues instantiates a new RealTimeHistogramTimeseriesBucketValues 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 + +### NewRealTimeHistogramTimeseriesBucketValuesWithDefaults + +`func NewRealTimeHistogramTimeseriesBucketValuesWithDefaults() *RealTimeHistogramTimeseriesBucketValues` + +NewRealTimeHistogramTimeseriesBucketValuesWithDefaults instantiates a new RealTimeHistogramTimeseriesBucketValues 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 + +### GetPercentage + +`func (o *RealTimeHistogramTimeseriesBucketValues) GetPercentage() float64` + +GetPercentage returns the Percentage field if non-nil, zero value otherwise. + +### GetPercentageOk + +`func (o *RealTimeHistogramTimeseriesBucketValues) GetPercentageOk() (*float64, bool)` + +GetPercentageOk returns a tuple with the Percentage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPercentage + +`func (o *RealTimeHistogramTimeseriesBucketValues) SetPercentage(v float64)` + +SetPercentage sets Percentage field to given value. + +### HasPercentage + +`func (o *RealTimeHistogramTimeseriesBucketValues) HasPercentage() bool` + +HasPercentage returns a boolean if a field has been set. + +### GetCount + +`func (o *RealTimeHistogramTimeseriesBucketValues) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *RealTimeHistogramTimeseriesBucketValues) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *RealTimeHistogramTimeseriesBucketValues) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *RealTimeHistogramTimeseriesBucketValues) HasCount() bool` + +HasCount returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RealTimeHistogramTimeseriesDatapoint.md b/docs/RealTimeHistogramTimeseriesDatapoint.md index e7c3f2c..f9be248 100644 --- a/docs/RealTimeHistogramTimeseriesDatapoint.md +++ b/docs/RealTimeHistogramTimeseriesDatapoint.md @@ -1,15 +1,211 @@ # RealTimeHistogramTimeseriesDatapoint ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Timestamp** | **string** | | [optional] -**Sum** | **int64** | | [optional] -**P95** | **float64** | | [optional] -**Median** | **float64** | | [optional] -**MaxPercentage** | **float64** | | [optional] -**BucketValues** | [**[]RealTimeHistogramTimeseriesBucketValues**](RealTimeHistogramTimeseriesBucketValues.md) | | [optional] -**Average** | **float64** | | [optional] +**Timestamp** | Pointer to **string** | | [optional] +**Sum** | Pointer to **int64** | | [optional] +**P95** | Pointer to **float64** | | [optional] +**Median** | Pointer to **float64** | | [optional] +**MaxPercentage** | Pointer to **float64** | | [optional] +**BucketValues** | Pointer to [**[]RealTimeHistogramTimeseriesBucketValues**](RealTimeHistogramTimeseriesBucketValues.md) | | [optional] +**Average** | Pointer to **float64** | | [optional] + +## Methods + +### NewRealTimeHistogramTimeseriesDatapoint + +`func NewRealTimeHistogramTimeseriesDatapoint() *RealTimeHistogramTimeseriesDatapoint` + +NewRealTimeHistogramTimeseriesDatapoint instantiates a new RealTimeHistogramTimeseriesDatapoint 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 + +### NewRealTimeHistogramTimeseriesDatapointWithDefaults + +`func NewRealTimeHistogramTimeseriesDatapointWithDefaults() *RealTimeHistogramTimeseriesDatapoint` + +NewRealTimeHistogramTimeseriesDatapointWithDefaults instantiates a new RealTimeHistogramTimeseriesDatapoint 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 + +### GetTimestamp + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetTimestamp() string` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetTimestampOk() (*string, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetTimestamp(v string)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + +### GetSum + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetSum() int64` + +GetSum returns the Sum field if non-nil, zero value otherwise. + +### GetSumOk + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetSumOk() (*int64, bool)` + +GetSumOk returns a tuple with the Sum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSum + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetSum(v int64)` + +SetSum sets Sum field to given value. + +### HasSum + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasSum() bool` + +HasSum returns a boolean if a field has been set. + +### GetP95 + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetP95() float64` + +GetP95 returns the P95 field if non-nil, zero value otherwise. + +### GetP95Ok + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetP95Ok() (*float64, bool)` + +GetP95Ok returns a tuple with the P95 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetP95 + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetP95(v float64)` + +SetP95 sets P95 field to given value. + +### HasP95 + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasP95() bool` + +HasP95 returns a boolean if a field has been set. + +### GetMedian + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetMedian() float64` + +GetMedian returns the Median field if non-nil, zero value otherwise. + +### GetMedianOk + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetMedianOk() (*float64, bool)` + +GetMedianOk returns a tuple with the Median field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMedian + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetMedian(v float64)` + +SetMedian sets Median field to given value. + +### HasMedian + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasMedian() bool` + +HasMedian returns a boolean if a field has been set. + +### GetMaxPercentage + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetMaxPercentage() float64` + +GetMaxPercentage returns the MaxPercentage field if non-nil, zero value otherwise. + +### GetMaxPercentageOk + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetMaxPercentageOk() (*float64, bool)` + +GetMaxPercentageOk returns a tuple with the MaxPercentage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxPercentage + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetMaxPercentage(v float64)` + +SetMaxPercentage sets MaxPercentage field to given value. + +### HasMaxPercentage + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasMaxPercentage() bool` + +HasMaxPercentage returns a boolean if a field has been set. + +### GetBucketValues + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetBucketValues() []RealTimeHistogramTimeseriesBucketValues` + +GetBucketValues returns the BucketValues field if non-nil, zero value otherwise. + +### GetBucketValuesOk + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetBucketValuesOk() (*[]RealTimeHistogramTimeseriesBucketValues, bool)` + +GetBucketValuesOk returns a tuple with the BucketValues field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketValues + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetBucketValues(v []RealTimeHistogramTimeseriesBucketValues)` + +SetBucketValues sets BucketValues field to given value. + +### HasBucketValues + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasBucketValues() bool` + +HasBucketValues returns a boolean if a field has been set. + +### GetAverage + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetAverage() float64` + +GetAverage returns the Average field if non-nil, zero value otherwise. + +### GetAverageOk + +`func (o *RealTimeHistogramTimeseriesDatapoint) GetAverageOk() (*float64, bool)` + +GetAverageOk returns a tuple with the Average field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAverage + +`func (o *RealTimeHistogramTimeseriesDatapoint) SetAverage(v float64)` + +SetAverage sets Average field to given value. + +### HasAverage + +`func (o *RealTimeHistogramTimeseriesDatapoint) HasAverage() bool` + +HasAverage returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RealTimeTimeseriesDatapoint.md b/docs/RealTimeTimeseriesDatapoint.md index ad000bd..85bcdf9 100644 --- a/docs/RealTimeTimeseriesDatapoint.md +++ b/docs/RealTimeTimeseriesDatapoint.md @@ -1,11 +1,107 @@ # RealTimeTimeseriesDatapoint ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **float64** | | [optional] -**Date** | **string** | | [optional] -**ConcurentViewers** | **int64** | | [optional] +**Value** | Pointer to **float64** | | [optional] +**Date** | Pointer to **string** | | [optional] +**ConcurentViewers** | Pointer to **int64** | | [optional] + +## Methods + +### NewRealTimeTimeseriesDatapoint + +`func NewRealTimeTimeseriesDatapoint() *RealTimeTimeseriesDatapoint` + +NewRealTimeTimeseriesDatapoint instantiates a new RealTimeTimeseriesDatapoint 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 + +### NewRealTimeTimeseriesDatapointWithDefaults + +`func NewRealTimeTimeseriesDatapointWithDefaults() *RealTimeTimeseriesDatapoint` + +NewRealTimeTimeseriesDatapointWithDefaults instantiates a new RealTimeTimeseriesDatapoint 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 + +### GetValue + +`func (o *RealTimeTimeseriesDatapoint) GetValue() float64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *RealTimeTimeseriesDatapoint) GetValueOk() (*float64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *RealTimeTimeseriesDatapoint) SetValue(v float64)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *RealTimeTimeseriesDatapoint) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetDate + +`func (o *RealTimeTimeseriesDatapoint) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *RealTimeTimeseriesDatapoint) GetDateOk() (*string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDate + +`func (o *RealTimeTimeseriesDatapoint) SetDate(v string)` + +SetDate sets Date field to given value. + +### HasDate + +`func (o *RealTimeTimeseriesDatapoint) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### GetConcurentViewers + +`func (o *RealTimeTimeseriesDatapoint) GetConcurentViewers() int64` + +GetConcurentViewers returns the ConcurentViewers field if non-nil, zero value otherwise. + +### GetConcurentViewersOk + +`func (o *RealTimeTimeseriesDatapoint) GetConcurentViewersOk() (*int64, bool)` + +GetConcurentViewersOk returns a tuple with the ConcurentViewers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConcurentViewers + +`func (o *RealTimeTimeseriesDatapoint) SetConcurentViewers(v int64)` + +SetConcurentViewers sets ConcurentViewers field to given value. + +### HasConcurentViewers + +`func (o *RealTimeTimeseriesDatapoint) HasConcurentViewers() bool` + +HasConcurentViewers returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Score.md b/docs/Score.md index ad600d3..beb4f7d 100644 --- a/docs/Score.md +++ b/docs/Score.md @@ -1,14 +1,185 @@ # Score ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**WatchTime** | **int64** | | [optional] -**ViewCount** | **int64** | | [optional] -**Name** | **string** | | [optional] -**Value** | **float64** | | [optional] -**Metric** | **string** | | [optional] -**Items** | [**[]Metric**](Metric.md) | | [optional] +**WatchTime** | Pointer to **int64** | | [optional] +**ViewCount** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Value** | Pointer to **float64** | | [optional] +**Metric** | Pointer to **string** | | [optional] +**Items** | Pointer to [**[]Metric**](Metric.md) | | [optional] + +## Methods + +### NewScore + +`func NewScore() *Score` + +NewScore instantiates a new Score 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 + +### NewScoreWithDefaults + +`func NewScoreWithDefaults() *Score` + +NewScoreWithDefaults instantiates a new Score 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 + +### GetWatchTime + +`func (o *Score) GetWatchTime() int64` + +GetWatchTime returns the WatchTime field if non-nil, zero value otherwise. + +### GetWatchTimeOk + +`func (o *Score) GetWatchTimeOk() (*int64, bool)` + +GetWatchTimeOk returns a tuple with the WatchTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWatchTime + +`func (o *Score) SetWatchTime(v int64)` + +SetWatchTime sets WatchTime field to given value. + +### HasWatchTime + +`func (o *Score) HasWatchTime() bool` + +HasWatchTime returns a boolean if a field has been set. + +### GetViewCount + +`func (o *Score) GetViewCount() int64` + +GetViewCount returns the ViewCount field if non-nil, zero value otherwise. + +### GetViewCountOk + +`func (o *Score) GetViewCountOk() (*int64, bool)` + +GetViewCountOk returns a tuple with the ViewCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewCount + +`func (o *Score) SetViewCount(v int64)` + +SetViewCount sets ViewCount field to given value. + +### HasViewCount + +`func (o *Score) HasViewCount() bool` + +HasViewCount returns a boolean if a field has been set. + +### GetName + +`func (o *Score) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Score) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Score) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Score) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *Score) GetValue() float64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *Score) GetValueOk() (*float64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *Score) SetValue(v float64)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *Score) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetMetric + +`func (o *Score) GetMetric() string` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *Score) GetMetricOk() (*string, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *Score) SetMetric(v string)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *Score) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + +### GetItems + +`func (o *Score) GetItems() []Metric` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *Score) GetItemsOk() (*[]Metric, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *Score) SetItems(v []Metric)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *Score) HasItems() bool` + +HasItems returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SignalLiveStreamCompleteResponse.md b/docs/SignalLiveStreamCompleteResponse.md index 55e24ae..5a962d7 100644 --- a/docs/SignalLiveStreamCompleteResponse.md +++ b/docs/SignalLiveStreamCompleteResponse.md @@ -1,9 +1,55 @@ # SignalLiveStreamCompleteResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**map[string]interface{}**](.md) | | [optional] +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewSignalLiveStreamCompleteResponse + +`func NewSignalLiveStreamCompleteResponse() *SignalLiveStreamCompleteResponse` + +NewSignalLiveStreamCompleteResponse instantiates a new SignalLiveStreamCompleteResponse 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 + +### NewSignalLiveStreamCompleteResponseWithDefaults + +`func NewSignalLiveStreamCompleteResponseWithDefaults() *SignalLiveStreamCompleteResponse` + +NewSignalLiveStreamCompleteResponseWithDefaults instantiates a new SignalLiveStreamCompleteResponse 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 + +### GetData + +`func (o *SignalLiveStreamCompleteResponse) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SignalLiveStreamCompleteResponse) GetDataOk() (*map[string]interface{}, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SignalLiveStreamCompleteResponse) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *SignalLiveStreamCompleteResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SigningKey.md b/docs/SigningKey.md index dfe0679..fadd171 100644 --- a/docs/SigningKey.md +++ b/docs/SigningKey.md @@ -1,11 +1,107 @@ # SigningKey ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**CreatedAt** | **string** | | [optional] -**PrivateKey** | **string** | | [optional] +**Id** | Pointer to **string** | Unique identifier for the Signing Key. | [optional] +**CreatedAt** | Pointer to **string** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] +**PrivateKey** | Pointer to **string** | A Base64 encoded private key that can be used with the RS256 algorithm when creating a [JWT](https://jwt.io/). **Note that this value is only returned once when creating a URL signing key.** | [optional] + +## Methods + +### NewSigningKey + +`func NewSigningKey() *SigningKey` + +NewSigningKey instantiates a new SigningKey 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 + +### NewSigningKeyWithDefaults + +`func NewSigningKeyWithDefaults() *SigningKey` + +NewSigningKeyWithDefaults instantiates a new SigningKey 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 + +### GetId + +`func (o *SigningKey) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SigningKey) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SigningKey) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SigningKey) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *SigningKey) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SigningKey) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *SigningKey) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SigningKey) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetPrivateKey + +`func (o *SigningKey) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *SigningKey) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *SigningKey) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *SigningKey) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SigningKeyResponse.md b/docs/SigningKeyResponse.md index 2945625..917923d 100644 --- a/docs/SigningKeyResponse.md +++ b/docs/SigningKeyResponse.md @@ -1,9 +1,55 @@ # SigningKeyResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**SigningKey**](.md) | | [optional] +**Data** | Pointer to [**SigningKey**](SigningKey.md) | | [optional] + +## Methods + +### NewSigningKeyResponse + +`func NewSigningKeyResponse() *SigningKeyResponse` + +NewSigningKeyResponse instantiates a new SigningKeyResponse 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 + +### NewSigningKeyResponseWithDefaults + +`func NewSigningKeyResponseWithDefaults() *SigningKeyResponse` + +NewSigningKeyResponseWithDefaults instantiates a new SigningKeyResponse 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 + +### GetData + +`func (o *SigningKeyResponse) GetData() SigningKey` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SigningKeyResponse) GetDataOk() (*SigningKey, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SigningKeyResponse) SetData(v SigningKey)` + +SetData sets Data field to given value. + +### HasData + +`func (o *SigningKeyResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SimulcastTarget.md b/docs/SimulcastTarget.md index 48a0045..57b9121 100644 --- a/docs/SimulcastTarget.md +++ b/docs/SimulcastTarget.md @@ -1,13 +1,159 @@ # SimulcastTarget ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | ID of the Simulcast Target | [optional] -**Passthrough** | **string** | Arbitrary Metadata set when creating a simulcast target. | [optional] -**Status** | **string** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. | [optional] -**StreamKey** | **string** | Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. | [optional] -**Url** | **string** | RTMP hostname including the application name for the third party live streaming service. | [optional] +**Id** | Pointer to **string** | ID of the Simulcast Target | [optional] +**Passthrough** | Pointer to **string** | Arbitrary Metadata set when creating a simulcast target. | [optional] +**Status** | Pointer to **string** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. | [optional] +**StreamKey** | Pointer to **string** | Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. | [optional] +**Url** | Pointer to **string** | RTMP hostname including the application name for the third party live streaming service. | [optional] + +## Methods + +### NewSimulcastTarget + +`func NewSimulcastTarget() *SimulcastTarget` + +NewSimulcastTarget instantiates a new SimulcastTarget 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 + +### NewSimulcastTargetWithDefaults + +`func NewSimulcastTargetWithDefaults() *SimulcastTarget` + +NewSimulcastTargetWithDefaults instantiates a new SimulcastTarget 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 + +### GetId + +`func (o *SimulcastTarget) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SimulcastTarget) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SimulcastTarget) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SimulcastTarget) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *SimulcastTarget) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *SimulcastTarget) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *SimulcastTarget) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *SimulcastTarget) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + +### GetStatus + +`func (o *SimulcastTarget) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *SimulcastTarget) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *SimulcastTarget) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *SimulcastTarget) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStreamKey + +`func (o *SimulcastTarget) GetStreamKey() string` + +GetStreamKey returns the StreamKey field if non-nil, zero value otherwise. + +### GetStreamKeyOk + +`func (o *SimulcastTarget) GetStreamKeyOk() (*string, bool)` + +GetStreamKeyOk returns a tuple with the StreamKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamKey + +`func (o *SimulcastTarget) SetStreamKey(v string)` + +SetStreamKey sets StreamKey field to given value. + +### HasStreamKey + +`func (o *SimulcastTarget) HasStreamKey() bool` + +HasStreamKey returns a boolean if a field has been set. + +### GetUrl + +`func (o *SimulcastTarget) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *SimulcastTarget) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *SimulcastTarget) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *SimulcastTarget) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SimulcastTargetResponse.md b/docs/SimulcastTargetResponse.md index e3619d6..543aa9b 100644 --- a/docs/SimulcastTargetResponse.md +++ b/docs/SimulcastTargetResponse.md @@ -1,9 +1,55 @@ # SimulcastTargetResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**SimulcastTarget**](.md) | | [optional] +**Data** | Pointer to [**SimulcastTarget**](SimulcastTarget.md) | | [optional] + +## Methods + +### NewSimulcastTargetResponse + +`func NewSimulcastTargetResponse() *SimulcastTargetResponse` + +NewSimulcastTargetResponse instantiates a new SimulcastTargetResponse 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 + +### NewSimulcastTargetResponseWithDefaults + +`func NewSimulcastTargetResponseWithDefaults() *SimulcastTargetResponse` + +NewSimulcastTargetResponseWithDefaults instantiates a new SimulcastTargetResponse 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 + +### GetData + +`func (o *SimulcastTargetResponse) GetData() SimulcastTarget` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SimulcastTargetResponse) GetDataOk() (*SimulcastTarget, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SimulcastTargetResponse) SetData(v SimulcastTarget)` + +SetData sets Data field to given value. + +### HasData + +`func (o *SimulcastTargetResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Track.md b/docs/Track.md index da6cc10..826673a 100644 --- a/docs/Track.md +++ b/docs/Track.md @@ -1,21 +1,367 @@ # Track ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | Unique identifier for the Track | [optional] -**Type** | **string** | The type of track | [optional] -**Duration** | **float64** | The duration in seconds of the track media. This parameter is not set for the `text` type track. This field is optional and may not be set. The top level `duration` field of an asset will always be set. | [optional] -**MaxWidth** | **int64** | The maximum width in pixels available for the track. Only set for the `video` type track. | [optional] -**MaxHeight** | **int64** | The maximum height in pixels available for the track. Only set for the `video` type track. | [optional] -**MaxFrameRate** | **float64** | The maximum frame rate available for the track. Only set for the `video` type track. This field may return `-1` if the frame rate of the input cannot be reliably determined. | [optional] -**MaxChannels** | **int64** | The maximum number of audio channels the track supports. Only set for the `audio` type track. | [optional] -**MaxChannelLayout** | **string** | Only set for the `audio` type track. | [optional] -**TextType** | **string** | This parameter is set only for the `text` type track. | [optional] -**LanguageCode** | **string** | The language code value represents [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is set for `text` type and `subtitles` text type track. | [optional] -**Name** | **string** | The name of the track containing a human-readable description. The hls manifest will associate a subtitle text track with this value. For example, the value is \"English\" for subtitles text track for the `language_code` value of `en-US`. This parameter is set for the `text` type and `subtitles` text type track. | [optional] -**ClosedCaptions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is set for the `text` type and `subtitles` text type track. | [optional] -**Passthrough** | **string** | Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. | [optional] +**Id** | Pointer to **string** | Unique identifier for the Track | [optional] +**Type** | Pointer to **string** | The type of track | [optional] +**Duration** | Pointer to **float64** | The duration in seconds of the track media. This parameter is not set for the `text` type track. This field is optional and may not be set. The top level `duration` field of an asset will always be set. | [optional] +**MaxWidth** | Pointer to **int64** | The maximum width in pixels available for the track. Only set for the `video` type track. | [optional] +**MaxHeight** | Pointer to **int64** | The maximum height in pixels available for the track. Only set for the `video` type track. | [optional] +**MaxFrameRate** | Pointer to **float64** | The maximum frame rate available for the track. Only set for the `video` type track. This field may return `-1` if the frame rate of the input cannot be reliably determined. | [optional] +**MaxChannels** | Pointer to **int64** | The maximum number of audio channels the track supports. Only set for the `audio` type track. | [optional] +**MaxChannelLayout** | Pointer to **string** | Only set for the `audio` type track. | [optional] +**TextType** | Pointer to **string** | This parameter is set only for the `text` type track. | [optional] +**LanguageCode** | Pointer to **string** | The language code value represents [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is set for `text` type and `subtitles` text type track. | [optional] +**Name** | Pointer to **string** | The name of the track containing a human-readable description. The hls manifest will associate a subtitle text track with this value. For example, the value is \"English\" for subtitles text track for the `language_code` value of `en-US`. This parameter is set for the `text` type and `subtitles` text type track. | [optional] +**ClosedCaptions** | Pointer to **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is set for the `text` type and `subtitles` text type track. | [optional] +**Passthrough** | Pointer to **string** | Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. | [optional] + +## Methods + +### NewTrack + +`func NewTrack() *Track` + +NewTrack instantiates a new Track 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 + +### NewTrackWithDefaults + +`func NewTrackWithDefaults() *Track` + +NewTrackWithDefaults instantiates a new Track 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 + +### GetId + +`func (o *Track) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Track) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Track) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Track) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *Track) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Track) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Track) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Track) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDuration + +`func (o *Track) GetDuration() float64` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *Track) GetDurationOk() (*float64, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *Track) SetDuration(v float64)` + +SetDuration sets Duration field to given value. + +### HasDuration + +`func (o *Track) HasDuration() bool` + +HasDuration returns a boolean if a field has been set. + +### GetMaxWidth + +`func (o *Track) GetMaxWidth() int64` + +GetMaxWidth returns the MaxWidth field if non-nil, zero value otherwise. + +### GetMaxWidthOk + +`func (o *Track) GetMaxWidthOk() (*int64, bool)` + +GetMaxWidthOk returns a tuple with the MaxWidth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxWidth + +`func (o *Track) SetMaxWidth(v int64)` + +SetMaxWidth sets MaxWidth field to given value. + +### HasMaxWidth + +`func (o *Track) HasMaxWidth() bool` + +HasMaxWidth returns a boolean if a field has been set. + +### GetMaxHeight + +`func (o *Track) GetMaxHeight() int64` + +GetMaxHeight returns the MaxHeight field if non-nil, zero value otherwise. + +### GetMaxHeightOk + +`func (o *Track) GetMaxHeightOk() (*int64, bool)` + +GetMaxHeightOk returns a tuple with the MaxHeight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxHeight + +`func (o *Track) SetMaxHeight(v int64)` + +SetMaxHeight sets MaxHeight field to given value. + +### HasMaxHeight + +`func (o *Track) HasMaxHeight() bool` + +HasMaxHeight returns a boolean if a field has been set. + +### GetMaxFrameRate + +`func (o *Track) GetMaxFrameRate() float64` + +GetMaxFrameRate returns the MaxFrameRate field if non-nil, zero value otherwise. + +### GetMaxFrameRateOk + +`func (o *Track) GetMaxFrameRateOk() (*float64, bool)` + +GetMaxFrameRateOk returns a tuple with the MaxFrameRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxFrameRate + +`func (o *Track) SetMaxFrameRate(v float64)` + +SetMaxFrameRate sets MaxFrameRate field to given value. + +### HasMaxFrameRate + +`func (o *Track) HasMaxFrameRate() bool` + +HasMaxFrameRate returns a boolean if a field has been set. + +### GetMaxChannels + +`func (o *Track) GetMaxChannels() int64` + +GetMaxChannels returns the MaxChannels field if non-nil, zero value otherwise. + +### GetMaxChannelsOk + +`func (o *Track) GetMaxChannelsOk() (*int64, bool)` + +GetMaxChannelsOk returns a tuple with the MaxChannels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxChannels + +`func (o *Track) SetMaxChannels(v int64)` + +SetMaxChannels sets MaxChannels field to given value. + +### HasMaxChannels + +`func (o *Track) HasMaxChannels() bool` + +HasMaxChannels returns a boolean if a field has been set. + +### GetMaxChannelLayout + +`func (o *Track) GetMaxChannelLayout() string` + +GetMaxChannelLayout returns the MaxChannelLayout field if non-nil, zero value otherwise. + +### GetMaxChannelLayoutOk + +`func (o *Track) GetMaxChannelLayoutOk() (*string, bool)` + +GetMaxChannelLayoutOk returns a tuple with the MaxChannelLayout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxChannelLayout + +`func (o *Track) SetMaxChannelLayout(v string)` + +SetMaxChannelLayout sets MaxChannelLayout field to given value. + +### HasMaxChannelLayout + +`func (o *Track) HasMaxChannelLayout() bool` + +HasMaxChannelLayout returns a boolean if a field has been set. + +### GetTextType + +`func (o *Track) GetTextType() string` + +GetTextType returns the TextType field if non-nil, zero value otherwise. + +### GetTextTypeOk + +`func (o *Track) GetTextTypeOk() (*string, bool)` + +GetTextTypeOk returns a tuple with the TextType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTextType + +`func (o *Track) SetTextType(v string)` + +SetTextType sets TextType field to given value. + +### HasTextType + +`func (o *Track) HasTextType() bool` + +HasTextType returns a boolean if a field has been set. + +### GetLanguageCode + +`func (o *Track) GetLanguageCode() string` + +GetLanguageCode returns the LanguageCode field if non-nil, zero value otherwise. + +### GetLanguageCodeOk + +`func (o *Track) GetLanguageCodeOk() (*string, bool)` + +GetLanguageCodeOk returns a tuple with the LanguageCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguageCode + +`func (o *Track) SetLanguageCode(v string)` + +SetLanguageCode sets LanguageCode field to given value. + +### HasLanguageCode + +`func (o *Track) HasLanguageCode() bool` + +HasLanguageCode returns a boolean if a field has been set. + +### GetName + +`func (o *Track) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Track) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Track) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Track) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetClosedCaptions + +`func (o *Track) GetClosedCaptions() bool` + +GetClosedCaptions returns the ClosedCaptions field if non-nil, zero value otherwise. + +### GetClosedCaptionsOk + +`func (o *Track) GetClosedCaptionsOk() (*bool, bool)` + +GetClosedCaptionsOk returns a tuple with the ClosedCaptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClosedCaptions + +`func (o *Track) SetClosedCaptions(v bool)` + +SetClosedCaptions sets ClosedCaptions field to given value. + +### HasClosedCaptions + +`func (o *Track) HasClosedCaptions() bool` + +HasClosedCaptions returns a boolean if a field has been set. + +### GetPassthrough + +`func (o *Track) GetPassthrough() string` + +GetPassthrough returns the Passthrough field if non-nil, zero value otherwise. + +### GetPassthroughOk + +`func (o *Track) GetPassthroughOk() (*string, bool)` + +GetPassthroughOk returns a tuple with the Passthrough field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassthrough + +`func (o *Track) SetPassthrough(v string)` + +SetPassthrough sets Passthrough field to given value. + +### HasPassthrough + +`func (o *Track) HasPassthrough() bool` + +HasPassthrough returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/URLSigningKeysApi.md b/docs/URLSigningKeysApi.md index 76b7f62..7c4082d 100644 --- a/docs/URLSigningKeysApi.md +++ b/docs/URLSigningKeysApi.md @@ -10,15 +10,50 @@ Method | HTTP request | Description [**ListUrlSigningKeys**](URLSigningKeysApi.md#ListUrlSigningKeys) | **Get** /video/v1/signing-keys | List URL signing keys -# **CreateUrlSigningKey** -> SigningKeyResponse CreateUrlSigningKey(ctx, ) + +## CreateUrlSigningKey + +> SigningKeyResponse CreateUrlSigningKey(ctx).Execute() + Create a URL signing key -Creates a new signing key pair. When creating a new signing key, the API will generate a 2048-bit RSA key-pair and return the private key and a generated key-id; the public key will be stored at Mux to validate signed tokens. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.URLSigningKeysApi.CreateUrlSigningKey(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `URLSigningKeysApi.CreateUrlSigningKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUrlSigningKey`: SigningKeyResponse + fmt.Fprintf(os.Stdout, "Response from `URLSigningKeysApi.CreateUrlSigningKey`: %v\n", resp) +} +``` + +### Path Parameters + This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUrlSigningKeyRequest struct via the builder pattern + + ### Return type [**SigningKeyResponse**](SigningKeyResponse.md) @@ -29,23 +64,63 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUrlSigningKey -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> DeleteUrlSigningKey(ctx, sIGNINGKEYID).Execute() -# **DeleteUrlSigningKey** -> DeleteUrlSigningKey(ctx, sIGNINGKEYID) Delete a URL signing key -Deletes an existing signing key. Use with caution, as this will invalidate any existing signatures and no URLs can be signed using the key again. -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + sIGNINGKEYID := "sIGNINGKEYID_example" // string | The ID of the signing key. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.URLSigningKeysApi.DeleteUrlSigningKey(context.Background(), sIGNINGKEYID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `URLSigningKeysApi.DeleteUrlSigningKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **sIGNINGKEYID** | **string**| The ID of the signing key. | +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**sIGNINGKEYID** | **string** | The ID of the signing key. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUrlSigningKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -57,23 +132,65 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetUrlSigningKey** -> SigningKeyResponse GetUrlSigningKey(ctx, sIGNINGKEYID) +## GetUrlSigningKey + +> SigningKeyResponse GetUrlSigningKey(ctx, sIGNINGKEYID).Execute() + Retrieve a URL signing key -Retrieves the details of a URL signing key that has previously been created. Supply the unique signing key ID that was returned from your previous request, and Mux will return the corresponding signing key information. **The private key is not returned in this response.** -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + sIGNINGKEYID := "sIGNINGKEYID_example" // string | The ID of the signing key. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.URLSigningKeysApi.GetUrlSigningKey(context.Background(), sIGNINGKEYID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `URLSigningKeysApi.GetUrlSigningKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUrlSigningKey`: SigningKeyResponse + fmt.Fprintf(os.Stdout, "Response from `URLSigningKeysApi.GetUrlSigningKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**sIGNINGKEYID** | **string** | The ID of the signing key. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUrlSigningKeyRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **sIGNINGKEYID** | **string**| The ID of the signing key. | + ### Return type @@ -85,31 +202,63 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUrlSigningKeys -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> ListSigningKeysResponse ListUrlSigningKeys(ctx).Limit(limit).Page(page).Execute() -# **ListUrlSigningKeys** -> ListSigningKeysResponse ListUrlSigningKeys(ctx, optional) List URL signing keys -Returns a list of URL signing keys. -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListUrlSigningKeysOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.URLSigningKeysApi.ListUrlSigningKeys(context.Background()).Limit(limit).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `URLSigningKeysApi.ListUrlSigningKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListUrlSigningKeys`: ListSigningKeysResponse + fmt.Fprintf(os.Stdout, "Response from `URLSigningKeysApi.ListUrlSigningKeys`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUrlSigningKeysRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListUrlSigningKeysOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] ### Return type @@ -121,8 +270,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/docs/UpdateAssetMasterAccessRequest.md b/docs/UpdateAssetMasterAccessRequest.md index 11835da..2bd7d1e 100644 --- a/docs/UpdateAssetMasterAccessRequest.md +++ b/docs/UpdateAssetMasterAccessRequest.md @@ -1,9 +1,55 @@ # UpdateAssetMasterAccessRequest ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MasterAccess** | **string** | Add or remove access to the master version of the video. | [optional] +**MasterAccess** | Pointer to **string** | Add or remove access to the master version of the video. | [optional] + +## Methods + +### NewUpdateAssetMasterAccessRequest + +`func NewUpdateAssetMasterAccessRequest() *UpdateAssetMasterAccessRequest` + +NewUpdateAssetMasterAccessRequest instantiates a new UpdateAssetMasterAccessRequest 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 + +### NewUpdateAssetMasterAccessRequestWithDefaults + +`func NewUpdateAssetMasterAccessRequestWithDefaults() *UpdateAssetMasterAccessRequest` + +NewUpdateAssetMasterAccessRequestWithDefaults instantiates a new UpdateAssetMasterAccessRequest 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 + +### GetMasterAccess + +`func (o *UpdateAssetMasterAccessRequest) GetMasterAccess() string` + +GetMasterAccess returns the MasterAccess field if non-nil, zero value otherwise. + +### GetMasterAccessOk + +`func (o *UpdateAssetMasterAccessRequest) GetMasterAccessOk() (*string, bool)` + +GetMasterAccessOk returns a tuple with the MasterAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMasterAccess + +`func (o *UpdateAssetMasterAccessRequest) SetMasterAccess(v string)` + +SetMasterAccess sets MasterAccess field to given value. + +### HasMasterAccess + +`func (o *UpdateAssetMasterAccessRequest) HasMasterAccess() bool` + +HasMasterAccess returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateAssetMp4SupportRequest.md b/docs/UpdateAssetMp4SupportRequest.md deleted file mode 100644 index bcd18a3..0000000 --- a/docs/UpdateAssetMp4SupportRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateAssetMp4SupportRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Mp4Support** | **string** | String value for the level of mp4 support | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Upload.md b/docs/Upload.md index 5a50743..f86eef9 100644 --- a/docs/Upload.md +++ b/docs/Upload.md @@ -1,17 +1,263 @@ # Upload ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**Timeout** | **int32** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600] -**Status** | **string** | | [optional] -**NewAssetSettings** | [**Asset**](Asset.md) | | [optional] -**AssetId** | **string** | Only set once the upload is in the `asset_created` state. | [optional] -**Error** | [**UploadError**](Upload_error.md) | | [optional] -**CorsOrigin** | **string** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional] -**Url** | **string** | The URL to upload the associated source media to. | [optional] -**Test** | **bool** | | [optional] +**Id** | Pointer to **string** | Unique identifier for the Direct Upload. | [optional] +**Timeout** | Pointer to **int32** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600] +**Status** | Pointer to **string** | | [optional] +**NewAssetSettings** | Pointer to [**Asset**](Asset.md) | | [optional] +**AssetId** | Pointer to **string** | Only set once the upload is in the `asset_created` state. | [optional] +**Error** | Pointer to [**UploadError**](Upload_error.md) | | [optional] +**CorsOrigin** | Pointer to **string** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional] +**Url** | Pointer to **string** | The URL to upload the associated source media to. | [optional] +**Test** | Pointer to **bool** | Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a `test` Asset. | [optional] + +## Methods + +### NewUpload + +`func NewUpload() *Upload` + +NewUpload instantiates a new Upload 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 + +### NewUploadWithDefaults + +`func NewUploadWithDefaults() *Upload` + +NewUploadWithDefaults instantiates a new Upload 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 + +### GetId + +`func (o *Upload) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Upload) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Upload) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Upload) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetTimeout + +`func (o *Upload) GetTimeout() int32` + +GetTimeout returns the Timeout field if non-nil, zero value otherwise. + +### GetTimeoutOk + +`func (o *Upload) GetTimeoutOk() (*int32, bool)` + +GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeout + +`func (o *Upload) SetTimeout(v int32)` + +SetTimeout sets Timeout field to given value. + +### HasTimeout + +`func (o *Upload) HasTimeout() bool` + +HasTimeout returns a boolean if a field has been set. + +### GetStatus + +`func (o *Upload) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Upload) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Upload) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Upload) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetNewAssetSettings + +`func (o *Upload) GetNewAssetSettings() Asset` + +GetNewAssetSettings returns the NewAssetSettings field if non-nil, zero value otherwise. + +### GetNewAssetSettingsOk + +`func (o *Upload) GetNewAssetSettingsOk() (*Asset, bool)` + +GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewAssetSettings + +`func (o *Upload) SetNewAssetSettings(v Asset)` + +SetNewAssetSettings sets NewAssetSettings field to given value. + +### HasNewAssetSettings + +`func (o *Upload) HasNewAssetSettings() bool` + +HasNewAssetSettings returns a boolean if a field has been set. + +### GetAssetId + +`func (o *Upload) GetAssetId() string` + +GetAssetId returns the AssetId field if non-nil, zero value otherwise. + +### GetAssetIdOk + +`func (o *Upload) GetAssetIdOk() (*string, bool)` + +GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetId + +`func (o *Upload) SetAssetId(v string)` + +SetAssetId sets AssetId field to given value. + +### HasAssetId + +`func (o *Upload) HasAssetId() bool` + +HasAssetId returns a boolean if a field has been set. + +### GetError + +`func (o *Upload) GetError() UploadError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *Upload) GetErrorOk() (*UploadError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *Upload) SetError(v UploadError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *Upload) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetCorsOrigin + +`func (o *Upload) GetCorsOrigin() string` + +GetCorsOrigin returns the CorsOrigin field if non-nil, zero value otherwise. + +### GetCorsOriginOk + +`func (o *Upload) GetCorsOriginOk() (*string, bool)` + +GetCorsOriginOk returns a tuple with the CorsOrigin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorsOrigin + +`func (o *Upload) SetCorsOrigin(v string)` + +SetCorsOrigin sets CorsOrigin field to given value. + +### HasCorsOrigin + +`func (o *Upload) HasCorsOrigin() bool` + +HasCorsOrigin returns a boolean if a field has been set. + +### GetUrl + +`func (o *Upload) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *Upload) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *Upload) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *Upload) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetTest + +`func (o *Upload) GetTest() bool` + +GetTest returns the Test field if non-nil, zero value otherwise. + +### GetTestOk + +`func (o *Upload) GetTestOk() (*bool, bool)` + +GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTest + +`func (o *Upload) SetTest(v bool)` + +SetTest sets Test field to given value. + +### HasTest + +`func (o *Upload) HasTest() bool` + +HasTest returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UploadError.md b/docs/UploadError.md index daef238..1605e6e 100644 --- a/docs/UploadError.md +++ b/docs/UploadError.md @@ -1,10 +1,81 @@ # UploadError ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**Message** | **string** | | [optional] +**Type** | Pointer to **string** | Label for the specific error | [optional] +**Message** | Pointer to **string** | Human readable error message | [optional] + +## Methods + +### NewUploadError + +`func NewUploadError() *UploadError` + +NewUploadError instantiates a new UploadError 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 + +### NewUploadErrorWithDefaults + +`func NewUploadErrorWithDefaults() *UploadError` + +NewUploadErrorWithDefaults instantiates a new UploadError 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 + +### GetType + +`func (o *UploadError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UploadError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *UploadError) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UploadError) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetMessage + +`func (o *UploadError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UploadError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UploadError) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *UploadError) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UploadResponse.md b/docs/UploadResponse.md index 999e7e8..7eaafd9 100644 --- a/docs/UploadResponse.md +++ b/docs/UploadResponse.md @@ -1,9 +1,55 @@ # UploadResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**Upload**](.md) | | [optional] +**Data** | Pointer to [**Upload**](Upload.md) | | [optional] + +## Methods + +### NewUploadResponse + +`func NewUploadResponse() *UploadResponse` + +NewUploadResponse instantiates a new UploadResponse 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 + +### NewUploadResponseWithDefaults + +`func NewUploadResponseWithDefaults() *UploadResponse` + +NewUploadResponseWithDefaults instantiates a new UploadResponse 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 + +### GetData + +`func (o *UploadResponse) GetData() Upload` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *UploadResponse) GetDataOk() (*Upload, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *UploadResponse) SetData(v Upload)` + +SetData sets Data field to given value. + +### HasData + +`func (o *UploadResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoView.md b/docs/VideoView.md index cd296b2..e4629b9 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -1,120 +1,2941 @@ # VideoView ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ViewTotalUpscaling** | **string** | | [optional] -**PrerollAdAssetHostname** | **string** | | [optional] -**PlayerSourceDomain** | **string** | | [optional] -**Region** | **string** | | [optional] -**ViewerUserAgent** | **string** | | [optional] -**PrerollRequested** | **bool** | | [optional] -**PageType** | **string** | | [optional] -**StartupScore** | **string** | | [optional] -**ViewSeekDuration** | **int64** | | [optional] -**CountryName** | **string** | | [optional] -**PlayerSourceHeight** | **int32** | | [optional] -**Longitude** | **string** | | [optional] -**BufferingCount** | **int64** | | [optional] -**VideoDuration** | **int64** | | [optional] -**PlayerSourceType** | **string** | | [optional] -**City** | **string** | | [optional] -**ViewId** | **string** | | [optional] -**PlatformDescription** | **string** | | [optional] -**VideoStartupPrerollRequestTime** | **int64** | | [optional] -**ViewerDeviceName** | **string** | | [optional] -**VideoSeries** | **string** | | [optional] -**ViewerApplicationName** | **string** | | [optional] -**UpdatedAt** | **string** | | [optional] -**ViewTotalContentPlaybackTime** | **int64** | | [optional] -**Cdn** | **string** | | [optional] -**PlayerInstanceId** | **string** | | [optional] -**VideoLanguage** | **string** | | [optional] -**PlayerSourceWidth** | **int32** | | [optional] -**PlayerErrorMessage** | **string** | | [optional] -**PlayerMuxPluginVersion** | **string** | | [optional] -**Watched** | **bool** | | [optional] -**PlaybackScore** | **string** | | [optional] -**PageUrl** | **string** | | [optional] -**Metro** | **string** | | [optional] -**ViewMaxRequestLatency** | **int64** | | [optional] -**RequestsForFirstPreroll** | **int64** | | [optional] -**ViewTotalDownscaling** | **string** | | [optional] -**Latitude** | **string** | | [optional] -**PlayerSourceHostName** | **string** | | [optional] -**InsertedAt** | **string** | | [optional] -**ViewEnd** | **string** | | [optional] -**MuxEmbedVersion** | **string** | | [optional] -**PlayerLanguage** | **string** | | [optional] -**PageLoadTime** | **int64** | | [optional] -**ViewerDeviceCategory** | **string** | | [optional] -**VideoStartupPrerollLoadTime** | **int64** | | [optional] -**PlayerVersion** | **string** | | [optional] -**WatchTime** | **int64** | | [optional] -**PlayerSourceStreamType** | **string** | | [optional] -**PrerollAdTagHostname** | **string** | | [optional] -**ViewerDeviceManufacturer** | **string** | | [optional] -**RebufferingScore** | **string** | | [optional] -**ExperimentName** | **string** | | [optional] -**ViewerOsVersion** | **string** | | [optional] -**PlayerPreload** | **bool** | | [optional] -**BufferingDuration** | **int64** | | [optional] -**PlayerViewCount** | **int64** | | [optional] -**PlayerSoftware** | **string** | | [optional] -**PlayerLoadTime** | **int64** | | [optional] -**PlatformSummary** | **string** | | [optional] -**VideoEncodingVariant** | **string** | | [optional] -**PlayerWidth** | **int32** | | [optional] -**ViewSeekCount** | **int64** | | [optional] -**ViewerExperienceScore** | **string** | | [optional] -**ViewErrorId** | **int32** | | [optional] -**VideoVariantName** | **string** | | [optional] -**PrerollPlayed** | **bool** | | [optional] -**ViewerApplicationEngine** | **string** | | [optional] -**ViewerOsArchitecture** | **string** | | [optional] -**PlayerErrorCode** | **string** | | [optional] -**BufferingRate** | **string** | | [optional] -**Events** | [**[]VideoViewEvent**](VideoViewEvent.md) | | [optional] -**PlayerName** | **string** | | [optional] -**ViewStart** | **string** | | [optional] -**ViewAverageRequestThroughput** | **int64** | | [optional] -**VideoProducer** | **string** | | [optional] -**ErrorTypeId** | **int32** | | [optional] -**MuxViewerId** | **string** | | [optional] -**VideoId** | **string** | | [optional] -**ContinentCode** | **string** | | [optional] -**SessionId** | **string** | | [optional] -**ExitBeforeVideoStart** | **bool** | | [optional] -**VideoContentType** | **string** | | [optional] -**ViewerOsFamily** | **string** | | [optional] -**PlayerPoster** | **string** | | [optional] -**ViewAverageRequestLatency** | **int64** | | [optional] -**VideoVariantId** | **string** | | [optional] -**PlayerSourceDuration** | **int64** | | [optional] -**PlayerSourceUrl** | **string** | | [optional] -**MuxApiVersion** | **string** | | [optional] -**VideoTitle** | **string** | | [optional] -**Id** | **string** | | [optional] -**ShortTime** | **string** | | [optional] -**RebufferPercentage** | **string** | | [optional] -**TimeToFirstFrame** | **int64** | | [optional] -**ViewerUserId** | **string** | | [optional] -**VideoStreamType** | **string** | | [optional] -**PlayerStartupTime** | **int64** | | [optional] -**ViewerApplicationVersion** | **string** | | [optional] -**ViewMaxDownscalePercentage** | **string** | | [optional] -**ViewMaxUpscalePercentage** | **string** | | [optional] -**CountryCode** | **string** | | [optional] -**UsedFullscreen** | **bool** | | [optional] -**Isp** | **string** | | [optional] -**PropertyId** | **int64** | | [optional] -**PlayerAutoplay** | **bool** | | [optional] -**PlayerHeight** | **int32** | | [optional] -**Asn** | **int64** | | [optional] -**AsnName** | **string** | | [optional] -**QualityScore** | **string** | | [optional] -**PlayerSoftwareVersion** | **string** | | [optional] -**PlayerMuxPluginName** | **string** | | [optional] +**ViewTotalUpscaling** | Pointer to **string** | | [optional] +**PrerollAdAssetHostname** | Pointer to **string** | | [optional] +**PlayerSourceDomain** | Pointer to **string** | | [optional] +**Region** | Pointer to **string** | | [optional] +**ViewerUserAgent** | Pointer to **string** | | [optional] +**PrerollRequested** | Pointer to **bool** | | [optional] +**PageType** | Pointer to **string** | | [optional] +**StartupScore** | Pointer to **string** | | [optional] +**ViewSeekDuration** | Pointer to **int64** | | [optional] +**CountryName** | Pointer to **string** | | [optional] +**PlayerSourceHeight** | Pointer to **int32** | | [optional] +**Longitude** | Pointer to **string** | | [optional] +**BufferingCount** | Pointer to **int64** | | [optional] +**VideoDuration** | Pointer to **int64** | | [optional] +**PlayerSourceType** | Pointer to **string** | | [optional] +**City** | Pointer to **string** | | [optional] +**ViewId** | Pointer to **string** | | [optional] +**PlatformDescription** | Pointer to **string** | | [optional] +**VideoStartupPrerollRequestTime** | Pointer to **int64** | | [optional] +**ViewerDeviceName** | Pointer to **string** | | [optional] +**VideoSeries** | Pointer to **string** | | [optional] +**ViewerApplicationName** | Pointer to **string** | | [optional] +**UpdatedAt** | Pointer to **string** | | [optional] +**ViewTotalContentPlaybackTime** | Pointer to **int64** | | [optional] +**Cdn** | Pointer to **string** | | [optional] +**PlayerInstanceId** | Pointer to **string** | | [optional] +**VideoLanguage** | Pointer to **string** | | [optional] +**PlayerSourceWidth** | Pointer to **int32** | | [optional] +**PlayerErrorMessage** | Pointer to **string** | | [optional] +**PlayerMuxPluginVersion** | Pointer to **string** | | [optional] +**Watched** | Pointer to **bool** | | [optional] +**PlaybackScore** | Pointer to **string** | | [optional] +**PageUrl** | Pointer to **string** | | [optional] +**Metro** | Pointer to **string** | | [optional] +**ViewMaxRequestLatency** | Pointer to **int64** | | [optional] +**RequestsForFirstPreroll** | Pointer to **int64** | | [optional] +**ViewTotalDownscaling** | Pointer to **string** | | [optional] +**Latitude** | Pointer to **string** | | [optional] +**PlayerSourceHostName** | Pointer to **string** | | [optional] +**InsertedAt** | Pointer to **string** | | [optional] +**ViewEnd** | Pointer to **string** | | [optional] +**MuxEmbedVersion** | Pointer to **string** | | [optional] +**PlayerLanguage** | Pointer to **string** | | [optional] +**PageLoadTime** | Pointer to **int64** | | [optional] +**ViewerDeviceCategory** | Pointer to **string** | | [optional] +**VideoStartupPrerollLoadTime** | Pointer to **int64** | | [optional] +**PlayerVersion** | Pointer to **string** | | [optional] +**WatchTime** | Pointer to **int64** | | [optional] +**PlayerSourceStreamType** | Pointer to **string** | | [optional] +**PrerollAdTagHostname** | Pointer to **string** | | [optional] +**ViewerDeviceManufacturer** | Pointer to **string** | | [optional] +**RebufferingScore** | Pointer to **string** | | [optional] +**ExperimentName** | Pointer to **string** | | [optional] +**ViewerOsVersion** | Pointer to **string** | | [optional] +**PlayerPreload** | Pointer to **bool** | | [optional] +**BufferingDuration** | Pointer to **int64** | | [optional] +**PlayerViewCount** | Pointer to **int64** | | [optional] +**PlayerSoftware** | Pointer to **string** | | [optional] +**PlayerLoadTime** | Pointer to **int64** | | [optional] +**PlatformSummary** | Pointer to **string** | | [optional] +**VideoEncodingVariant** | Pointer to **string** | | [optional] +**PlayerWidth** | Pointer to **int32** | | [optional] +**ViewSeekCount** | Pointer to **int64** | | [optional] +**ViewerExperienceScore** | Pointer to **string** | | [optional] +**ViewErrorId** | Pointer to **int32** | | [optional] +**VideoVariantName** | Pointer to **string** | | [optional] +**PrerollPlayed** | Pointer to **bool** | | [optional] +**ViewerApplicationEngine** | Pointer to **string** | | [optional] +**ViewerOsArchitecture** | Pointer to **string** | | [optional] +**PlayerErrorCode** | Pointer to **string** | | [optional] +**BufferingRate** | Pointer to **string** | | [optional] +**Events** | Pointer to [**[]VideoViewEvent**](VideoViewEvent.md) | | [optional] +**PlayerName** | Pointer to **string** | | [optional] +**ViewStart** | Pointer to **string** | | [optional] +**ViewAverageRequestThroughput** | Pointer to **int64** | | [optional] +**VideoProducer** | Pointer to **string** | | [optional] +**ErrorTypeId** | Pointer to **int32** | | [optional] +**MuxViewerId** | Pointer to **string** | | [optional] +**VideoId** | Pointer to **string** | | [optional] +**ContinentCode** | Pointer to **string** | | [optional] +**SessionId** | Pointer to **string** | | [optional] +**ExitBeforeVideoStart** | Pointer to **bool** | | [optional] +**VideoContentType** | Pointer to **string** | | [optional] +**ViewerOsFamily** | Pointer to **string** | | [optional] +**PlayerPoster** | Pointer to **string** | | [optional] +**ViewAverageRequestLatency** | Pointer to **int64** | | [optional] +**VideoVariantId** | Pointer to **string** | | [optional] +**PlayerSourceDuration** | Pointer to **int64** | | [optional] +**PlayerSourceUrl** | Pointer to **string** | | [optional] +**MuxApiVersion** | Pointer to **string** | | [optional] +**VideoTitle** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] +**ShortTime** | Pointer to **string** | | [optional] +**RebufferPercentage** | Pointer to **string** | | [optional] +**TimeToFirstFrame** | Pointer to **int64** | | [optional] +**ViewerUserId** | Pointer to **string** | | [optional] +**VideoStreamType** | Pointer to **string** | | [optional] +**PlayerStartupTime** | Pointer to **int64** | | [optional] +**ViewerApplicationVersion** | Pointer to **string** | | [optional] +**ViewMaxDownscalePercentage** | Pointer to **string** | | [optional] +**ViewMaxUpscalePercentage** | Pointer to **string** | | [optional] +**CountryCode** | Pointer to **string** | | [optional] +**UsedFullscreen** | Pointer to **bool** | | [optional] +**Isp** | Pointer to **string** | | [optional] +**PropertyId** | Pointer to **int64** | | [optional] +**PlayerAutoplay** | Pointer to **bool** | | [optional] +**PlayerHeight** | Pointer to **int32** | | [optional] +**Asn** | Pointer to **int64** | | [optional] +**AsnName** | Pointer to **string** | | [optional] +**QualityScore** | Pointer to **string** | | [optional] +**PlayerSoftwareVersion** | Pointer to **string** | | [optional] +**PlayerMuxPluginName** | Pointer to **string** | | [optional] + +## Methods + +### NewVideoView + +`func NewVideoView() *VideoView` + +NewVideoView instantiates a new VideoView 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 + +### NewVideoViewWithDefaults + +`func NewVideoViewWithDefaults() *VideoView` + +NewVideoViewWithDefaults instantiates a new VideoView 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 + +### GetViewTotalUpscaling + +`func (o *VideoView) GetViewTotalUpscaling() string` + +GetViewTotalUpscaling returns the ViewTotalUpscaling field if non-nil, zero value otherwise. + +### GetViewTotalUpscalingOk + +`func (o *VideoView) GetViewTotalUpscalingOk() (*string, bool)` + +GetViewTotalUpscalingOk returns a tuple with the ViewTotalUpscaling field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewTotalUpscaling + +`func (o *VideoView) SetViewTotalUpscaling(v string)` + +SetViewTotalUpscaling sets ViewTotalUpscaling field to given value. + +### HasViewTotalUpscaling + +`func (o *VideoView) HasViewTotalUpscaling() bool` + +HasViewTotalUpscaling returns a boolean if a field has been set. + +### GetPrerollAdAssetHostname + +`func (o *VideoView) GetPrerollAdAssetHostname() string` + +GetPrerollAdAssetHostname returns the PrerollAdAssetHostname field if non-nil, zero value otherwise. + +### GetPrerollAdAssetHostnameOk + +`func (o *VideoView) GetPrerollAdAssetHostnameOk() (*string, bool)` + +GetPrerollAdAssetHostnameOk returns a tuple with the PrerollAdAssetHostname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrerollAdAssetHostname + +`func (o *VideoView) SetPrerollAdAssetHostname(v string)` + +SetPrerollAdAssetHostname sets PrerollAdAssetHostname field to given value. + +### HasPrerollAdAssetHostname + +`func (o *VideoView) HasPrerollAdAssetHostname() bool` + +HasPrerollAdAssetHostname returns a boolean if a field has been set. + +### GetPlayerSourceDomain + +`func (o *VideoView) GetPlayerSourceDomain() string` + +GetPlayerSourceDomain returns the PlayerSourceDomain field if non-nil, zero value otherwise. + +### GetPlayerSourceDomainOk + +`func (o *VideoView) GetPlayerSourceDomainOk() (*string, bool)` + +GetPlayerSourceDomainOk returns a tuple with the PlayerSourceDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceDomain + +`func (o *VideoView) SetPlayerSourceDomain(v string)` + +SetPlayerSourceDomain sets PlayerSourceDomain field to given value. + +### HasPlayerSourceDomain + +`func (o *VideoView) HasPlayerSourceDomain() bool` + +HasPlayerSourceDomain returns a boolean if a field has been set. + +### GetRegion + +`func (o *VideoView) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *VideoView) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *VideoView) SetRegion(v string)` + +SetRegion sets Region field to given value. + +### HasRegion + +`func (o *VideoView) HasRegion() bool` + +HasRegion returns a boolean if a field has been set. + +### GetViewerUserAgent + +`func (o *VideoView) GetViewerUserAgent() string` + +GetViewerUserAgent returns the ViewerUserAgent field if non-nil, zero value otherwise. + +### GetViewerUserAgentOk + +`func (o *VideoView) GetViewerUserAgentOk() (*string, bool)` + +GetViewerUserAgentOk returns a tuple with the ViewerUserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerUserAgent + +`func (o *VideoView) SetViewerUserAgent(v string)` + +SetViewerUserAgent sets ViewerUserAgent field to given value. + +### HasViewerUserAgent + +`func (o *VideoView) HasViewerUserAgent() bool` + +HasViewerUserAgent returns a boolean if a field has been set. + +### GetPrerollRequested + +`func (o *VideoView) GetPrerollRequested() bool` + +GetPrerollRequested returns the PrerollRequested field if non-nil, zero value otherwise. + +### GetPrerollRequestedOk + +`func (o *VideoView) GetPrerollRequestedOk() (*bool, bool)` + +GetPrerollRequestedOk returns a tuple with the PrerollRequested field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrerollRequested + +`func (o *VideoView) SetPrerollRequested(v bool)` + +SetPrerollRequested sets PrerollRequested field to given value. + +### HasPrerollRequested + +`func (o *VideoView) HasPrerollRequested() bool` + +HasPrerollRequested returns a boolean if a field has been set. + +### GetPageType + +`func (o *VideoView) GetPageType() string` + +GetPageType returns the PageType field if non-nil, zero value otherwise. + +### GetPageTypeOk + +`func (o *VideoView) GetPageTypeOk() (*string, bool)` + +GetPageTypeOk returns a tuple with the PageType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageType + +`func (o *VideoView) SetPageType(v string)` + +SetPageType sets PageType field to given value. + +### HasPageType + +`func (o *VideoView) HasPageType() bool` + +HasPageType returns a boolean if a field has been set. + +### GetStartupScore + +`func (o *VideoView) GetStartupScore() string` + +GetStartupScore returns the StartupScore field if non-nil, zero value otherwise. + +### GetStartupScoreOk + +`func (o *VideoView) GetStartupScoreOk() (*string, bool)` + +GetStartupScoreOk returns a tuple with the StartupScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartupScore + +`func (o *VideoView) SetStartupScore(v string)` + +SetStartupScore sets StartupScore field to given value. + +### HasStartupScore + +`func (o *VideoView) HasStartupScore() bool` + +HasStartupScore returns a boolean if a field has been set. + +### GetViewSeekDuration + +`func (o *VideoView) GetViewSeekDuration() int64` + +GetViewSeekDuration returns the ViewSeekDuration field if non-nil, zero value otherwise. + +### GetViewSeekDurationOk + +`func (o *VideoView) GetViewSeekDurationOk() (*int64, bool)` + +GetViewSeekDurationOk returns a tuple with the ViewSeekDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewSeekDuration + +`func (o *VideoView) SetViewSeekDuration(v int64)` + +SetViewSeekDuration sets ViewSeekDuration field to given value. + +### HasViewSeekDuration + +`func (o *VideoView) HasViewSeekDuration() bool` + +HasViewSeekDuration returns a boolean if a field has been set. + +### GetCountryName + +`func (o *VideoView) GetCountryName() string` + +GetCountryName returns the CountryName field if non-nil, zero value otherwise. + +### GetCountryNameOk + +`func (o *VideoView) GetCountryNameOk() (*string, bool)` + +GetCountryNameOk returns a tuple with the CountryName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountryName + +`func (o *VideoView) SetCountryName(v string)` + +SetCountryName sets CountryName field to given value. + +### HasCountryName + +`func (o *VideoView) HasCountryName() bool` + +HasCountryName returns a boolean if a field has been set. + +### GetPlayerSourceHeight + +`func (o *VideoView) GetPlayerSourceHeight() int32` + +GetPlayerSourceHeight returns the PlayerSourceHeight field if non-nil, zero value otherwise. + +### GetPlayerSourceHeightOk + +`func (o *VideoView) GetPlayerSourceHeightOk() (*int32, bool)` + +GetPlayerSourceHeightOk returns a tuple with the PlayerSourceHeight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceHeight + +`func (o *VideoView) SetPlayerSourceHeight(v int32)` + +SetPlayerSourceHeight sets PlayerSourceHeight field to given value. + +### HasPlayerSourceHeight + +`func (o *VideoView) HasPlayerSourceHeight() bool` + +HasPlayerSourceHeight returns a boolean if a field has been set. + +### GetLongitude + +`func (o *VideoView) GetLongitude() string` + +GetLongitude returns the Longitude field if non-nil, zero value otherwise. + +### GetLongitudeOk + +`func (o *VideoView) GetLongitudeOk() (*string, bool)` + +GetLongitudeOk returns a tuple with the Longitude field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLongitude + +`func (o *VideoView) SetLongitude(v string)` + +SetLongitude sets Longitude field to given value. + +### HasLongitude + +`func (o *VideoView) HasLongitude() bool` + +HasLongitude returns a boolean if a field has been set. + +### GetBufferingCount + +`func (o *VideoView) GetBufferingCount() int64` + +GetBufferingCount returns the BufferingCount field if non-nil, zero value otherwise. + +### GetBufferingCountOk + +`func (o *VideoView) GetBufferingCountOk() (*int64, bool)` + +GetBufferingCountOk returns a tuple with the BufferingCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBufferingCount + +`func (o *VideoView) SetBufferingCount(v int64)` + +SetBufferingCount sets BufferingCount field to given value. + +### HasBufferingCount + +`func (o *VideoView) HasBufferingCount() bool` + +HasBufferingCount returns a boolean if a field has been set. + +### GetVideoDuration + +`func (o *VideoView) GetVideoDuration() int64` + +GetVideoDuration returns the VideoDuration field if non-nil, zero value otherwise. + +### GetVideoDurationOk + +`func (o *VideoView) GetVideoDurationOk() (*int64, bool)` + +GetVideoDurationOk returns a tuple with the VideoDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoDuration + +`func (o *VideoView) SetVideoDuration(v int64)` + +SetVideoDuration sets VideoDuration field to given value. + +### HasVideoDuration + +`func (o *VideoView) HasVideoDuration() bool` + +HasVideoDuration returns a boolean if a field has been set. + +### GetPlayerSourceType + +`func (o *VideoView) GetPlayerSourceType() string` + +GetPlayerSourceType returns the PlayerSourceType field if non-nil, zero value otherwise. + +### GetPlayerSourceTypeOk + +`func (o *VideoView) GetPlayerSourceTypeOk() (*string, bool)` + +GetPlayerSourceTypeOk returns a tuple with the PlayerSourceType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceType + +`func (o *VideoView) SetPlayerSourceType(v string)` + +SetPlayerSourceType sets PlayerSourceType field to given value. + +### HasPlayerSourceType + +`func (o *VideoView) HasPlayerSourceType() bool` + +HasPlayerSourceType returns a boolean if a field has been set. + +### GetCity + +`func (o *VideoView) GetCity() string` + +GetCity returns the City field if non-nil, zero value otherwise. + +### GetCityOk + +`func (o *VideoView) GetCityOk() (*string, bool)` + +GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCity + +`func (o *VideoView) SetCity(v string)` + +SetCity sets City field to given value. + +### HasCity + +`func (o *VideoView) HasCity() bool` + +HasCity returns a boolean if a field has been set. + +### GetViewId + +`func (o *VideoView) GetViewId() string` + +GetViewId returns the ViewId field if non-nil, zero value otherwise. + +### GetViewIdOk + +`func (o *VideoView) GetViewIdOk() (*string, bool)` + +GetViewIdOk returns a tuple with the ViewId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewId + +`func (o *VideoView) SetViewId(v string)` + +SetViewId sets ViewId field to given value. + +### HasViewId + +`func (o *VideoView) HasViewId() bool` + +HasViewId returns a boolean if a field has been set. + +### GetPlatformDescription + +`func (o *VideoView) GetPlatformDescription() string` + +GetPlatformDescription returns the PlatformDescription field if non-nil, zero value otherwise. + +### GetPlatformDescriptionOk + +`func (o *VideoView) GetPlatformDescriptionOk() (*string, bool)` + +GetPlatformDescriptionOk returns a tuple with the PlatformDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlatformDescription + +`func (o *VideoView) SetPlatformDescription(v string)` + +SetPlatformDescription sets PlatformDescription field to given value. + +### HasPlatformDescription + +`func (o *VideoView) HasPlatformDescription() bool` + +HasPlatformDescription returns a boolean if a field has been set. + +### GetVideoStartupPrerollRequestTime + +`func (o *VideoView) GetVideoStartupPrerollRequestTime() int64` + +GetVideoStartupPrerollRequestTime returns the VideoStartupPrerollRequestTime field if non-nil, zero value otherwise. + +### GetVideoStartupPrerollRequestTimeOk + +`func (o *VideoView) GetVideoStartupPrerollRequestTimeOk() (*int64, bool)` + +GetVideoStartupPrerollRequestTimeOk returns a tuple with the VideoStartupPrerollRequestTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoStartupPrerollRequestTime + +`func (o *VideoView) SetVideoStartupPrerollRequestTime(v int64)` + +SetVideoStartupPrerollRequestTime sets VideoStartupPrerollRequestTime field to given value. + +### HasVideoStartupPrerollRequestTime + +`func (o *VideoView) HasVideoStartupPrerollRequestTime() bool` + +HasVideoStartupPrerollRequestTime returns a boolean if a field has been set. + +### GetViewerDeviceName + +`func (o *VideoView) GetViewerDeviceName() string` + +GetViewerDeviceName returns the ViewerDeviceName field if non-nil, zero value otherwise. + +### GetViewerDeviceNameOk + +`func (o *VideoView) GetViewerDeviceNameOk() (*string, bool)` + +GetViewerDeviceNameOk returns a tuple with the ViewerDeviceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerDeviceName + +`func (o *VideoView) SetViewerDeviceName(v string)` + +SetViewerDeviceName sets ViewerDeviceName field to given value. + +### HasViewerDeviceName + +`func (o *VideoView) HasViewerDeviceName() bool` + +HasViewerDeviceName returns a boolean if a field has been set. + +### GetVideoSeries + +`func (o *VideoView) GetVideoSeries() string` + +GetVideoSeries returns the VideoSeries field if non-nil, zero value otherwise. + +### GetVideoSeriesOk + +`func (o *VideoView) GetVideoSeriesOk() (*string, bool)` + +GetVideoSeriesOk returns a tuple with the VideoSeries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoSeries + +`func (o *VideoView) SetVideoSeries(v string)` + +SetVideoSeries sets VideoSeries field to given value. + +### HasVideoSeries + +`func (o *VideoView) HasVideoSeries() bool` + +HasVideoSeries returns a boolean if a field has been set. + +### GetViewerApplicationName + +`func (o *VideoView) GetViewerApplicationName() string` + +GetViewerApplicationName returns the ViewerApplicationName field if non-nil, zero value otherwise. + +### GetViewerApplicationNameOk + +`func (o *VideoView) GetViewerApplicationNameOk() (*string, bool)` + +GetViewerApplicationNameOk returns a tuple with the ViewerApplicationName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerApplicationName + +`func (o *VideoView) SetViewerApplicationName(v string)` + +SetViewerApplicationName sets ViewerApplicationName field to given value. + +### HasViewerApplicationName + +`func (o *VideoView) HasViewerApplicationName() bool` + +HasViewerApplicationName returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *VideoView) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *VideoView) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *VideoView) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *VideoView) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetViewTotalContentPlaybackTime + +`func (o *VideoView) GetViewTotalContentPlaybackTime() int64` + +GetViewTotalContentPlaybackTime returns the ViewTotalContentPlaybackTime field if non-nil, zero value otherwise. + +### GetViewTotalContentPlaybackTimeOk + +`func (o *VideoView) GetViewTotalContentPlaybackTimeOk() (*int64, bool)` + +GetViewTotalContentPlaybackTimeOk returns a tuple with the ViewTotalContentPlaybackTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewTotalContentPlaybackTime + +`func (o *VideoView) SetViewTotalContentPlaybackTime(v int64)` + +SetViewTotalContentPlaybackTime sets ViewTotalContentPlaybackTime field to given value. + +### HasViewTotalContentPlaybackTime + +`func (o *VideoView) HasViewTotalContentPlaybackTime() bool` + +HasViewTotalContentPlaybackTime returns a boolean if a field has been set. + +### GetCdn + +`func (o *VideoView) GetCdn() string` + +GetCdn returns the Cdn field if non-nil, zero value otherwise. + +### GetCdnOk + +`func (o *VideoView) GetCdnOk() (*string, bool)` + +GetCdnOk returns a tuple with the Cdn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCdn + +`func (o *VideoView) SetCdn(v string)` + +SetCdn sets Cdn field to given value. + +### HasCdn + +`func (o *VideoView) HasCdn() bool` + +HasCdn returns a boolean if a field has been set. + +### GetPlayerInstanceId + +`func (o *VideoView) GetPlayerInstanceId() string` + +GetPlayerInstanceId returns the PlayerInstanceId field if non-nil, zero value otherwise. + +### GetPlayerInstanceIdOk + +`func (o *VideoView) GetPlayerInstanceIdOk() (*string, bool)` + +GetPlayerInstanceIdOk returns a tuple with the PlayerInstanceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerInstanceId + +`func (o *VideoView) SetPlayerInstanceId(v string)` + +SetPlayerInstanceId sets PlayerInstanceId field to given value. + +### HasPlayerInstanceId + +`func (o *VideoView) HasPlayerInstanceId() bool` + +HasPlayerInstanceId returns a boolean if a field has been set. + +### GetVideoLanguage + +`func (o *VideoView) GetVideoLanguage() string` + +GetVideoLanguage returns the VideoLanguage field if non-nil, zero value otherwise. + +### GetVideoLanguageOk + +`func (o *VideoView) GetVideoLanguageOk() (*string, bool)` + +GetVideoLanguageOk returns a tuple with the VideoLanguage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoLanguage + +`func (o *VideoView) SetVideoLanguage(v string)` + +SetVideoLanguage sets VideoLanguage field to given value. + +### HasVideoLanguage + +`func (o *VideoView) HasVideoLanguage() bool` + +HasVideoLanguage returns a boolean if a field has been set. + +### GetPlayerSourceWidth + +`func (o *VideoView) GetPlayerSourceWidth() int32` + +GetPlayerSourceWidth returns the PlayerSourceWidth field if non-nil, zero value otherwise. + +### GetPlayerSourceWidthOk + +`func (o *VideoView) GetPlayerSourceWidthOk() (*int32, bool)` + +GetPlayerSourceWidthOk returns a tuple with the PlayerSourceWidth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceWidth + +`func (o *VideoView) SetPlayerSourceWidth(v int32)` + +SetPlayerSourceWidth sets PlayerSourceWidth field to given value. + +### HasPlayerSourceWidth + +`func (o *VideoView) HasPlayerSourceWidth() bool` + +HasPlayerSourceWidth returns a boolean if a field has been set. + +### GetPlayerErrorMessage + +`func (o *VideoView) GetPlayerErrorMessage() string` + +GetPlayerErrorMessage returns the PlayerErrorMessage field if non-nil, zero value otherwise. + +### GetPlayerErrorMessageOk + +`func (o *VideoView) GetPlayerErrorMessageOk() (*string, bool)` + +GetPlayerErrorMessageOk returns a tuple with the PlayerErrorMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerErrorMessage + +`func (o *VideoView) SetPlayerErrorMessage(v string)` + +SetPlayerErrorMessage sets PlayerErrorMessage field to given value. + +### HasPlayerErrorMessage + +`func (o *VideoView) HasPlayerErrorMessage() bool` + +HasPlayerErrorMessage returns a boolean if a field has been set. + +### GetPlayerMuxPluginVersion + +`func (o *VideoView) GetPlayerMuxPluginVersion() string` + +GetPlayerMuxPluginVersion returns the PlayerMuxPluginVersion field if non-nil, zero value otherwise. + +### GetPlayerMuxPluginVersionOk + +`func (o *VideoView) GetPlayerMuxPluginVersionOk() (*string, bool)` + +GetPlayerMuxPluginVersionOk returns a tuple with the PlayerMuxPluginVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerMuxPluginVersion + +`func (o *VideoView) SetPlayerMuxPluginVersion(v string)` + +SetPlayerMuxPluginVersion sets PlayerMuxPluginVersion field to given value. + +### HasPlayerMuxPluginVersion + +`func (o *VideoView) HasPlayerMuxPluginVersion() bool` + +HasPlayerMuxPluginVersion returns a boolean if a field has been set. + +### GetWatched + +`func (o *VideoView) GetWatched() bool` + +GetWatched returns the Watched field if non-nil, zero value otherwise. + +### GetWatchedOk + +`func (o *VideoView) GetWatchedOk() (*bool, bool)` + +GetWatchedOk returns a tuple with the Watched field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWatched + +`func (o *VideoView) SetWatched(v bool)` + +SetWatched sets Watched field to given value. + +### HasWatched + +`func (o *VideoView) HasWatched() bool` + +HasWatched returns a boolean if a field has been set. + +### GetPlaybackScore + +`func (o *VideoView) GetPlaybackScore() string` + +GetPlaybackScore returns the PlaybackScore field if non-nil, zero value otherwise. + +### GetPlaybackScoreOk + +`func (o *VideoView) GetPlaybackScoreOk() (*string, bool)` + +GetPlaybackScoreOk returns a tuple with the PlaybackScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaybackScore + +`func (o *VideoView) SetPlaybackScore(v string)` + +SetPlaybackScore sets PlaybackScore field to given value. + +### HasPlaybackScore + +`func (o *VideoView) HasPlaybackScore() bool` + +HasPlaybackScore returns a boolean if a field has been set. + +### GetPageUrl + +`func (o *VideoView) GetPageUrl() string` + +GetPageUrl returns the PageUrl field if non-nil, zero value otherwise. + +### GetPageUrlOk + +`func (o *VideoView) GetPageUrlOk() (*string, bool)` + +GetPageUrlOk returns a tuple with the PageUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageUrl + +`func (o *VideoView) SetPageUrl(v string)` + +SetPageUrl sets PageUrl field to given value. + +### HasPageUrl + +`func (o *VideoView) HasPageUrl() bool` + +HasPageUrl returns a boolean if a field has been set. + +### GetMetro + +`func (o *VideoView) GetMetro() string` + +GetMetro returns the Metro field if non-nil, zero value otherwise. + +### GetMetroOk + +`func (o *VideoView) GetMetroOk() (*string, bool)` + +GetMetroOk returns a tuple with the Metro field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetro + +`func (o *VideoView) SetMetro(v string)` + +SetMetro sets Metro field to given value. + +### HasMetro + +`func (o *VideoView) HasMetro() bool` + +HasMetro returns a boolean if a field has been set. + +### GetViewMaxRequestLatency + +`func (o *VideoView) GetViewMaxRequestLatency() int64` + +GetViewMaxRequestLatency returns the ViewMaxRequestLatency field if non-nil, zero value otherwise. + +### GetViewMaxRequestLatencyOk + +`func (o *VideoView) GetViewMaxRequestLatencyOk() (*int64, bool)` + +GetViewMaxRequestLatencyOk returns a tuple with the ViewMaxRequestLatency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewMaxRequestLatency + +`func (o *VideoView) SetViewMaxRequestLatency(v int64)` + +SetViewMaxRequestLatency sets ViewMaxRequestLatency field to given value. + +### HasViewMaxRequestLatency + +`func (o *VideoView) HasViewMaxRequestLatency() bool` + +HasViewMaxRequestLatency returns a boolean if a field has been set. + +### GetRequestsForFirstPreroll + +`func (o *VideoView) GetRequestsForFirstPreroll() int64` + +GetRequestsForFirstPreroll returns the RequestsForFirstPreroll field if non-nil, zero value otherwise. + +### GetRequestsForFirstPrerollOk + +`func (o *VideoView) GetRequestsForFirstPrerollOk() (*int64, bool)` + +GetRequestsForFirstPrerollOk returns a tuple with the RequestsForFirstPreroll field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestsForFirstPreroll + +`func (o *VideoView) SetRequestsForFirstPreroll(v int64)` + +SetRequestsForFirstPreroll sets RequestsForFirstPreroll field to given value. + +### HasRequestsForFirstPreroll + +`func (o *VideoView) HasRequestsForFirstPreroll() bool` + +HasRequestsForFirstPreroll returns a boolean if a field has been set. + +### GetViewTotalDownscaling + +`func (o *VideoView) GetViewTotalDownscaling() string` + +GetViewTotalDownscaling returns the ViewTotalDownscaling field if non-nil, zero value otherwise. + +### GetViewTotalDownscalingOk + +`func (o *VideoView) GetViewTotalDownscalingOk() (*string, bool)` + +GetViewTotalDownscalingOk returns a tuple with the ViewTotalDownscaling field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewTotalDownscaling + +`func (o *VideoView) SetViewTotalDownscaling(v string)` + +SetViewTotalDownscaling sets ViewTotalDownscaling field to given value. + +### HasViewTotalDownscaling + +`func (o *VideoView) HasViewTotalDownscaling() bool` + +HasViewTotalDownscaling returns a boolean if a field has been set. + +### GetLatitude + +`func (o *VideoView) GetLatitude() string` + +GetLatitude returns the Latitude field if non-nil, zero value otherwise. + +### GetLatitudeOk + +`func (o *VideoView) GetLatitudeOk() (*string, bool)` + +GetLatitudeOk returns a tuple with the Latitude field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLatitude + +`func (o *VideoView) SetLatitude(v string)` + +SetLatitude sets Latitude field to given value. + +### HasLatitude + +`func (o *VideoView) HasLatitude() bool` + +HasLatitude returns a boolean if a field has been set. + +### GetPlayerSourceHostName + +`func (o *VideoView) GetPlayerSourceHostName() string` + +GetPlayerSourceHostName returns the PlayerSourceHostName field if non-nil, zero value otherwise. + +### GetPlayerSourceHostNameOk + +`func (o *VideoView) GetPlayerSourceHostNameOk() (*string, bool)` + +GetPlayerSourceHostNameOk returns a tuple with the PlayerSourceHostName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceHostName + +`func (o *VideoView) SetPlayerSourceHostName(v string)` + +SetPlayerSourceHostName sets PlayerSourceHostName field to given value. + +### HasPlayerSourceHostName + +`func (o *VideoView) HasPlayerSourceHostName() bool` + +HasPlayerSourceHostName returns a boolean if a field has been set. + +### GetInsertedAt + +`func (o *VideoView) GetInsertedAt() string` + +GetInsertedAt returns the InsertedAt field if non-nil, zero value otherwise. + +### GetInsertedAtOk + +`func (o *VideoView) GetInsertedAtOk() (*string, bool)` + +GetInsertedAtOk returns a tuple with the InsertedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsertedAt + +`func (o *VideoView) SetInsertedAt(v string)` + +SetInsertedAt sets InsertedAt field to given value. + +### HasInsertedAt + +`func (o *VideoView) HasInsertedAt() bool` + +HasInsertedAt returns a boolean if a field has been set. + +### GetViewEnd + +`func (o *VideoView) GetViewEnd() string` + +GetViewEnd returns the ViewEnd field if non-nil, zero value otherwise. + +### GetViewEndOk + +`func (o *VideoView) GetViewEndOk() (*string, bool)` + +GetViewEndOk returns a tuple with the ViewEnd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewEnd + +`func (o *VideoView) SetViewEnd(v string)` + +SetViewEnd sets ViewEnd field to given value. + +### HasViewEnd + +`func (o *VideoView) HasViewEnd() bool` + +HasViewEnd returns a boolean if a field has been set. + +### GetMuxEmbedVersion + +`func (o *VideoView) GetMuxEmbedVersion() string` + +GetMuxEmbedVersion returns the MuxEmbedVersion field if non-nil, zero value otherwise. + +### GetMuxEmbedVersionOk + +`func (o *VideoView) GetMuxEmbedVersionOk() (*string, bool)` + +GetMuxEmbedVersionOk returns a tuple with the MuxEmbedVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMuxEmbedVersion + +`func (o *VideoView) SetMuxEmbedVersion(v string)` + +SetMuxEmbedVersion sets MuxEmbedVersion field to given value. + +### HasMuxEmbedVersion + +`func (o *VideoView) HasMuxEmbedVersion() bool` + +HasMuxEmbedVersion returns a boolean if a field has been set. + +### GetPlayerLanguage + +`func (o *VideoView) GetPlayerLanguage() string` + +GetPlayerLanguage returns the PlayerLanguage field if non-nil, zero value otherwise. + +### GetPlayerLanguageOk + +`func (o *VideoView) GetPlayerLanguageOk() (*string, bool)` + +GetPlayerLanguageOk returns a tuple with the PlayerLanguage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerLanguage + +`func (o *VideoView) SetPlayerLanguage(v string)` + +SetPlayerLanguage sets PlayerLanguage field to given value. + +### HasPlayerLanguage + +`func (o *VideoView) HasPlayerLanguage() bool` + +HasPlayerLanguage returns a boolean if a field has been set. + +### GetPageLoadTime + +`func (o *VideoView) GetPageLoadTime() int64` + +GetPageLoadTime returns the PageLoadTime field if non-nil, zero value otherwise. + +### GetPageLoadTimeOk + +`func (o *VideoView) GetPageLoadTimeOk() (*int64, bool)` + +GetPageLoadTimeOk returns a tuple with the PageLoadTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageLoadTime + +`func (o *VideoView) SetPageLoadTime(v int64)` + +SetPageLoadTime sets PageLoadTime field to given value. + +### HasPageLoadTime + +`func (o *VideoView) HasPageLoadTime() bool` + +HasPageLoadTime returns a boolean if a field has been set. + +### GetViewerDeviceCategory + +`func (o *VideoView) GetViewerDeviceCategory() string` + +GetViewerDeviceCategory returns the ViewerDeviceCategory field if non-nil, zero value otherwise. + +### GetViewerDeviceCategoryOk + +`func (o *VideoView) GetViewerDeviceCategoryOk() (*string, bool)` + +GetViewerDeviceCategoryOk returns a tuple with the ViewerDeviceCategory field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerDeviceCategory + +`func (o *VideoView) SetViewerDeviceCategory(v string)` + +SetViewerDeviceCategory sets ViewerDeviceCategory field to given value. + +### HasViewerDeviceCategory + +`func (o *VideoView) HasViewerDeviceCategory() bool` + +HasViewerDeviceCategory returns a boolean if a field has been set. + +### GetVideoStartupPrerollLoadTime + +`func (o *VideoView) GetVideoStartupPrerollLoadTime() int64` + +GetVideoStartupPrerollLoadTime returns the VideoStartupPrerollLoadTime field if non-nil, zero value otherwise. + +### GetVideoStartupPrerollLoadTimeOk + +`func (o *VideoView) GetVideoStartupPrerollLoadTimeOk() (*int64, bool)` + +GetVideoStartupPrerollLoadTimeOk returns a tuple with the VideoStartupPrerollLoadTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoStartupPrerollLoadTime + +`func (o *VideoView) SetVideoStartupPrerollLoadTime(v int64)` + +SetVideoStartupPrerollLoadTime sets VideoStartupPrerollLoadTime field to given value. + +### HasVideoStartupPrerollLoadTime + +`func (o *VideoView) HasVideoStartupPrerollLoadTime() bool` + +HasVideoStartupPrerollLoadTime returns a boolean if a field has been set. + +### GetPlayerVersion + +`func (o *VideoView) GetPlayerVersion() string` + +GetPlayerVersion returns the PlayerVersion field if non-nil, zero value otherwise. + +### GetPlayerVersionOk + +`func (o *VideoView) GetPlayerVersionOk() (*string, bool)` + +GetPlayerVersionOk returns a tuple with the PlayerVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerVersion + +`func (o *VideoView) SetPlayerVersion(v string)` + +SetPlayerVersion sets PlayerVersion field to given value. + +### HasPlayerVersion + +`func (o *VideoView) HasPlayerVersion() bool` + +HasPlayerVersion returns a boolean if a field has been set. + +### GetWatchTime + +`func (o *VideoView) GetWatchTime() int64` + +GetWatchTime returns the WatchTime field if non-nil, zero value otherwise. + +### GetWatchTimeOk + +`func (o *VideoView) GetWatchTimeOk() (*int64, bool)` + +GetWatchTimeOk returns a tuple with the WatchTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWatchTime + +`func (o *VideoView) SetWatchTime(v int64)` + +SetWatchTime sets WatchTime field to given value. + +### HasWatchTime + +`func (o *VideoView) HasWatchTime() bool` + +HasWatchTime returns a boolean if a field has been set. + +### GetPlayerSourceStreamType + +`func (o *VideoView) GetPlayerSourceStreamType() string` + +GetPlayerSourceStreamType returns the PlayerSourceStreamType field if non-nil, zero value otherwise. + +### GetPlayerSourceStreamTypeOk + +`func (o *VideoView) GetPlayerSourceStreamTypeOk() (*string, bool)` + +GetPlayerSourceStreamTypeOk returns a tuple with the PlayerSourceStreamType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceStreamType + +`func (o *VideoView) SetPlayerSourceStreamType(v string)` + +SetPlayerSourceStreamType sets PlayerSourceStreamType field to given value. + +### HasPlayerSourceStreamType + +`func (o *VideoView) HasPlayerSourceStreamType() bool` + +HasPlayerSourceStreamType returns a boolean if a field has been set. + +### GetPrerollAdTagHostname + +`func (o *VideoView) GetPrerollAdTagHostname() string` + +GetPrerollAdTagHostname returns the PrerollAdTagHostname field if non-nil, zero value otherwise. + +### GetPrerollAdTagHostnameOk + +`func (o *VideoView) GetPrerollAdTagHostnameOk() (*string, bool)` + +GetPrerollAdTagHostnameOk returns a tuple with the PrerollAdTagHostname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrerollAdTagHostname + +`func (o *VideoView) SetPrerollAdTagHostname(v string)` + +SetPrerollAdTagHostname sets PrerollAdTagHostname field to given value. + +### HasPrerollAdTagHostname + +`func (o *VideoView) HasPrerollAdTagHostname() bool` + +HasPrerollAdTagHostname returns a boolean if a field has been set. + +### GetViewerDeviceManufacturer + +`func (o *VideoView) GetViewerDeviceManufacturer() string` + +GetViewerDeviceManufacturer returns the ViewerDeviceManufacturer field if non-nil, zero value otherwise. + +### GetViewerDeviceManufacturerOk + +`func (o *VideoView) GetViewerDeviceManufacturerOk() (*string, bool)` + +GetViewerDeviceManufacturerOk returns a tuple with the ViewerDeviceManufacturer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerDeviceManufacturer + +`func (o *VideoView) SetViewerDeviceManufacturer(v string)` + +SetViewerDeviceManufacturer sets ViewerDeviceManufacturer field to given value. + +### HasViewerDeviceManufacturer + +`func (o *VideoView) HasViewerDeviceManufacturer() bool` + +HasViewerDeviceManufacturer returns a boolean if a field has been set. + +### GetRebufferingScore + +`func (o *VideoView) GetRebufferingScore() string` + +GetRebufferingScore returns the RebufferingScore field if non-nil, zero value otherwise. + +### GetRebufferingScoreOk + +`func (o *VideoView) GetRebufferingScoreOk() (*string, bool)` + +GetRebufferingScoreOk returns a tuple with the RebufferingScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRebufferingScore + +`func (o *VideoView) SetRebufferingScore(v string)` + +SetRebufferingScore sets RebufferingScore field to given value. + +### HasRebufferingScore + +`func (o *VideoView) HasRebufferingScore() bool` + +HasRebufferingScore returns a boolean if a field has been set. + +### GetExperimentName + +`func (o *VideoView) GetExperimentName() string` + +GetExperimentName returns the ExperimentName field if non-nil, zero value otherwise. + +### GetExperimentNameOk + +`func (o *VideoView) GetExperimentNameOk() (*string, bool)` + +GetExperimentNameOk returns a tuple with the ExperimentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExperimentName + +`func (o *VideoView) SetExperimentName(v string)` + +SetExperimentName sets ExperimentName field to given value. + +### HasExperimentName + +`func (o *VideoView) HasExperimentName() bool` + +HasExperimentName returns a boolean if a field has been set. + +### GetViewerOsVersion + +`func (o *VideoView) GetViewerOsVersion() string` + +GetViewerOsVersion returns the ViewerOsVersion field if non-nil, zero value otherwise. + +### GetViewerOsVersionOk + +`func (o *VideoView) GetViewerOsVersionOk() (*string, bool)` + +GetViewerOsVersionOk returns a tuple with the ViewerOsVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerOsVersion + +`func (o *VideoView) SetViewerOsVersion(v string)` + +SetViewerOsVersion sets ViewerOsVersion field to given value. + +### HasViewerOsVersion + +`func (o *VideoView) HasViewerOsVersion() bool` + +HasViewerOsVersion returns a boolean if a field has been set. + +### GetPlayerPreload + +`func (o *VideoView) GetPlayerPreload() bool` + +GetPlayerPreload returns the PlayerPreload field if non-nil, zero value otherwise. + +### GetPlayerPreloadOk + +`func (o *VideoView) GetPlayerPreloadOk() (*bool, bool)` + +GetPlayerPreloadOk returns a tuple with the PlayerPreload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerPreload + +`func (o *VideoView) SetPlayerPreload(v bool)` + +SetPlayerPreload sets PlayerPreload field to given value. + +### HasPlayerPreload + +`func (o *VideoView) HasPlayerPreload() bool` + +HasPlayerPreload returns a boolean if a field has been set. + +### GetBufferingDuration + +`func (o *VideoView) GetBufferingDuration() int64` + +GetBufferingDuration returns the BufferingDuration field if non-nil, zero value otherwise. + +### GetBufferingDurationOk + +`func (o *VideoView) GetBufferingDurationOk() (*int64, bool)` + +GetBufferingDurationOk returns a tuple with the BufferingDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBufferingDuration + +`func (o *VideoView) SetBufferingDuration(v int64)` + +SetBufferingDuration sets BufferingDuration field to given value. + +### HasBufferingDuration + +`func (o *VideoView) HasBufferingDuration() bool` + +HasBufferingDuration returns a boolean if a field has been set. + +### GetPlayerViewCount + +`func (o *VideoView) GetPlayerViewCount() int64` + +GetPlayerViewCount returns the PlayerViewCount field if non-nil, zero value otherwise. + +### GetPlayerViewCountOk + +`func (o *VideoView) GetPlayerViewCountOk() (*int64, bool)` + +GetPlayerViewCountOk returns a tuple with the PlayerViewCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerViewCount + +`func (o *VideoView) SetPlayerViewCount(v int64)` + +SetPlayerViewCount sets PlayerViewCount field to given value. + +### HasPlayerViewCount + +`func (o *VideoView) HasPlayerViewCount() bool` + +HasPlayerViewCount returns a boolean if a field has been set. + +### GetPlayerSoftware + +`func (o *VideoView) GetPlayerSoftware() string` + +GetPlayerSoftware returns the PlayerSoftware field if non-nil, zero value otherwise. + +### GetPlayerSoftwareOk + +`func (o *VideoView) GetPlayerSoftwareOk() (*string, bool)` + +GetPlayerSoftwareOk returns a tuple with the PlayerSoftware field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSoftware + +`func (o *VideoView) SetPlayerSoftware(v string)` + +SetPlayerSoftware sets PlayerSoftware field to given value. + +### HasPlayerSoftware + +`func (o *VideoView) HasPlayerSoftware() bool` + +HasPlayerSoftware returns a boolean if a field has been set. + +### GetPlayerLoadTime + +`func (o *VideoView) GetPlayerLoadTime() int64` + +GetPlayerLoadTime returns the PlayerLoadTime field if non-nil, zero value otherwise. + +### GetPlayerLoadTimeOk + +`func (o *VideoView) GetPlayerLoadTimeOk() (*int64, bool)` + +GetPlayerLoadTimeOk returns a tuple with the PlayerLoadTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerLoadTime + +`func (o *VideoView) SetPlayerLoadTime(v int64)` + +SetPlayerLoadTime sets PlayerLoadTime field to given value. + +### HasPlayerLoadTime + +`func (o *VideoView) HasPlayerLoadTime() bool` + +HasPlayerLoadTime returns a boolean if a field has been set. + +### GetPlatformSummary + +`func (o *VideoView) GetPlatformSummary() string` + +GetPlatformSummary returns the PlatformSummary field if non-nil, zero value otherwise. + +### GetPlatformSummaryOk + +`func (o *VideoView) GetPlatformSummaryOk() (*string, bool)` + +GetPlatformSummaryOk returns a tuple with the PlatformSummary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlatformSummary + +`func (o *VideoView) SetPlatformSummary(v string)` + +SetPlatformSummary sets PlatformSummary field to given value. + +### HasPlatformSummary + +`func (o *VideoView) HasPlatformSummary() bool` + +HasPlatformSummary returns a boolean if a field has been set. + +### GetVideoEncodingVariant + +`func (o *VideoView) GetVideoEncodingVariant() string` + +GetVideoEncodingVariant returns the VideoEncodingVariant field if non-nil, zero value otherwise. + +### GetVideoEncodingVariantOk + +`func (o *VideoView) GetVideoEncodingVariantOk() (*string, bool)` + +GetVideoEncodingVariantOk returns a tuple with the VideoEncodingVariant field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoEncodingVariant + +`func (o *VideoView) SetVideoEncodingVariant(v string)` + +SetVideoEncodingVariant sets VideoEncodingVariant field to given value. + +### HasVideoEncodingVariant + +`func (o *VideoView) HasVideoEncodingVariant() bool` + +HasVideoEncodingVariant returns a boolean if a field has been set. + +### GetPlayerWidth + +`func (o *VideoView) GetPlayerWidth() int32` + +GetPlayerWidth returns the PlayerWidth field if non-nil, zero value otherwise. + +### GetPlayerWidthOk + +`func (o *VideoView) GetPlayerWidthOk() (*int32, bool)` + +GetPlayerWidthOk returns a tuple with the PlayerWidth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerWidth + +`func (o *VideoView) SetPlayerWidth(v int32)` + +SetPlayerWidth sets PlayerWidth field to given value. + +### HasPlayerWidth + +`func (o *VideoView) HasPlayerWidth() bool` + +HasPlayerWidth returns a boolean if a field has been set. + +### GetViewSeekCount + +`func (o *VideoView) GetViewSeekCount() int64` + +GetViewSeekCount returns the ViewSeekCount field if non-nil, zero value otherwise. + +### GetViewSeekCountOk + +`func (o *VideoView) GetViewSeekCountOk() (*int64, bool)` + +GetViewSeekCountOk returns a tuple with the ViewSeekCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewSeekCount + +`func (o *VideoView) SetViewSeekCount(v int64)` + +SetViewSeekCount sets ViewSeekCount field to given value. + +### HasViewSeekCount + +`func (o *VideoView) HasViewSeekCount() bool` + +HasViewSeekCount returns a boolean if a field has been set. + +### GetViewerExperienceScore + +`func (o *VideoView) GetViewerExperienceScore() string` + +GetViewerExperienceScore returns the ViewerExperienceScore field if non-nil, zero value otherwise. + +### GetViewerExperienceScoreOk + +`func (o *VideoView) GetViewerExperienceScoreOk() (*string, bool)` + +GetViewerExperienceScoreOk returns a tuple with the ViewerExperienceScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerExperienceScore + +`func (o *VideoView) SetViewerExperienceScore(v string)` + +SetViewerExperienceScore sets ViewerExperienceScore field to given value. + +### HasViewerExperienceScore + +`func (o *VideoView) HasViewerExperienceScore() bool` + +HasViewerExperienceScore returns a boolean if a field has been set. + +### GetViewErrorId + +`func (o *VideoView) GetViewErrorId() int32` + +GetViewErrorId returns the ViewErrorId field if non-nil, zero value otherwise. + +### GetViewErrorIdOk + +`func (o *VideoView) GetViewErrorIdOk() (*int32, bool)` + +GetViewErrorIdOk returns a tuple with the ViewErrorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewErrorId + +`func (o *VideoView) SetViewErrorId(v int32)` + +SetViewErrorId sets ViewErrorId field to given value. + +### HasViewErrorId + +`func (o *VideoView) HasViewErrorId() bool` + +HasViewErrorId returns a boolean if a field has been set. + +### GetVideoVariantName + +`func (o *VideoView) GetVideoVariantName() string` + +GetVideoVariantName returns the VideoVariantName field if non-nil, zero value otherwise. + +### GetVideoVariantNameOk + +`func (o *VideoView) GetVideoVariantNameOk() (*string, bool)` + +GetVideoVariantNameOk returns a tuple with the VideoVariantName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoVariantName + +`func (o *VideoView) SetVideoVariantName(v string)` + +SetVideoVariantName sets VideoVariantName field to given value. + +### HasVideoVariantName + +`func (o *VideoView) HasVideoVariantName() bool` + +HasVideoVariantName returns a boolean if a field has been set. + +### GetPrerollPlayed + +`func (o *VideoView) GetPrerollPlayed() bool` + +GetPrerollPlayed returns the PrerollPlayed field if non-nil, zero value otherwise. + +### GetPrerollPlayedOk + +`func (o *VideoView) GetPrerollPlayedOk() (*bool, bool)` + +GetPrerollPlayedOk returns a tuple with the PrerollPlayed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrerollPlayed + +`func (o *VideoView) SetPrerollPlayed(v bool)` + +SetPrerollPlayed sets PrerollPlayed field to given value. + +### HasPrerollPlayed + +`func (o *VideoView) HasPrerollPlayed() bool` + +HasPrerollPlayed returns a boolean if a field has been set. + +### GetViewerApplicationEngine + +`func (o *VideoView) GetViewerApplicationEngine() string` + +GetViewerApplicationEngine returns the ViewerApplicationEngine field if non-nil, zero value otherwise. + +### GetViewerApplicationEngineOk + +`func (o *VideoView) GetViewerApplicationEngineOk() (*string, bool)` + +GetViewerApplicationEngineOk returns a tuple with the ViewerApplicationEngine field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerApplicationEngine + +`func (o *VideoView) SetViewerApplicationEngine(v string)` + +SetViewerApplicationEngine sets ViewerApplicationEngine field to given value. + +### HasViewerApplicationEngine + +`func (o *VideoView) HasViewerApplicationEngine() bool` + +HasViewerApplicationEngine returns a boolean if a field has been set. + +### GetViewerOsArchitecture + +`func (o *VideoView) GetViewerOsArchitecture() string` + +GetViewerOsArchitecture returns the ViewerOsArchitecture field if non-nil, zero value otherwise. + +### GetViewerOsArchitectureOk + +`func (o *VideoView) GetViewerOsArchitectureOk() (*string, bool)` + +GetViewerOsArchitectureOk returns a tuple with the ViewerOsArchitecture field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerOsArchitecture + +`func (o *VideoView) SetViewerOsArchitecture(v string)` + +SetViewerOsArchitecture sets ViewerOsArchitecture field to given value. + +### HasViewerOsArchitecture + +`func (o *VideoView) HasViewerOsArchitecture() bool` + +HasViewerOsArchitecture returns a boolean if a field has been set. + +### GetPlayerErrorCode + +`func (o *VideoView) GetPlayerErrorCode() string` + +GetPlayerErrorCode returns the PlayerErrorCode field if non-nil, zero value otherwise. + +### GetPlayerErrorCodeOk + +`func (o *VideoView) GetPlayerErrorCodeOk() (*string, bool)` + +GetPlayerErrorCodeOk returns a tuple with the PlayerErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerErrorCode + +`func (o *VideoView) SetPlayerErrorCode(v string)` + +SetPlayerErrorCode sets PlayerErrorCode field to given value. + +### HasPlayerErrorCode + +`func (o *VideoView) HasPlayerErrorCode() bool` + +HasPlayerErrorCode returns a boolean if a field has been set. + +### GetBufferingRate + +`func (o *VideoView) GetBufferingRate() string` + +GetBufferingRate returns the BufferingRate field if non-nil, zero value otherwise. + +### GetBufferingRateOk + +`func (o *VideoView) GetBufferingRateOk() (*string, bool)` + +GetBufferingRateOk returns a tuple with the BufferingRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBufferingRate + +`func (o *VideoView) SetBufferingRate(v string)` + +SetBufferingRate sets BufferingRate field to given value. + +### HasBufferingRate + +`func (o *VideoView) HasBufferingRate() bool` + +HasBufferingRate returns a boolean if a field has been set. + +### GetEvents + +`func (o *VideoView) GetEvents() []VideoViewEvent` + +GetEvents returns the Events field if non-nil, zero value otherwise. + +### GetEventsOk + +`func (o *VideoView) GetEventsOk() (*[]VideoViewEvent, bool)` + +GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvents + +`func (o *VideoView) SetEvents(v []VideoViewEvent)` + +SetEvents sets Events field to given value. + +### HasEvents + +`func (o *VideoView) HasEvents() bool` + +HasEvents returns a boolean if a field has been set. + +### GetPlayerName + +`func (o *VideoView) GetPlayerName() string` + +GetPlayerName returns the PlayerName field if non-nil, zero value otherwise. + +### GetPlayerNameOk + +`func (o *VideoView) GetPlayerNameOk() (*string, bool)` + +GetPlayerNameOk returns a tuple with the PlayerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerName + +`func (o *VideoView) SetPlayerName(v string)` + +SetPlayerName sets PlayerName field to given value. + +### HasPlayerName + +`func (o *VideoView) HasPlayerName() bool` + +HasPlayerName returns a boolean if a field has been set. + +### GetViewStart + +`func (o *VideoView) GetViewStart() string` + +GetViewStart returns the ViewStart field if non-nil, zero value otherwise. + +### GetViewStartOk + +`func (o *VideoView) GetViewStartOk() (*string, bool)` + +GetViewStartOk returns a tuple with the ViewStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewStart + +`func (o *VideoView) SetViewStart(v string)` + +SetViewStart sets ViewStart field to given value. + +### HasViewStart + +`func (o *VideoView) HasViewStart() bool` + +HasViewStart returns a boolean if a field has been set. + +### GetViewAverageRequestThroughput + +`func (o *VideoView) GetViewAverageRequestThroughput() int64` + +GetViewAverageRequestThroughput returns the ViewAverageRequestThroughput field if non-nil, zero value otherwise. + +### GetViewAverageRequestThroughputOk + +`func (o *VideoView) GetViewAverageRequestThroughputOk() (*int64, bool)` + +GetViewAverageRequestThroughputOk returns a tuple with the ViewAverageRequestThroughput field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewAverageRequestThroughput + +`func (o *VideoView) SetViewAverageRequestThroughput(v int64)` + +SetViewAverageRequestThroughput sets ViewAverageRequestThroughput field to given value. + +### HasViewAverageRequestThroughput + +`func (o *VideoView) HasViewAverageRequestThroughput() bool` + +HasViewAverageRequestThroughput returns a boolean if a field has been set. + +### GetVideoProducer + +`func (o *VideoView) GetVideoProducer() string` + +GetVideoProducer returns the VideoProducer field if non-nil, zero value otherwise. + +### GetVideoProducerOk + +`func (o *VideoView) GetVideoProducerOk() (*string, bool)` + +GetVideoProducerOk returns a tuple with the VideoProducer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoProducer + +`func (o *VideoView) SetVideoProducer(v string)` + +SetVideoProducer sets VideoProducer field to given value. + +### HasVideoProducer + +`func (o *VideoView) HasVideoProducer() bool` + +HasVideoProducer returns a boolean if a field has been set. + +### GetErrorTypeId + +`func (o *VideoView) GetErrorTypeId() int32` + +GetErrorTypeId returns the ErrorTypeId field if non-nil, zero value otherwise. + +### GetErrorTypeIdOk + +`func (o *VideoView) GetErrorTypeIdOk() (*int32, bool)` + +GetErrorTypeIdOk returns a tuple with the ErrorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorTypeId + +`func (o *VideoView) SetErrorTypeId(v int32)` + +SetErrorTypeId sets ErrorTypeId field to given value. + +### HasErrorTypeId + +`func (o *VideoView) HasErrorTypeId() bool` + +HasErrorTypeId returns a boolean if a field has been set. + +### GetMuxViewerId + +`func (o *VideoView) GetMuxViewerId() string` + +GetMuxViewerId returns the MuxViewerId field if non-nil, zero value otherwise. + +### GetMuxViewerIdOk + +`func (o *VideoView) GetMuxViewerIdOk() (*string, bool)` + +GetMuxViewerIdOk returns a tuple with the MuxViewerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMuxViewerId + +`func (o *VideoView) SetMuxViewerId(v string)` + +SetMuxViewerId sets MuxViewerId field to given value. + +### HasMuxViewerId + +`func (o *VideoView) HasMuxViewerId() bool` + +HasMuxViewerId returns a boolean if a field has been set. + +### GetVideoId + +`func (o *VideoView) GetVideoId() string` + +GetVideoId returns the VideoId field if non-nil, zero value otherwise. + +### GetVideoIdOk + +`func (o *VideoView) GetVideoIdOk() (*string, bool)` + +GetVideoIdOk returns a tuple with the VideoId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoId + +`func (o *VideoView) SetVideoId(v string)` + +SetVideoId sets VideoId field to given value. + +### HasVideoId + +`func (o *VideoView) HasVideoId() bool` + +HasVideoId returns a boolean if a field has been set. + +### GetContinentCode + +`func (o *VideoView) GetContinentCode() string` + +GetContinentCode returns the ContinentCode field if non-nil, zero value otherwise. + +### GetContinentCodeOk + +`func (o *VideoView) GetContinentCodeOk() (*string, bool)` + +GetContinentCodeOk returns a tuple with the ContinentCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContinentCode + +`func (o *VideoView) SetContinentCode(v string)` + +SetContinentCode sets ContinentCode field to given value. + +### HasContinentCode + +`func (o *VideoView) HasContinentCode() bool` + +HasContinentCode returns a boolean if a field has been set. + +### GetSessionId + +`func (o *VideoView) GetSessionId() string` + +GetSessionId returns the SessionId field if non-nil, zero value otherwise. + +### GetSessionIdOk + +`func (o *VideoView) GetSessionIdOk() (*string, bool)` + +GetSessionIdOk returns a tuple with the SessionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionId + +`func (o *VideoView) SetSessionId(v string)` + +SetSessionId sets SessionId field to given value. + +### HasSessionId + +`func (o *VideoView) HasSessionId() bool` + +HasSessionId returns a boolean if a field has been set. + +### GetExitBeforeVideoStart + +`func (o *VideoView) GetExitBeforeVideoStart() bool` + +GetExitBeforeVideoStart returns the ExitBeforeVideoStart field if non-nil, zero value otherwise. + +### GetExitBeforeVideoStartOk + +`func (o *VideoView) GetExitBeforeVideoStartOk() (*bool, bool)` + +GetExitBeforeVideoStartOk returns a tuple with the ExitBeforeVideoStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExitBeforeVideoStart + +`func (o *VideoView) SetExitBeforeVideoStart(v bool)` + +SetExitBeforeVideoStart sets ExitBeforeVideoStart field to given value. + +### HasExitBeforeVideoStart + +`func (o *VideoView) HasExitBeforeVideoStart() bool` + +HasExitBeforeVideoStart returns a boolean if a field has been set. + +### GetVideoContentType + +`func (o *VideoView) GetVideoContentType() string` + +GetVideoContentType returns the VideoContentType field if non-nil, zero value otherwise. + +### GetVideoContentTypeOk + +`func (o *VideoView) GetVideoContentTypeOk() (*string, bool)` + +GetVideoContentTypeOk returns a tuple with the VideoContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoContentType + +`func (o *VideoView) SetVideoContentType(v string)` + +SetVideoContentType sets VideoContentType field to given value. + +### HasVideoContentType + +`func (o *VideoView) HasVideoContentType() bool` + +HasVideoContentType returns a boolean if a field has been set. + +### GetViewerOsFamily + +`func (o *VideoView) GetViewerOsFamily() string` + +GetViewerOsFamily returns the ViewerOsFamily field if non-nil, zero value otherwise. + +### GetViewerOsFamilyOk + +`func (o *VideoView) GetViewerOsFamilyOk() (*string, bool)` + +GetViewerOsFamilyOk returns a tuple with the ViewerOsFamily field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerOsFamily + +`func (o *VideoView) SetViewerOsFamily(v string)` + +SetViewerOsFamily sets ViewerOsFamily field to given value. + +### HasViewerOsFamily + +`func (o *VideoView) HasViewerOsFamily() bool` + +HasViewerOsFamily returns a boolean if a field has been set. + +### GetPlayerPoster + +`func (o *VideoView) GetPlayerPoster() string` + +GetPlayerPoster returns the PlayerPoster field if non-nil, zero value otherwise. + +### GetPlayerPosterOk + +`func (o *VideoView) GetPlayerPosterOk() (*string, bool)` + +GetPlayerPosterOk returns a tuple with the PlayerPoster field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerPoster + +`func (o *VideoView) SetPlayerPoster(v string)` + +SetPlayerPoster sets PlayerPoster field to given value. + +### HasPlayerPoster + +`func (o *VideoView) HasPlayerPoster() bool` + +HasPlayerPoster returns a boolean if a field has been set. + +### GetViewAverageRequestLatency + +`func (o *VideoView) GetViewAverageRequestLatency() int64` + +GetViewAverageRequestLatency returns the ViewAverageRequestLatency field if non-nil, zero value otherwise. + +### GetViewAverageRequestLatencyOk + +`func (o *VideoView) GetViewAverageRequestLatencyOk() (*int64, bool)` + +GetViewAverageRequestLatencyOk returns a tuple with the ViewAverageRequestLatency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewAverageRequestLatency + +`func (o *VideoView) SetViewAverageRequestLatency(v int64)` + +SetViewAverageRequestLatency sets ViewAverageRequestLatency field to given value. + +### HasViewAverageRequestLatency + +`func (o *VideoView) HasViewAverageRequestLatency() bool` + +HasViewAverageRequestLatency returns a boolean if a field has been set. + +### GetVideoVariantId + +`func (o *VideoView) GetVideoVariantId() string` + +GetVideoVariantId returns the VideoVariantId field if non-nil, zero value otherwise. + +### GetVideoVariantIdOk + +`func (o *VideoView) GetVideoVariantIdOk() (*string, bool)` + +GetVideoVariantIdOk returns a tuple with the VideoVariantId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoVariantId + +`func (o *VideoView) SetVideoVariantId(v string)` + +SetVideoVariantId sets VideoVariantId field to given value. + +### HasVideoVariantId + +`func (o *VideoView) HasVideoVariantId() bool` + +HasVideoVariantId returns a boolean if a field has been set. + +### GetPlayerSourceDuration + +`func (o *VideoView) GetPlayerSourceDuration() int64` + +GetPlayerSourceDuration returns the PlayerSourceDuration field if non-nil, zero value otherwise. + +### GetPlayerSourceDurationOk + +`func (o *VideoView) GetPlayerSourceDurationOk() (*int64, bool)` + +GetPlayerSourceDurationOk returns a tuple with the PlayerSourceDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceDuration + +`func (o *VideoView) SetPlayerSourceDuration(v int64)` + +SetPlayerSourceDuration sets PlayerSourceDuration field to given value. + +### HasPlayerSourceDuration + +`func (o *VideoView) HasPlayerSourceDuration() bool` + +HasPlayerSourceDuration returns a boolean if a field has been set. + +### GetPlayerSourceUrl + +`func (o *VideoView) GetPlayerSourceUrl() string` + +GetPlayerSourceUrl returns the PlayerSourceUrl field if non-nil, zero value otherwise. + +### GetPlayerSourceUrlOk + +`func (o *VideoView) GetPlayerSourceUrlOk() (*string, bool)` + +GetPlayerSourceUrlOk returns a tuple with the PlayerSourceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSourceUrl + +`func (o *VideoView) SetPlayerSourceUrl(v string)` + +SetPlayerSourceUrl sets PlayerSourceUrl field to given value. + +### HasPlayerSourceUrl + +`func (o *VideoView) HasPlayerSourceUrl() bool` + +HasPlayerSourceUrl returns a boolean if a field has been set. + +### GetMuxApiVersion + +`func (o *VideoView) GetMuxApiVersion() string` + +GetMuxApiVersion returns the MuxApiVersion field if non-nil, zero value otherwise. + +### GetMuxApiVersionOk + +`func (o *VideoView) GetMuxApiVersionOk() (*string, bool)` + +GetMuxApiVersionOk returns a tuple with the MuxApiVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMuxApiVersion + +`func (o *VideoView) SetMuxApiVersion(v string)` + +SetMuxApiVersion sets MuxApiVersion field to given value. + +### HasMuxApiVersion + +`func (o *VideoView) HasMuxApiVersion() bool` + +HasMuxApiVersion returns a boolean if a field has been set. + +### GetVideoTitle + +`func (o *VideoView) GetVideoTitle() string` + +GetVideoTitle returns the VideoTitle field if non-nil, zero value otherwise. + +### GetVideoTitleOk + +`func (o *VideoView) GetVideoTitleOk() (*string, bool)` + +GetVideoTitleOk returns a tuple with the VideoTitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoTitle + +`func (o *VideoView) SetVideoTitle(v string)` + +SetVideoTitle sets VideoTitle field to given value. + +### HasVideoTitle + +`func (o *VideoView) HasVideoTitle() bool` + +HasVideoTitle returns a boolean if a field has been set. + +### GetId + +`func (o *VideoView) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VideoView) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VideoView) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *VideoView) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetShortTime + +`func (o *VideoView) GetShortTime() string` + +GetShortTime returns the ShortTime field if non-nil, zero value otherwise. + +### GetShortTimeOk + +`func (o *VideoView) GetShortTimeOk() (*string, bool)` + +GetShortTimeOk returns a tuple with the ShortTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShortTime + +`func (o *VideoView) SetShortTime(v string)` + +SetShortTime sets ShortTime field to given value. + +### HasShortTime + +`func (o *VideoView) HasShortTime() bool` + +HasShortTime returns a boolean if a field has been set. + +### GetRebufferPercentage + +`func (o *VideoView) GetRebufferPercentage() string` + +GetRebufferPercentage returns the RebufferPercentage field if non-nil, zero value otherwise. + +### GetRebufferPercentageOk + +`func (o *VideoView) GetRebufferPercentageOk() (*string, bool)` + +GetRebufferPercentageOk returns a tuple with the RebufferPercentage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRebufferPercentage + +`func (o *VideoView) SetRebufferPercentage(v string)` + +SetRebufferPercentage sets RebufferPercentage field to given value. + +### HasRebufferPercentage + +`func (o *VideoView) HasRebufferPercentage() bool` + +HasRebufferPercentage returns a boolean if a field has been set. + +### GetTimeToFirstFrame + +`func (o *VideoView) GetTimeToFirstFrame() int64` + +GetTimeToFirstFrame returns the TimeToFirstFrame field if non-nil, zero value otherwise. + +### GetTimeToFirstFrameOk + +`func (o *VideoView) GetTimeToFirstFrameOk() (*int64, bool)` + +GetTimeToFirstFrameOk returns a tuple with the TimeToFirstFrame field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeToFirstFrame + +`func (o *VideoView) SetTimeToFirstFrame(v int64)` + +SetTimeToFirstFrame sets TimeToFirstFrame field to given value. + +### HasTimeToFirstFrame + +`func (o *VideoView) HasTimeToFirstFrame() bool` + +HasTimeToFirstFrame returns a boolean if a field has been set. + +### GetViewerUserId + +`func (o *VideoView) GetViewerUserId() string` + +GetViewerUserId returns the ViewerUserId field if non-nil, zero value otherwise. + +### GetViewerUserIdOk + +`func (o *VideoView) GetViewerUserIdOk() (*string, bool)` + +GetViewerUserIdOk returns a tuple with the ViewerUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerUserId + +`func (o *VideoView) SetViewerUserId(v string)` + +SetViewerUserId sets ViewerUserId field to given value. + +### HasViewerUserId + +`func (o *VideoView) HasViewerUserId() bool` + +HasViewerUserId returns a boolean if a field has been set. + +### GetVideoStreamType + +`func (o *VideoView) GetVideoStreamType() string` + +GetVideoStreamType returns the VideoStreamType field if non-nil, zero value otherwise. + +### GetVideoStreamTypeOk + +`func (o *VideoView) GetVideoStreamTypeOk() (*string, bool)` + +GetVideoStreamTypeOk returns a tuple with the VideoStreamType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoStreamType + +`func (o *VideoView) SetVideoStreamType(v string)` + +SetVideoStreamType sets VideoStreamType field to given value. + +### HasVideoStreamType + +`func (o *VideoView) HasVideoStreamType() bool` + +HasVideoStreamType returns a boolean if a field has been set. + +### GetPlayerStartupTime + +`func (o *VideoView) GetPlayerStartupTime() int64` + +GetPlayerStartupTime returns the PlayerStartupTime field if non-nil, zero value otherwise. + +### GetPlayerStartupTimeOk + +`func (o *VideoView) GetPlayerStartupTimeOk() (*int64, bool)` + +GetPlayerStartupTimeOk returns a tuple with the PlayerStartupTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerStartupTime + +`func (o *VideoView) SetPlayerStartupTime(v int64)` + +SetPlayerStartupTime sets PlayerStartupTime field to given value. + +### HasPlayerStartupTime + +`func (o *VideoView) HasPlayerStartupTime() bool` + +HasPlayerStartupTime returns a boolean if a field has been set. + +### GetViewerApplicationVersion + +`func (o *VideoView) GetViewerApplicationVersion() string` + +GetViewerApplicationVersion returns the ViewerApplicationVersion field if non-nil, zero value otherwise. + +### GetViewerApplicationVersionOk + +`func (o *VideoView) GetViewerApplicationVersionOk() (*string, bool)` + +GetViewerApplicationVersionOk returns a tuple with the ViewerApplicationVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerApplicationVersion + +`func (o *VideoView) SetViewerApplicationVersion(v string)` + +SetViewerApplicationVersion sets ViewerApplicationVersion field to given value. + +### HasViewerApplicationVersion + +`func (o *VideoView) HasViewerApplicationVersion() bool` + +HasViewerApplicationVersion returns a boolean if a field has been set. + +### GetViewMaxDownscalePercentage + +`func (o *VideoView) GetViewMaxDownscalePercentage() string` + +GetViewMaxDownscalePercentage returns the ViewMaxDownscalePercentage field if non-nil, zero value otherwise. + +### GetViewMaxDownscalePercentageOk + +`func (o *VideoView) GetViewMaxDownscalePercentageOk() (*string, bool)` + +GetViewMaxDownscalePercentageOk returns a tuple with the ViewMaxDownscalePercentage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewMaxDownscalePercentage + +`func (o *VideoView) SetViewMaxDownscalePercentage(v string)` + +SetViewMaxDownscalePercentage sets ViewMaxDownscalePercentage field to given value. + +### HasViewMaxDownscalePercentage + +`func (o *VideoView) HasViewMaxDownscalePercentage() bool` + +HasViewMaxDownscalePercentage returns a boolean if a field has been set. + +### GetViewMaxUpscalePercentage + +`func (o *VideoView) GetViewMaxUpscalePercentage() string` + +GetViewMaxUpscalePercentage returns the ViewMaxUpscalePercentage field if non-nil, zero value otherwise. + +### GetViewMaxUpscalePercentageOk + +`func (o *VideoView) GetViewMaxUpscalePercentageOk() (*string, bool)` + +GetViewMaxUpscalePercentageOk returns a tuple with the ViewMaxUpscalePercentage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewMaxUpscalePercentage + +`func (o *VideoView) SetViewMaxUpscalePercentage(v string)` + +SetViewMaxUpscalePercentage sets ViewMaxUpscalePercentage field to given value. + +### HasViewMaxUpscalePercentage + +`func (o *VideoView) HasViewMaxUpscalePercentage() bool` + +HasViewMaxUpscalePercentage returns a boolean if a field has been set. + +### GetCountryCode + +`func (o *VideoView) GetCountryCode() string` + +GetCountryCode returns the CountryCode field if non-nil, zero value otherwise. + +### GetCountryCodeOk + +`func (o *VideoView) GetCountryCodeOk() (*string, bool)` + +GetCountryCodeOk returns a tuple with the CountryCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountryCode + +`func (o *VideoView) SetCountryCode(v string)` + +SetCountryCode sets CountryCode field to given value. + +### HasCountryCode + +`func (o *VideoView) HasCountryCode() bool` + +HasCountryCode returns a boolean if a field has been set. + +### GetUsedFullscreen + +`func (o *VideoView) GetUsedFullscreen() bool` + +GetUsedFullscreen returns the UsedFullscreen field if non-nil, zero value otherwise. + +### GetUsedFullscreenOk + +`func (o *VideoView) GetUsedFullscreenOk() (*bool, bool)` + +GetUsedFullscreenOk returns a tuple with the UsedFullscreen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsedFullscreen + +`func (o *VideoView) SetUsedFullscreen(v bool)` + +SetUsedFullscreen sets UsedFullscreen field to given value. + +### HasUsedFullscreen + +`func (o *VideoView) HasUsedFullscreen() bool` + +HasUsedFullscreen returns a boolean if a field has been set. + +### GetIsp + +`func (o *VideoView) GetIsp() string` + +GetIsp returns the Isp field if non-nil, zero value otherwise. + +### GetIspOk + +`func (o *VideoView) GetIspOk() (*string, bool)` + +GetIspOk returns a tuple with the Isp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsp + +`func (o *VideoView) SetIsp(v string)` + +SetIsp sets Isp field to given value. + +### HasIsp + +`func (o *VideoView) HasIsp() bool` + +HasIsp returns a boolean if a field has been set. + +### GetPropertyId + +`func (o *VideoView) GetPropertyId() int64` + +GetPropertyId returns the PropertyId field if non-nil, zero value otherwise. + +### GetPropertyIdOk + +`func (o *VideoView) GetPropertyIdOk() (*int64, bool)` + +GetPropertyIdOk returns a tuple with the PropertyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPropertyId + +`func (o *VideoView) SetPropertyId(v int64)` + +SetPropertyId sets PropertyId field to given value. + +### HasPropertyId + +`func (o *VideoView) HasPropertyId() bool` + +HasPropertyId returns a boolean if a field has been set. + +### GetPlayerAutoplay + +`func (o *VideoView) GetPlayerAutoplay() bool` + +GetPlayerAutoplay returns the PlayerAutoplay field if non-nil, zero value otherwise. + +### GetPlayerAutoplayOk + +`func (o *VideoView) GetPlayerAutoplayOk() (*bool, bool)` + +GetPlayerAutoplayOk returns a tuple with the PlayerAutoplay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerAutoplay + +`func (o *VideoView) SetPlayerAutoplay(v bool)` + +SetPlayerAutoplay sets PlayerAutoplay field to given value. + +### HasPlayerAutoplay + +`func (o *VideoView) HasPlayerAutoplay() bool` + +HasPlayerAutoplay returns a boolean if a field has been set. + +### GetPlayerHeight + +`func (o *VideoView) GetPlayerHeight() int32` + +GetPlayerHeight returns the PlayerHeight field if non-nil, zero value otherwise. + +### GetPlayerHeightOk + +`func (o *VideoView) GetPlayerHeightOk() (*int32, bool)` + +GetPlayerHeightOk returns a tuple with the PlayerHeight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerHeight + +`func (o *VideoView) SetPlayerHeight(v int32)` + +SetPlayerHeight sets PlayerHeight field to given value. + +### HasPlayerHeight + +`func (o *VideoView) HasPlayerHeight() bool` + +HasPlayerHeight returns a boolean if a field has been set. + +### GetAsn + +`func (o *VideoView) GetAsn() int64` + +GetAsn returns the Asn field if non-nil, zero value otherwise. + +### GetAsnOk + +`func (o *VideoView) GetAsnOk() (*int64, bool)` + +GetAsnOk returns a tuple with the Asn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAsn + +`func (o *VideoView) SetAsn(v int64)` + +SetAsn sets Asn field to given value. + +### HasAsn + +`func (o *VideoView) HasAsn() bool` + +HasAsn returns a boolean if a field has been set. + +### GetAsnName + +`func (o *VideoView) GetAsnName() string` + +GetAsnName returns the AsnName field if non-nil, zero value otherwise. + +### GetAsnNameOk + +`func (o *VideoView) GetAsnNameOk() (*string, bool)` + +GetAsnNameOk returns a tuple with the AsnName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAsnName + +`func (o *VideoView) SetAsnName(v string)` + +SetAsnName sets AsnName field to given value. + +### HasAsnName + +`func (o *VideoView) HasAsnName() bool` + +HasAsnName returns a boolean if a field has been set. + +### GetQualityScore + +`func (o *VideoView) GetQualityScore() string` + +GetQualityScore returns the QualityScore field if non-nil, zero value otherwise. + +### GetQualityScoreOk + +`func (o *VideoView) GetQualityScoreOk() (*string, bool)` + +GetQualityScoreOk returns a tuple with the QualityScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQualityScore + +`func (o *VideoView) SetQualityScore(v string)` + +SetQualityScore sets QualityScore field to given value. + +### HasQualityScore + +`func (o *VideoView) HasQualityScore() bool` + +HasQualityScore returns a boolean if a field has been set. + +### GetPlayerSoftwareVersion + +`func (o *VideoView) GetPlayerSoftwareVersion() string` + +GetPlayerSoftwareVersion returns the PlayerSoftwareVersion field if non-nil, zero value otherwise. + +### GetPlayerSoftwareVersionOk + +`func (o *VideoView) GetPlayerSoftwareVersionOk() (*string, bool)` + +GetPlayerSoftwareVersionOk returns a tuple with the PlayerSoftwareVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerSoftwareVersion + +`func (o *VideoView) SetPlayerSoftwareVersion(v string)` + +SetPlayerSoftwareVersion sets PlayerSoftwareVersion field to given value. + +### HasPlayerSoftwareVersion + +`func (o *VideoView) HasPlayerSoftwareVersion() bool` + +HasPlayerSoftwareVersion returns a boolean if a field has been set. + +### GetPlayerMuxPluginName + +`func (o *VideoView) GetPlayerMuxPluginName() string` + +GetPlayerMuxPluginName returns the PlayerMuxPluginName field if non-nil, zero value otherwise. + +### GetPlayerMuxPluginNameOk + +`func (o *VideoView) GetPlayerMuxPluginNameOk() (*string, bool)` + +GetPlayerMuxPluginNameOk returns a tuple with the PlayerMuxPluginName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlayerMuxPluginName + +`func (o *VideoView) SetPlayerMuxPluginName(v string)` + +SetPlayerMuxPluginName sets PlayerMuxPluginName field to given value. + +### HasPlayerMuxPluginName + +`func (o *VideoView) HasPlayerMuxPluginName() bool` + +HasPlayerMuxPluginName returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoViewEvent.md b/docs/VideoViewEvent.md index e329ece..fea7bde 100644 --- a/docs/VideoViewEvent.md +++ b/docs/VideoViewEvent.md @@ -1,12 +1,133 @@ # VideoViewEvent ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ViewerTime** | **int64** | | [optional] -**PlaybackTime** | **int64** | | [optional] -**Name** | **string** | | [optional] -**EventTime** | **int64** | | [optional] +**ViewerTime** | Pointer to **int64** | | [optional] +**PlaybackTime** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] +**EventTime** | Pointer to **int64** | | [optional] + +## Methods + +### NewVideoViewEvent + +`func NewVideoViewEvent() *VideoViewEvent` + +NewVideoViewEvent instantiates a new VideoViewEvent 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 + +### NewVideoViewEventWithDefaults + +`func NewVideoViewEventWithDefaults() *VideoViewEvent` + +NewVideoViewEventWithDefaults instantiates a new VideoViewEvent 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 + +### GetViewerTime + +`func (o *VideoViewEvent) GetViewerTime() int64` + +GetViewerTime returns the ViewerTime field if non-nil, zero value otherwise. + +### GetViewerTimeOk + +`func (o *VideoViewEvent) GetViewerTimeOk() (*int64, bool)` + +GetViewerTimeOk returns a tuple with the ViewerTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewerTime + +`func (o *VideoViewEvent) SetViewerTime(v int64)` + +SetViewerTime sets ViewerTime field to given value. + +### HasViewerTime + +`func (o *VideoViewEvent) HasViewerTime() bool` + +HasViewerTime returns a boolean if a field has been set. + +### GetPlaybackTime + +`func (o *VideoViewEvent) GetPlaybackTime() int64` + +GetPlaybackTime returns the PlaybackTime field if non-nil, zero value otherwise. + +### GetPlaybackTimeOk + +`func (o *VideoViewEvent) GetPlaybackTimeOk() (*int64, bool)` + +GetPlaybackTimeOk returns a tuple with the PlaybackTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaybackTime + +`func (o *VideoViewEvent) SetPlaybackTime(v int64)` + +SetPlaybackTime sets PlaybackTime field to given value. + +### HasPlaybackTime + +`func (o *VideoViewEvent) HasPlaybackTime() bool` + +HasPlaybackTime returns a boolean if a field has been set. + +### GetName + +`func (o *VideoViewEvent) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *VideoViewEvent) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *VideoViewEvent) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *VideoViewEvent) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetEventTime + +`func (o *VideoViewEvent) GetEventTime() int64` + +GetEventTime returns the EventTime field if non-nil, zero value otherwise. + +### GetEventTimeOk + +`func (o *VideoViewEvent) GetEventTimeOk() (*int64, bool)` + +GetEventTimeOk returns a tuple with the EventTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventTime + +`func (o *VideoViewEvent) SetEventTime(v int64)` + +SetEventTime sets EventTime field to given value. + +### HasEventTime + +`func (o *VideoViewEvent) HasEventTime() bool` + +HasEventTime returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoViewResponse.md b/docs/VideoViewResponse.md index 2a36f28..7eb5ae5 100644 --- a/docs/VideoViewResponse.md +++ b/docs/VideoViewResponse.md @@ -1,10 +1,81 @@ # VideoViewResponse ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**VideoView**](.md) | | [optional] -**Timeframe** | **[]int64** | | [optional] +**Data** | Pointer to [**VideoView**](VideoView.md) | | [optional] +**Timeframe** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewVideoViewResponse + +`func NewVideoViewResponse() *VideoViewResponse` + +NewVideoViewResponse instantiates a new VideoViewResponse 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 + +### NewVideoViewResponseWithDefaults + +`func NewVideoViewResponseWithDefaults() *VideoViewResponse` + +NewVideoViewResponseWithDefaults instantiates a new VideoViewResponse 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 + +### GetData + +`func (o *VideoViewResponse) GetData() VideoView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *VideoViewResponse) GetDataOk() (*VideoView, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *VideoViewResponse) SetData(v VideoView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *VideoViewResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetTimeframe + +`func (o *VideoViewResponse) GetTimeframe() []int64` + +GetTimeframe returns the Timeframe field if non-nil, zero value otherwise. + +### GetTimeframeOk + +`func (o *VideoViewResponse) GetTimeframeOk() (*[]int64, bool)` + +GetTimeframeOk returns a tuple with the Timeframe field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeframe + +`func (o *VideoViewResponse) SetTimeframe(v []int64)` + +SetTimeframe sets Timeframe field to given value. + +### HasTimeframe + +`func (o *VideoViewResponse) HasTimeframe() bool` + +HasTimeframe returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoViewsApi.md b/docs/VideoViewsApi.md index c579fd6..dc51bb3 100644 --- a/docs/VideoViewsApi.md +++ b/docs/VideoViewsApi.md @@ -8,18 +8,58 @@ Method | HTTP request | Description [**ListVideoViews**](VideoViewsApi.md#ListVideoViews) | **Get** /data/v1/video-views | List Video Views -# **GetVideoView** -> VideoViewResponse GetVideoView(ctx, vIDEOVIEWID) + +## GetVideoView + +> VideoViewResponse GetVideoView(ctx, vIDEOVIEWID).Execute() + Get a Video View -Returns the details of a video view -### Required Parameters + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + vIDEOVIEWID := "abcd1234" // string | ID of the Video View + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.VideoViewsApi.GetVideoView(context.Background(), vIDEOVIEWID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VideoViewsApi.GetVideoView``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetVideoView`: VideoViewResponse + fmt.Fprintf(os.Stdout, "Response from `VideoViewsApi.GetVideoView`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**vIDEOVIEWID** | **string** | ID of the Video View | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetVideoViewRequest struct via the builder pattern + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **vIDEOVIEWID** | **string**| ID of the Video View | + ### Return type @@ -31,36 +71,73 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVideoViews -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +> ListVideoViewsResponse ListVideoViews(ctx).Limit(limit).Page(page).ViewerId(viewerId).ErrorId(errorId).OrderDirection(orderDirection).Filters(filters).Timeframe(timeframe).Execute() -# **ListVideoViews** -> ListVideoViewsResponse ListVideoViews(ctx, optional) List Video Views -Returns a list of video views -### Required Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListVideoViewsOpts** | optional parameters | nil if no parameters +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Number of items to include in the response (optional) (default to 25) + page := int32(56) // int32 | Offset by this many pages, of the size of `limit` (optional) (default to 1) + viewerId := "viewerId_example" // string | Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. (optional) + errorId := int32(56) // int32 | Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. (optional) + orderDirection := "orderDirection_example" // string | Sort order. (optional) + filters := []string{"Inner_example"} // []string | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + timeframe := []string{"Inner_example"} // []string | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.VideoViewsApi.ListVideoViews(context.Background()).Limit(limit).Page(page).ViewerId(viewerId).ErrorId(errorId).OrderDirection(orderDirection).Filters(filters).Timeframe(timeframe).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VideoViewsApi.ListVideoViews``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListVideoViews`: ListVideoViewsResponse + fmt.Fprintf(os.Stdout, "Response from `VideoViewsApi.ListVideoViews`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListVideoViewsRequest struct via the builder pattern -### Optional Parameters -Optional parameters are passed through a pointer to a ListVideoViewsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] - **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] - **viewerId** | **optional.String**| Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. | - **errorId** | **optional.Int32**| Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. | - **orderDirection** | **optional.String**| Sort order. | - **filters** | [**optional.Interface of []string**](string.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | - **timeframe** | [**optional.Interface of []string**](string.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | + **limit** | **int32** | Number of items to include in the response | [default to 25] + **page** | **int32** | Offset by this many pages, of the size of `limit` | [default to 1] + **viewerId** | **string** | Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. | + **errorId** | **int32** | Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. | + **orderDirection** | **string** | Sort order. | + **filters** | **[]string** | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | + **timeframe** | **[]string** | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | ### Return type @@ -72,8 +149,10 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/gen/.gitignore b/gen/.gitignore new file mode 100644 index 0000000..8a50009 --- /dev/null +++ b/gen/.gitignore @@ -0,0 +1,7 @@ +node_modules/ +tmp/ + +*.log +*.bak + +template-changes.diff \ No newline at end of file diff --git a/gen/Makefile b/gen/Makefile new file mode 100644 index 0000000..0b209cd --- /dev/null +++ b/gen/Makefile @@ -0,0 +1,31 @@ +# per-SDK stuff +GENERATOR_TYPE=go + +###### helper variables ###### +# this is in case we want to go to Docker or something other than running yarn +# for OAS in the future. also less typing. +OAS_CLI=yarn run -s oas +CONFIG_PATH=./generator-config.json +OUTPUT_DIR=.. +TEMPLATE_DIR=./templates +GENERATED_TEMPLATE_DIR=./tmp/oas-base-templates + +ensure: + yarn install + +clean: + rm -rf tmp + +clean-products: + rm -rf "${OUTPUT_DIR}/lib" + rm -rf "${OUTPUT_DIR}/docs" + +build: ensure clean-products + ${OAS_CLI} generate -g "${GENERATOR_TYPE}" -c "${CONFIG_PATH}" -t "${TEMPLATE_DIR}" -o "${OUTPUT_DIR}" -i "${OAS_SPEC_PATH}" + +config-help: ensure + ${OAS_CLI} config-help -g "${GENERATOR_TYPE}" + +template-diff: ensure + ${OAS_CLI} author template -g "${GENERATOR_TYPE}" -o "${GENERATED_TEMPLATE_DIR}" + diff "${TEMPLATE_DIR}" "${GENERATED_TEMPLATE_DIR}" > ./tmp/template-changes.diff diff --git a/gen/generator-config.json b/gen/generator-config.json new file mode 100644 index 0000000..34983c4 --- /dev/null +++ b/gen/generator-config.json @@ -0,0 +1,6 @@ +{ + "!!source": "https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/go.md", + "packageName": "muxgo", + "packageVersion": "1.0.0-rc.1", + "userAgent": "Mux Go NG" +} diff --git a/gen/openapitools.json b/gen/openapitools.json new file mode 100644 index 0000000..8ef4cb7 --- /dev/null +++ b/gen/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "5.0.1" + } +} diff --git a/gen/package.json b/gen/package.json new file mode 100644 index 0000000..f9ce570 --- /dev/null +++ b/gen/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "scripts": { + "oas": "openapi-generator-cli", + "current-version": "jq -r .artifactVersion < ./generator-config.json", + "compute-next-version:patch": "semver $(yarn run --silent current-version) -i patch", + "compute-next-version:minor": "semver $(yarn run --silent current-version) -i minor", + "compute-next-version:major": "semver $(yarn run --silent current-version) -i major", + "bump-version:patch": "jq -r \".gemVersion = \\\"$(yarn run -s compute-next-version:patch)\\\"\" < ./generator-config.json > ./generator-config.tmp.json && cp ./generator-config.json ./generator-config.json.bak && mv ./generator-config.tmp.json ./generator-config.json", + "build": "" + }, + "dependencies": { + "@openapitools/openapi-generator-cli": "2.2.2", + "node-jq": "1.12.0", + "semver": "7.3.4" + } +} diff --git a/gen/templates/.travis.yml b/gen/templates/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/gen/templates/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/gen/templates/README.mustache b/gen/templates/README.mustache new file mode 100644 index 0000000..4e95776 --- /dev/null +++ b/gen/templates/README.mustache @@ -0,0 +1,221 @@ +# Go API client for {{packageName}} + +{{#appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} +{{/appDescriptionWithNewLines}} + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import sw "./{{packageName}}" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identifield by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +``` +ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}} Endpoints do not require authorization. +{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} +{{#authMethods}} + +### {{{name}}} + +{{#isApiKey}} +- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{keyParamName}} and passed in as the auth context for each request. + +{{/isApiKey}} +{{#isBasic}} +{{#isBasicBearer}} +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +{{/isBasicBearer}} +{{#isBasicBasic}} +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + +{{/isBasicBasic}} +{{#isHttpSignature}} +- **Type**: HTTP signature authentication + +Example + +```golang + authConfig := sw.HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "rsa.pem", + Passphrase: "my-passphrase", + SigningScheme: sw.HttpSigningSchemeHs2019, + SignedHeaders: []string{ + sw.HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + sw.HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + SigningAlgorithm: sw.HttpSigningAlgorithmRsaPSS, + SignatureMaxValidity: 5 * time.Minute, + } + var authCtx context.Context + var err error + if authCtx, err = authConfig.ContextWithValue(context.Background()); err != nil { + // Process error + } + r, err = client.Service.Operation(auth, args) + +``` +{{/isHttpSignature}} +{{/isBasic}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```golang +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + +{{/isOAuth}} +{{/authMethods}} + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/gen/templates/api.mustache b/gen/templates/api.mustache new file mode 100644 index 0000000..c68db25 --- /dev/null +++ b/gen/templates/api.mustache @@ -0,0 +1,377 @@ +{{>partial_header}} +package {{packageName}} + +{{#operations}} +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" +{{#imports}} "{{import}}" +{{/imports}} +) + +// Linger please +var ( + _ _context.Context +) +{{#generateInterfaces}} + +type {{classname}} interface { + {{#operation}} + + /* + * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}} + {{#notes}} + * {{{unescapedNotes}}} + {{/notes}} + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + * @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} + * @return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request + */ + {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request + + /* + * {{nickname}}Execute executes the request{{#returnType}} + * @return {{{.}}}{{/returnType}} + */ + {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) + {{/operation}} +} +{{/generateInterfaces}} + +// {{classname}}Service {{classname}} service +type {{classname}}Service service +{{#operation}} + +type {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request struct { + ctx _context.Context{{#generateInterfaces}} + ApiService {{classname}} +{{/generateInterfaces}}{{^generateInterfaces}} + ApiService *{{classname}}Service +{{/generateInterfaces}} +{{#allParams}} + {{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}} +{{/allParams}} +} +{{#allParams}}{{^isPathParam}} +func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) {{vendorExtensions.x-export-param-name}}({{paramName}} {{{dataType}}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request { + r.{{paramName}} = &{{paramName}} + return r +}{{/isPathParam}}{{/allParams}} + +func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { + return r.ApiService.{{nickname}}Execute(r) +} + +/* + * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}} +{{#notes}} + * {{{unescapedNotes}}} +{{/notes}} + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + * @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} + * @return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request + */ +func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request { + return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request{ + ApiService: a, + ctx: ctx,{{#pathParams}} + {{paramName}}: {{paramName}},{{/pathParams}} + } +} + +/* + * Execute executes the request{{#returnType}} + * @return {{{.}}}{{/returnType}} + */ +func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.Method{{httpMethod}} + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + {{#returnType}} + localVarReturnValue {{{.}}} + {{/returnType}} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} + localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.PathEscape(parameterToString(r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")), -1){{/pathParams}} + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + {{#allParams}} + {{#required}} + {{^isPathParam}} + if r.{{paramName}} == nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} is required and must be specified") + } + {{/isPathParam}} + {{#minItems}} + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minItems}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minItems}} elements") + } + {{/minItems}} + {{#maxItems}} + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxItems}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxItems}} elements") + } + {{/maxItems}} + {{#minLength}} + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minLength}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minLength}} elements") + } + {{/minLength}} + {{#maxLength}} + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxLength}} { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxLength}} elements") + } + {{/maxLength}} + {{#minimum}} + {{#isString}} + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) + if {{paramName}}Txt < {{minimum}} { + {{/isString}} + {{^isString}} + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} < {{minimum}} { + {{/isString}} + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be greater than {{minimum}}") + } + {{/minimum}} + {{#maximum}} + {{#isString}} + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) + if {{paramName}}Txt > {{maximum}} { + {{/isString}} + {{^isString}} + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} > {{maximum}} { + {{/isString}} + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be less than {{maximum}}") + } + {{/maximum}} + {{/required}} + {{/allParams}} + + {{#queryParams}} + {{#required}} + {{#isCollectionFormatMulti}} + { + t := *r.{{paramName}} + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + } else { + localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + } + {{/isCollectionFormatMulti}} + {{^isCollectionFormatMulti}} + localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + {{/isCollectionFormatMulti}} + {{/required}} + {{^required}} + if r.{{paramName}} != nil { + {{#isCollectionFormatMulti}} + t := *r.{{paramName}} + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + } else { + localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } + {{/isCollectionFormatMulti}} + {{^isCollectionFormatMulti}} + localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + {{/isCollectionFormatMulti}} + } + {{/required}} + {{/queryParams}} + // to determine the Content-Type header +{{=<% %>=}} + localVarHTTPContentTypes := []string{<%#consumes%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/consumes%>} +<%={{ }}=%> + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header +{{=<% %>=}} + localVarHTTPHeaderAccepts := []string{<%#produces%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/produces%>} +<%={{ }}=%> + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } +{{#headerParams}} + {{#required}} + localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + {{/required}} + {{^required}} + if r.{{paramName}} != nil { + localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + } + {{/required}} +{{/headerParams}} +{{#formParams}} +{{#isFile}} + localVarFormFileName = "{{baseName}}" +{{#required}} + localVarFile := *r.{{paramName}} +{{/required}} +{{^required}} + var localVarFile {{dataType}} + if r.{{paramName}} != nil { + localVarFile = *r.{{paramName}} + } +{{/required}} + if localVarFile != nil { + fbs, _ := _ioutil.ReadAll(localVarFile) + localVarFileBytes = fbs + localVarFileName = localVarFile.Name() + localVarFile.Close() + } +{{/isFile}} +{{^isFile}} +{{#required}} + localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) +{{/required}} +{{^required}} +{{#isModel}} + if r.{{paramName}} != nil { + paramJson, err := parameterToJson(*r.{{paramName}}) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err + } + localVarFormParams.Add("{{baseName}}", paramJson) + } +{{/isModel}} +{{^isModel}} + if r.{{paramName}} != nil { + localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + } +{{/isModel}} +{{/required}} +{{/isFile}} +{{/formParams}} +{{#bodyParams}} + // body params + localVarPostBody = r.{{paramName}} +{{/bodyParams}} +{{#authMethods}} +{{#isApiKey}} +{{^isKeyInCookie}} + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + {{#vendorExtensions.x-auth-id-alias}} + if apiKey, ok := auth["{{.}}"]; ok { + var key string + if prefix, ok := auth["{{name}}"]; ok && prefix.Prefix != "" { + key = prefix.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + {{/vendorExtensions.x-auth-id-alias}} + {{^vendorExtensions.x-auth-id-alias}} + if apiKey, ok := auth["{{name}}"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + {{/vendorExtensions.x-auth-id-alias}} + {{#isKeyInHeader}} + localVarHeaderParams["{{keyParamName}}"] = key + {{/isKeyInHeader}} + {{#isKeyInQuery}} + localVarQueryParams.Add("{{keyParamName}}", key) + {{/isKeyInQuery}} + } + } + } +{{/isKeyInCookie}} +{{/isApiKey}} +{{/authMethods}} + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + {{#responses}} + {{#dataType}} + {{^is1xx}} + {{^is2xx}} + {{^wildcard}} + if localVarHTTPResponse.StatusCode == {{{code}}} { + {{/wildcard}} + var v {{{dataType}}} + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + } + newErr.model = v + {{^-last}} + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + {{/-last}} + {{^wildcard}} + } + {{/wildcard}} + {{/is2xx}} + {{/is1xx}} + {{/dataType}} + {{/responses}} + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + } + + {{#returnType}} + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr + } + + {{/returnType}} + return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, nil +} +{{/operation}} +{{/operations}} diff --git a/gen/templates/api_doc.mustache b/gen/templates/api_doc.mustache new file mode 100644 index 0000000..458465f --- /dev/null +++ b/gen/templates/api_doc.mustache @@ -0,0 +1,92 @@ +# {{invokerPackage}}\{{classname}}{{#description}} + +{{description}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{{operationId}}} + +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}(ctx{{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() + +{{{summary}}}{{#notes}} + +{{{unespacedNotes}}}{{/notes}} + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" +{{#vendorExtensions.x-go-import}} +{{{vendorExtensions.x-go-import}}} +{{/vendorExtensions.x-go-import}} + {{goImportAlias}} "./openapi" +) + +func main() { + {{#allParams}} + {{paramName}} := {{{vendorExtensions.x-go-example}}} // {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + {{/allParams}} + + configuration := {{goImportAlias}}.NewConfiguration() + api_client := {{goImportAlias}}.NewAPIClient(configuration) + resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + {{#returnType}} + // response from `{{operationId}}`: {{{.}}} + fmt.Fprintf(os.Stdout, "Response from `{{classname}}.{{operationId}}`: %v\n", resp) + {{/returnType}} +} +``` + +### Path Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#pathParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/pathParams}}{{#pathParams}} +**{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/pathParams}} + +### Other Parameters + +Other parameters are passed through a pointer to a api{{{nickname}}}Request struct via the builder pattern +{{#allParams}}{{#-last}} + +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} +{{^isPathParam}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**[]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**map[string]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/isContainer}} | {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/isPathParam}}{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}} (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + +{{/operation}} +{{/operations}} diff --git a/gen/templates/client.mustache b/gen/templates/client.mustache new file mode 100644 index 0000000..61b7679 --- /dev/null +++ b/gen/templates/client.mustache @@ -0,0 +1,576 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" + {{#withAWSV4Signature}} + awsv4 "github.com/aws/aws-sdk-go/aws/signer/v4" + awscredentials "github.com/aws/aws-sdk-go/aws/credentials" + {{/withAWSV4Signature}} +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the {{appName}} API v{{version}} +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services +{{#apiInfo}} +{{#apis}} +{{#operations}} + + {{#generateInterfaces}} + {{classname}} {{classname}} + {{/generateInterfaces}} + {{^generateInterfaces}} + {{classname}} *{{classname}}Service + {{/generateInterfaces}} +{{/operations}} +{{/apis}} +{{/apiInfo}} +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + +{{#apiInfo}} + // API Services +{{#apis}} +{{#operations}} + c.{{classname}} = (*{{classname}}Service)(&c.common) +{{/operations}} +{{/apis}} +{{/apiInfo}} + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFileName string, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + {{#withAWSV4Signature}} + // AWS Signature v4 Authentication + if auth, ok := ctx.Value(ContextAWSv4).(AWSv4); ok { + creds := awscredentials.NewStaticCredentials(auth.AccessKey, auth.SecretKey, "") + signer := awsv4.NewSigner(creds) + var reader *strings.Reader + if body == nil { + reader = strings.NewReader("") + } else { + reader = strings.NewReader(body.String()) + } + timestamp := time.Now() + _, err := signer.Sign(localVarRequest, reader, "oapi", "eu-west-2", timestamp) + if err != nil { + return nil, err + } + } + {{/withAWSV4Signature}} + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } +{{#hasHttpSignatureMethods}} + if ctx != nil { + // HTTP Signature Authentication. All request headers must be set (including default headers) + // because the headers may be included in the signature. + if auth, ok := ctx.Value(ContextHttpSignatureAuth).(HttpSignatureAuth); ok { + err = SignRequest(ctx, localVarRequest, auth) + if err != nil { + return nil, err + } + } + } +{{/hasHttpSignatureMethods}} + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{GetActualInstance() interface{}}); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{UnmarshalJSON([]byte) error}); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err!= nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/gen/templates/configuration.mustache b/gen/templates/configuration.mustache new file mode 100644 index 0000000..1f5436d --- /dev/null +++ b/gen/templates/configuration.mustache @@ -0,0 +1,303 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + {{#withAWSV4Signature}} + // ContextAWSv4 takes an Access Key and a Secret Key for signing AWS Signature v4 + ContextAWSv4 = contextKey("awsv4") + + {{/withAWSV4Signature}} + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +{{#withAWSV4Signature}} +// AWSv4 provides AWS Signature to a request passed via context using ContextAWSv4 +// https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +type AWSv4 struct { + AccessKey string + SecretKey string +} + +{{/withAWSV4Signature}} +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/go{{/httpUserAgent}}", + Debug: false, + {{#servers}} + {{#-first}} + Servers: ServerConfigurations{ + {{/-first}} + { + URL: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} + }, + {{#-last}} + }, + {{/-last}} + {{/variables}} + }, + {{#-last}} + }, + {{/-last}} + {{/servers}} + {{#apiInfo}} + OperationServers: map[string]ServerConfigurations{ + {{#apis}} + {{#operations}} + {{#operation}} + {{#servers}} + {{#-first}} + "{{{classname}}}Service.{{{nickname}}}": { + {{/-first}} + { + URL: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} + }, + {{#-last}} + }, + {{/-last}} + {{/variables}} + }, + {{#-last}} + }, + {{/-last}} + {{/servers}} + {{/operation}} + {{/operations}} + {{/apis}} + }, + {{/apiInfo}} + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/gen/templates/git_push.sh.mustache b/gen/templates/git_push.sh.mustache new file mode 100644 index 0000000..8b3f689 --- /dev/null +++ b/gen/templates/git_push.sh.mustache @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="{{{gitHost}}}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="{{{gitUserId}}}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="{{{gitRepoId}}}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="{{{releaseNote}}}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/gen/templates/gitignore.mustache b/gen/templates/gitignore.mustache new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/gen/templates/gitignore.mustache @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/gen/templates/go.mod.mustache b/gen/templates/go.mod.mustache new file mode 100644 index 0000000..21fcfde --- /dev/null +++ b/gen/templates/go.mod.mustache @@ -0,0 +1,10 @@ +module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} + +go 1.13 + +require ( + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 + {{#withAWSV4Signature}} + github.com/aws/aws-sdk-go v1.34.14 + {{/withAWSV4Signature}} +) diff --git a/gen/templates/go.sum b/gen/templates/go.sum new file mode 100644 index 0000000..734252e --- /dev/null +++ b/gen/templates/go.sum @@ -0,0 +1,13 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/gen/templates/model.mustache b/gen/templates/model.mustache new file mode 100644 index 0000000..684af1d --- /dev/null +++ b/gen/templates/model.mustache @@ -0,0 +1,20 @@ +{{>partial_header}} +package {{packageName}} + +{{#models}} +import ( + "encoding/json" +{{#imports}} + "{{import}}" +{{/imports}} +) + +{{#model}} +{{#isEnum}} +{{>model_enum}} +{{/isEnum}} +{{^isEnum}} +{{#oneOf}}{{#-first}}{{>model_oneof}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>model_anyof}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>model_simple}}{{/anyOf}}{{/oneOf}} +{{/isEnum}} +{{/model}} +{{/models}} diff --git a/gen/templates/model_anyof.mustache b/gen/templates/model_anyof.mustache new file mode 100644 index 0000000..5dfa753 --- /dev/null +++ b/gen/templates/model_anyof.mustache @@ -0,0 +1,76 @@ +// {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} +type {{classname}} struct { + {{#anyOf}} + {{{.}}} *{{{.}}} + {{/anyOf}} +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *{{classname}}) UnmarshalJSON(data []byte) error { + var err error + {{#isNullable}} + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + {{/isNullable}} + {{#discriminator}} + {{#mappedModels}} + {{#-first}} + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err := json.Unmarshal(data, &jsonDict) + if err != nil { + return fmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.") + } + + {{/-first}} + // check if the discriminator value is '{{{mappingName}}}' + if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" { + // try to unmarshal JSON data into {{{modelName}}} + err = json.Unmarshal(data, &dst.{{{modelName}}}); + if err == nil { + json{{{modelName}}}, _ := json.Marshal(dst.{{{modelName}}}) + if string(json{{{modelName}}}) == "{}" { // empty struct + dst.{{{modelName}}} = nil + } else { + return nil // data stored in dst.{{{modelName}}}, return on the first match + } + } else { + dst.{{{modelName}}} = nil + } + } + + {{/mappedModels}} + {{/discriminator}} + {{#anyOf}} + // try to unmarshal JSON data into {{{.}}} + err = json.Unmarshal(data, &dst.{{{.}}}); + if err == nil { + json{{{.}}}, _ := json.Marshal(dst.{{{.}}}) + if string(json{{{.}}}) == "{}" { // empty struct + dst.{{{.}}} = nil + } else { + return nil // data stored in dst.{{{.}}}, return on the first match + } + } else { + dst.{{{.}}} = nil + } + + {{/anyOf}} + return fmt.Errorf("Data failed to match schemas in anyOf({{classname}})") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *{{classname}}) MarshalJSON() ([]byte, error) { +{{#anyOf}} + if src.{{{.}}} != nil { + return json.Marshal(&src.{{{.}}}) + } + +{{/anyOf}} + return nil, nil // no data in anyOf schemas +} + +{{>nullable_model}} diff --git a/gen/templates/model_doc.mustache b/gen/templates/model_doc.mustache new file mode 100644 index 0000000..439e695 --- /dev/null +++ b/gen/templates/model_doc.mustache @@ -0,0 +1,97 @@ +{{#models}}{{#model}}# {{classname}} + +{{^isEnum}} +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#vendorExtensions.x-is-one-of-interface}} +**{{classname}}Interface** | **interface { {{#discriminator}}{{propertyGetter}}() {{propertyType}}{{/discriminator}} }** | An interface that can hold any of the proper implementing types | +{{/vendorExtensions.x-is-one-of-interface}} +{{^vendorExtensions.x-is-one-of-interface}} +{{#vars}}**{{name}}** | {{^required}}Pointer to {{/required}}{{#isContainer}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**[]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{dataType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**map[string]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^isFile}}{{^isDateTime}}[{{/isDateTime}}{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}{{^isDateTime}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isDateTime}}{{/isFile}}{{/isPrimitiveType}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/vars}} +{{/vendorExtensions.x-is-one-of-interface}} + +## Methods + +{{^vendorExtensions.x-is-one-of-interface}} +### New{{classname}} + +`func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}}` + +New{{classname}} instantiates a new {{classname}} 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 + +### New{{classname}}WithDefaults + +`func New{{classname}}WithDefaults() *{{classname}}` + +New{{classname}}WithDefaults instantiates a new {{classname}} 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 + +{{#vars}} +### Get{{name}} + +`func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}}` + +Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. + +### Get{{name}}Ok + +`func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool)` + +Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### Set{{name}} + +`func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}})` + +Set{{name}} sets {{name}} field to given value. + +{{^required}} +### Has{{name}} + +`func (o *{{classname}}) Has{{name}}() bool` + +Has{{name}} returns a boolean if a field has been set. +{{/required}} + +{{#isNullable}} +### Set{{name}}Nil + +`func (o *{{classname}}) Set{{name}}Nil(b bool)` + + Set{{name}}Nil sets the value for {{name}} to be an explicit nil + +### Unset{{name}} +`func (o *{{classname}}) Unset{{name}}()` + +Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil +{{/isNullable}} +{{/vars}} +{{#vendorExtensions.x-implements}} + +### As{{{.}}} + +`func (s *{{classname}}) As{{{.}}}() {{{.}}}` + +Convenience method to wrap this instance of {{classname}} in {{{.}}} +{{/vendorExtensions.x-implements}} +{{/vendorExtensions.x-is-one-of-interface}} +{{/isEnum}} +{{#isEnum}} +## Enum + +{{#allowableValues}}{{#enumVars}} +* `{{name}}` (value: `{{{value}}}`) +{{/enumVars}}{{/allowableValues}} +{{/isEnum}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}}{{/models}} diff --git a/gen/templates/model_enum.mustache b/gen/templates/model_enum.mustache new file mode 100644 index 0000000..1d3c224 --- /dev/null +++ b/gen/templates/model_enum.mustache @@ -0,0 +1,71 @@ +// {{{classname}}} {{#description}}{{{.}}}{{/description}}{{^description}}the model '{{{classname}}}'{{/description}} +type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} + +// List of {{{name}}} +const ( + {{#allowableValues}} + {{#enumVars}} + {{^-first}} + {{/-first}} + {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}} + {{/enumVars}} + {{/allowableValues}} +) + +func (v *{{{classname}}}) UnmarshalJSON(src []byte) error { + var value {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := {{{classname}}}(value) + for _, existing := range []{{classname}}{ {{#allowableValues}}{{#enumVars}}{{{value}}}, {{/enumVars}} {{/allowableValues}} } { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid {{classname}}", value) +} + +// Ptr returns reference to {{{name}}} value +func (v {{{classname}}}) Ptr() *{{{classname}}} { + return &v +} + +type Nullable{{{classname}}} struct { + value *{{{classname}}} + isSet bool +} + +func (v Nullable{{classname}}) Get() *{{classname}} { + return v.value +} + +func (v *Nullable{{classname}}) Set(val *{{classname}}) { + v.value = val + v.isSet = true +} + +func (v Nullable{{classname}}) IsSet() bool { + return v.isSet +} + +func (v *Nullable{{classname}}) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} { + return &Nullable{{classname}}{value: val, isSet: true} +} + +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/templates/model_oneof.mustache b/gen/templates/model_oneof.mustache new file mode 100644 index 0000000..a0322e3 --- /dev/null +++ b/gen/templates/model_oneof.mustache @@ -0,0 +1,109 @@ +// {{classname}} - {{#description}}{{{description}}}{{/description}}{{^description}}struct for {{{classname}}}{{/description}} +type {{classname}} struct { + {{#oneOf}} + {{{.}}} *{{{.}}} + {{/oneOf}} +} + +{{#oneOf}} +// {{{.}}}As{{classname}} is a convenience function that returns {{{.}}} wrapped in {{classname}} +func {{{.}}}As{{classname}}(v *{{{.}}}) {{classname}} { + return {{classname}}{ {{{.}}}: v} +} + +{{/oneOf}} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *{{classname}}) UnmarshalJSON(data []byte) error { + var err error + {{#isNullable}} + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + {{/isNullable}} + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{#mappedModels}} + {{#-first}} + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = json.Unmarshal(data, &jsonDict) + if err != nil { + return fmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.") + } + + {{/-first}} + // check if the discriminator value is '{{{mappingName}}}' + if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" { + // try to unmarshal JSON data into {{{modelName}}} + err = json.Unmarshal(data, &dst.{{{modelName}}}) + if err == nil { + return nil // data stored in dst.{{{modelName}}}, return on the first match + } else { + dst.{{{modelName}}} = nil + return fmt.Errorf("Failed to unmarshal {{classname}} as {{{modelName}}}: %s", err.Error()) + } + } + + {{/mappedModels}} + {{/discriminator}} + return nil + {{/useOneOfDiscriminatorLookup}} + {{^useOneOfDiscriminatorLookup}} + match := 0 + {{#oneOf}} + // try to unmarshal data into {{{.}}} + err = json.Unmarshal(data, &dst.{{{.}}}) + if err == nil { + json{{{.}}}, _ := json.Marshal(dst.{{{.}}}) + if string(json{{{.}}}) == "{}" { // empty struct + dst.{{{.}}} = nil + } else { + match++ + } + } else { + dst.{{{.}}} = nil + } + + {{/oneOf}} + if match > 1 { // more than 1 match + // reset to nil + {{#oneOf}} + dst.{{{.}}} = nil + {{/oneOf}} + + return fmt.Errorf("Data matches more than one schema in oneOf({{classname}})") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf({{classname}})") + } + {{/useOneOfDiscriminatorLookup}} +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src {{classname}}) MarshalJSON() ([]byte, error) { +{{#oneOf}} + if src.{{{.}}} != nil { + return json.Marshal(&src.{{{.}}}) + } + +{{/oneOf}} + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *{{classname}}) GetActualInstance() (interface{}) { +{{#oneOf}} + if obj.{{{.}}} != nil { + return obj.{{{.}}} + } + +{{/oneOf}} + // all schemas are nil + return nil +} + +{{>nullable_model}} diff --git a/gen/templates/model_simple.mustache b/gen/templates/model_simple.mustache new file mode 100644 index 0000000..54878e7 --- /dev/null +++ b/gen/templates/model_simple.mustache @@ -0,0 +1,391 @@ +// {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} +type {{classname}} struct { +{{#parent}} +{{^isMap}} +{{^isArray}} + {{{parent}}} +{{/isArray}} +{{/isMap}} +{{#isArray}} + Items {{{parent}}} +{{/isArray}} +{{/parent}} +{{#vars}} +{{^-first}} +{{/-first}} +{{#description}} + // {{{description}}} +{{/description}} + {{name}} {{^required}}{{^isNullable}}*{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` +{{/vars}} +{{#isAdditionalPropertiesTrue}} + AdditionalProperties map[string]interface{} +{{/isAdditionalPropertiesTrue}} +} + +{{#isAdditionalPropertiesTrue}} +type _{{{classname}}} {{{classname}}} + +{{/isAdditionalPropertiesTrue}} +// New{{classname}} instantiates a new {{classname}} 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 New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}} { + this := {{classname}}{} +{{#vars}} +{{#required}} + this.{{name}} = {{nameInCamelCase}} +{{/required}} +{{^required}} +{{#defaultValue}} +{{^vendorExtensions.x-golang-is-container}} +{{#isNullable}} + var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} + this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) +{{/isNullable}} +{{^isNullable}} + var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} + this.{{name}} = &{{nameInCamelCase}} +{{/isNullable}} +{{/vendorExtensions.x-golang-is-container}} +{{/defaultValue}} +{{/required}} +{{/vars}} + return &this +} + +// New{{classname}}WithDefaults instantiates a new {{classname}} 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 New{{classname}}WithDefaults() *{{classname}} { + this := {{classname}}{} +{{#vars}} +{{#defaultValue}} +{{^vendorExtensions.x-golang-is-container}} +{{#isNullable}} +{{!we use datatypeWithEnum here, since it will represent the non-nullable name of the datatype, e.g. int64 for NullableInt64}} + var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} + this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) +{{/isNullable}} +{{^isNullable}} + var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} + this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{/isNullable}} +{{/vendorExtensions.x-golang-is-container}} +{{/defaultValue}} +{{/vars}} + return &this +} + +{{#vars}} +{{#required}} +// Get{{name}} returns the {{name}} field value +{{#isNullable}} +// If the value is explicit nil, the zero value for {{vendorExtensions.x-go-base-type}} will be returned +{{/isNullable}} +func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { + if o == nil {{#isNullable}}{{^vendorExtensions.x-golang-is-container}}|| o.{{name}}.Get() == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + var ret {{vendorExtensions.x-go-base-type}} + return ret + } + +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return o.{{name}} +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return *o.{{name}}.Get() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return o.{{name}} +{{/isNullable}} +} + +// Get{{name}}Ok returns a tuple with the {{name}} field value +// and a boolean to check if the value has been set. +{{#isNullable}} +// NOTE: If the value is an explicit nil, `nil, true` will be returned +{{/isNullable}} +func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool) { + if o == nil {{#isNullable}}{{#vendorExtensions.x-golang-is-container}}|| o.{{name}} == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + return nil, false + } +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return &o.{{name}}, true +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return o.{{name}}.Get(), o.{{name}}.IsSet() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return &o.{{name}}, true +{{/isNullable}} +} + +// Set{{name}} sets field value +func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + o.{{name}} = v +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + o.{{name}}.Set(&v) +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + o.{{name}} = v +{{/isNullable}} +} + +{{/required}} +{{^required}} +// Get{{name}} returns the {{name}} field value if set, zero value otherwise{{#isNullable}} (both if not set or set to explicit null){{/isNullable}}. +func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { + if o == nil {{^isNullable}}|| o.{{name}} == nil{{/isNullable}}{{#isNullable}}{{^vendorExtensions.x-golang-is-container}}|| o.{{name}}.Get() == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + var ret {{vendorExtensions.x-go-base-type}} + return ret + } +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return o.{{name}} +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return *o.{{name}}.Get() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return *o.{{name}} +{{/isNullable}} +} + +// Get{{name}}Ok returns a tuple with the {{name}} field value if set, nil otherwise +// and a boolean to check if the value has been set. +{{#isNullable}} +// NOTE: If the value is an explicit nil, `nil, true` will be returned +{{/isNullable}} +func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool) { + if o == nil {{^isNullable}}|| o.{{name}} == nil{{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}}|| o.{{name}} == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + return nil, false + } +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + return &o.{{name}}, true +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + return o.{{name}}.Get(), o.{{name}}.IsSet() +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + return o.{{name}}, true +{{/isNullable}} +} + +// Has{{name}} returns a boolean if a field has been set. +func (o *{{classname}}) Has{{name}}() bool { + if o != nil && {{^isNullable}}o.{{name}} != nil{{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}}o.{{name}} != nil{{/vendorExtensions.x-golang-is-container}}{{^vendorExtensions.x-golang-is-container}}o.{{name}}.IsSet(){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { + return true + } + + return false +} + +// Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. +func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { +{{#isNullable}} +{{#vendorExtensions.x-golang-is-container}} + o.{{name}} = v +{{/vendorExtensions.x-golang-is-container}} +{{^vendorExtensions.x-golang-is-container}} + o.{{name}}.Set(&v) +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} +{{^isNullable}} + o.{{name}} = &v +{{/isNullable}} +} +{{#isNullable}} +{{^vendorExtensions.x-golang-is-container}} +// Set{{name}}Nil sets the value for {{name}} to be an explicit nil +func (o *{{classname}}) Set{{name}}Nil() { + o.{{name}}.Set(nil) +} + +// Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil +func (o *{{classname}}) Unset{{name}}() { + o.{{name}}.Unset() +} +{{/vendorExtensions.x-golang-is-container}} +{{/isNullable}} + +{{/required}} +{{/vars}} +func (o {{classname}}) MarshalJSON() ([]byte, error) { + toSerialize := {{#isArray}}make([]interface{}, len(o.Items)){{/isArray}}{{^isArray}}map[string]interface{}{}{{/isArray}} + {{#parent}} + {{^isMap}} + {{^isArray}} + serialized{{parent}}, err{{parent}} := json.Marshal(o.{{parent}}) + if err{{parent}} != nil { + return []byte{}, err{{parent}} + } + err{{parent}} = json.Unmarshal([]byte(serialized{{parent}}), &toSerialize) + if err{{parent}} != nil { + return []byte{}, err{{parent}} + } + {{/isArray}} + {{/isMap}} + {{#isArray}} + for i, item := range o.Items { + toSerialize[i] = item + } + {{/isArray}} + {{/parent}} + {{#vars}} + {{! if argument is nullable, only serialize it if it is set}} + {{#isNullable}} + {{#vendorExtensions.x-golang-is-container}} + {{! support for container fields is not ideal at this point because of lack of Nullable* types}} + if o.{{name}} != nil { + toSerialize["{{baseName}}"] = o.{{name}} + } + {{/vendorExtensions.x-golang-is-container}} + {{^vendorExtensions.x-golang-is-container}} + if {{#required}}true{{/required}}{{^required}}o.{{name}}.IsSet(){{/required}} { + toSerialize["{{baseName}}"] = o.{{name}}.Get() + } + {{/vendorExtensions.x-golang-is-container}} + {{/isNullable}} + {{! if argument is not nullable, don't set it if it is nil}} + {{^isNullable}} + if {{#required}}true{{/required}}{{^required}}o.{{name}} != nil{{/required}} { + toSerialize["{{baseName}}"] = o.{{name}} + } + {{/isNullable}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + {{/isAdditionalPropertiesTrue}} + return json.Marshal(toSerialize) +} + +{{#isAdditionalPropertiesTrue}} +func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { +{{#parent}} +{{^isMap}} + type {{classname}}WithoutEmbeddedStruct struct { + {{#vars}} + {{^-first}} + {{/-first}} + {{#description}} + // {{{description}}} + {{/description}} + {{name}} {{^required}}{{^isNullable}}*{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` + {{/vars}} + } + + var{{{classname}}}WithoutEmbeddedStruct := {{{classname}}}WithoutEmbeddedStruct{} + + err = json.Unmarshal(bytes, &var{{{classname}}}WithoutEmbeddedStruct) + if err == nil { + var{{{classname}}} := _{{{classname}}}{} + {{#vars}} + var{{{classname}}}.{{{name}}} = var{{{classname}}}WithoutEmbeddedStruct.{{{name}}} + {{/vars}} + *o = {{{classname}}}(var{{{classname}}}) + } else { + return err + } + + var{{{classname}}} := _{{{classname}}}{} + + err = json.Unmarshal(bytes, &var{{{classname}}}) + if err == nil { + o.{{{parent}}} = var{{{classname}}}.{{{parent}}} + } else { + return err + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + {{#vars}} + delete(additionalProperties, "{{{baseName}}}") + {{/vars}} + + // remove fields from embedded structs + reflect{{{parent}}} := reflect.ValueOf(o.{{{parent}}}) + for i := 0; i < reflect{{{parent}}}.Type().NumField(); i++ { + t := reflect{{{parent}}}.Type().Field(i) + + if jsonTag := t.Tag.Get("json"); jsonTag != "" { + fieldName := "" + if commaIdx := strings.Index(jsonTag, ","); commaIdx > 0 { + fieldName = jsonTag[:commaIdx] + } else { + fieldName = jsonTag + } + if fieldName != "AdditionalProperties" { + delete(additionalProperties, fieldName) + } + } + } + + o.AdditionalProperties = additionalProperties + } + + return err +{{/isMap}} +{{#isMap}} + var{{{classname}}} := _{{{classname}}}{} + + if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil { + *o = {{{classname}}}(var{{{classname}}}) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + {{#vars}} + delete(additionalProperties, "{{{baseName}}}") + {{/vars}} + o.AdditionalProperties = additionalProperties + } + + return err +{{/isMap}} +{{/parent}} +{{^parent}} + var{{{classname}}} := _{{{classname}}}{} + + if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil { + *o = {{{classname}}}(var{{{classname}}}) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + {{#vars}} + delete(additionalProperties, "{{{baseName}}}") + {{/vars}} + o.AdditionalProperties = additionalProperties + } + + return err +{{/parent}} +} + +{{/isAdditionalPropertiesTrue}} +{{#isArray}} +func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { + return json.Unmarshal(bytes, &o.Items) +} + +{{/isArray}} +{{>nullable_model}} diff --git a/gen/templates/nullable_model.mustache b/gen/templates/nullable_model.mustache new file mode 100644 index 0000000..20d3576 --- /dev/null +++ b/gen/templates/nullable_model.mustache @@ -0,0 +1,35 @@ +type Nullable{{{classname}}} struct { + value *{{{classname}}} + isSet bool +} + +func (v Nullable{{classname}}) Get() *{{classname}} { + return v.value +} + +func (v *Nullable{{classname}}) Set(val *{{classname}}) { + v.value = val + v.isSet = true +} + +func (v Nullable{{classname}}) IsSet() bool { + return v.isSet +} + +func (v *Nullable{{classname}}) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} { + return &Nullable{{classname}}{value: val, isSet: true} +} + +func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/templates/openapi.mustache b/gen/templates/openapi.mustache new file mode 100644 index 0000000..51ebafb --- /dev/null +++ b/gen/templates/openapi.mustache @@ -0,0 +1 @@ +{{{openapi-yaml}}} \ No newline at end of file diff --git a/gen/templates/partial_header.mustache b/gen/templates/partial_header.mustache new file mode 100644 index 0000000..ee1ead4 --- /dev/null +++ b/gen/templates/partial_header.mustache @@ -0,0 +1,18 @@ +/* + {{#appName}} + * {{{appName}}} + * + {{/appName}} + {{#appDescription}} + * {{{appDescription}}} + * + {{/appDescription}} + {{#version}} + * API version: {{{version}}} + {{/version}} + {{#infoEmail}} + * Contact: {{{infoEmail}}} + {{/infoEmail}} + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/templates/response.mustache b/gen/templates/response.mustache new file mode 100644 index 0000000..1a8765b --- /dev/null +++ b/gen/templates/response.mustache @@ -0,0 +1,38 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResonse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/gen/templates/signing.mustache b/gen/templates/signing.mustache new file mode 100644 index 0000000..22477a0 --- /dev/null +++ b/gen/templates/signing.mustache @@ -0,0 +1,430 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "crypto" + "crypto/ecdsa" + "crypto/ed25519" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/textproto" + "os" + "strings" + "time" +) + +const ( + // Constants for HTTP signature parameters. + // The '(request-target)' parameter concatenates the lowercased :method, an + // ASCII space, and the :path pseudo-headers. + HttpSignatureParameterRequestTarget string = "(request-target)" + // The '(created)' parameter expresses when the signature was + // created. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterCreated string = "(created)" + // The '(expires)' parameter expresses when the signature ceases to + // be valid. The value MUST be a Unix timestamp integer value. + HttpSignatureParameterExpires string = "(expires)" +) + +const ( + // Constants for HTTP headers. + // The 'Host' header, as defined in RFC 2616, section 14.23. + HttpHeaderHost string = "Host" + // The 'Date' header. + HttpHeaderDate string = "Date" + // The digest header, as defined in RFC 3230, section 4.3.2. + HttpHeaderDigest string = "Digest" + // The HTTP Authorization header, as defined in RFC 7235, section 4.2. + HttpHeaderAuthorization string = "Authorization" +) + +const ( + // Specifies the Digital Signature Algorithm is derived from metadata + // associated with 'keyId'. Supported DSA algorithms are RSASSA-PKCS1-v1_5, + // RSASSA-PSS, and ECDSA. + // The hash is SHA-512. + // This is the default value. + HttpSigningSchemeHs2019 string = "hs2019" + // Use RSASSA-PKCS1-v1_5 with SHA-512 hash. Deprecated. + HttpSigningSchemeRsaSha512 string = "rsa-sha512" + // Use RSASSA-PKCS1-v1_5 with SHA-256 hash. Deprecated. + HttpSigningSchemeRsaSha256 string = "rsa-sha256" + + // RFC 8017 section 7.2 + // Calculate the message signature using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5. + // PKCSV1_5 is deterministic. The same message and key will produce an identical + // signature value each time. + HttpSigningAlgorithmRsaPKCS1v15 string = "RSASSA-PKCS1-v1_5" + // Calculate the message signature using probabilistic signature scheme RSASSA-PSS. + // PSS is randomized and will produce a different signature value each time. + HttpSigningAlgorithmRsaPSS string = "RSASSA-PSS" +) + +var supportedSigningSchemes = map[string]bool{ + HttpSigningSchemeHs2019: true, + HttpSigningSchemeRsaSha512: true, + HttpSigningSchemeRsaSha256: true, +} + + +// HttpSignatureAuth provides HTTP signature authentication to a request passed +// via context using ContextHttpSignatureAuth. +// An 'Authorization' header is calculated by creating a hash of select headers, +// and optionally the body of the HTTP request, then signing the hash value using +// a private key which is available to the client. +// +// SignedHeaders specifies the list of HTTP headers that are included when generating +// the message signature. +// The two special signature headers '(request-target)' and '(created)' SHOULD be +// included in SignedHeaders. +// The '(created)' header expresses when the signature was created. +// The '(request-target)' header is a concatenation of the lowercased :method, an +// ASCII space, and the :path pseudo-headers. +// +// For example, SignedHeaders can be set to: +// (request-target) (created) date host digest +// +// When SignedHeaders is not specified, the client defaults to a single value, '(created)', +// in the list of HTTP headers. +// When SignedHeaders contains the 'Digest' value, the client performs the following operations: +// 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. +// 2. Set the 'Digest' header in the request body. +// 3. Include the 'Digest' header and value in the HTTP signature. +type HttpSignatureAuth struct { + KeyId string // A key identifier. + PrivateKeyPath string // The path to the private key. + Passphrase string // The passphrase to decrypt the private key, if the key is encrypted. + SigningScheme string // The signature scheme, when signing HTTP requests. Supported value is 'hs2019'. + // The signature algorithm, when signing HTTP requests. + // Supported values are RSASSA-PKCS1-v1_5, RSASSA-PSS. + SigningAlgorithm string + SignedHeaders []string // A list of HTTP headers included when generating the signature for the message. + // SignatureMaxValidity specifies the maximum duration of the signature validity. + // The value is used to set the '(expires)' signature parameter in the HTTP request. + // '(expires)' is set to '(created)' plus the value of the SignatureMaxValidity field. + // To specify the '(expires)' signature parameter, set 'SignatureMaxValidity' and add '(expires)' to 'SignedHeaders'. + SignatureMaxValidity time.Duration + privateKey crypto.PrivateKey // The private key used to sign HTTP requests. +} + +// SetPrivateKey accepts a private key string and sets it. +func (h *HttpSignatureAuth) SetPrivateKey(privateKey string) error { + return h.parsePrivateKey([]byte(privateKey)) +} + +// ContextWithValue validates the HttpSignatureAuth configuration parameters and returns a context +// suitable for HTTP signature. An error is returned if the HttpSignatureAuth configuration parameters +// are invalid. +func (h *HttpSignatureAuth) ContextWithValue(ctx context.Context) (context.Context, error) { + if h.KeyId == "" { + return nil, fmt.Errorf("Key ID must be specified") + } + if h.PrivateKeyPath == "" && h.privateKey == nil { + return nil, fmt.Errorf("Private key path must be specified") + } + if _, ok := supportedSigningSchemes[h.SigningScheme]; !ok { + return nil, fmt.Errorf("Invalid signing scheme: '%v'", h.SigningScheme) + } + m := make(map[string]bool) + for _, h := range h.SignedHeaders { + if strings.ToLower(h) == strings.ToLower(HttpHeaderAuthorization) { + return nil, fmt.Errorf("Signed headers cannot include the 'Authorization' header") + } + m[h] = true + } + if len(m) != len(h.SignedHeaders) { + return nil, fmt.Errorf("List of signed headers cannot have duplicate names") + } + if h.SignatureMaxValidity < 0 { + return nil, fmt.Errorf("Signature max validity must be a positive value") + } + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + return context.WithValue(ctx, ContextHttpSignatureAuth, *h), nil +} + +// GetPublicKey returns the public key associated with this HTTP signature configuration. +func (h *HttpSignatureAuth) GetPublicKey() (crypto.PublicKey, error) { + if h.privateKey == nil { + if err := h.loadPrivateKey(); err != nil { + return nil, err + } + } + switch key := h.privateKey.(type) { + case *rsa.PrivateKey: + return key.Public(), nil + case *ecdsa.PrivateKey: + return key.Public(), nil + default: + // Do not change '%T' to anything else such as '%v'! + // The value of the private key must not be returned. + return nil, fmt.Errorf("Unsupported key: %T", h.privateKey) + } +} + +// loadPrivateKey reads the private key from the file specified in the HttpSignatureAuth. +// The key is loaded only when privateKey is not already set. +func (h *HttpSignatureAuth) loadPrivateKey() (err error) { + if h.privateKey != nil { + return nil + } + var file *os.File + file, err = os.Open(h.PrivateKeyPath) + if err != nil { + return fmt.Errorf("Cannot load private key '%s'. Error: %v", h.PrivateKeyPath, err) + } + defer func() { + err = file.Close() + }() + var priv []byte + priv, err = ioutil.ReadAll(file) + if err != nil { + return err + } + return h.parsePrivateKey(priv) +} + +// parsePrivateKey decodes privateKey byte array to crypto.PrivateKey type. +func (h *HttpSignatureAuth) parsePrivateKey(priv []byte) error { + pemBlock, _ := pem.Decode(priv) + if pemBlock == nil { + // No PEM data has been found. + return fmt.Errorf("File '%s' does not contain PEM data", h.PrivateKeyPath) + } + var privKey []byte + var err error + if x509.IsEncryptedPEMBlock(pemBlock) { + // The PEM data is encrypted. + privKey, err = x509.DecryptPEMBlock(pemBlock, []byte(h.Passphrase)) + if err != nil { + // Failed to decrypt PEM block. Because of deficiencies in the encrypted-PEM format, + // it's not always possibleto detect an incorrect password. + return err + } + } else { + privKey = pemBlock.Bytes + } + switch pemBlock.Type { + case "RSA PRIVATE KEY": + if h.privateKey, err = x509.ParsePKCS1PrivateKey(privKey); err != nil { + return err + } + case "EC PRIVATE KEY", "PRIVATE KEY": + // https://tools.ietf.org/html/rfc5915 section 4. + if h.privateKey, err = x509.ParsePKCS8PrivateKey(privKey); err != nil { + return err + } + default: + return fmt.Errorf("Key '%s' is not supported", pemBlock.Type) + } + return nil +} + +// SignRequest signs the request using HTTP signature. +// See https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ +// +// Do not add, remove or change headers that are included in the SignedHeaders +// after SignRequest has been invoked; this is because the header values are +// included in the signature. Any subsequent alteration will cause a signature +// verification failure. +// If there are multiple instances of the same header field, all +// header field values associated with the header field MUST be +// concatenated, separated by a ASCII comma and an ASCII space +// ', ', and used in the order in which they will appear in the +// transmitted HTTP message. +func SignRequest( + ctx context.Context, + r *http.Request, + auth HttpSignatureAuth) error { + + if auth.privateKey == nil { + return fmt.Errorf("Private key is not set") + } + now := time.Now() + date := now.UTC().Format(http.TimeFormat) + // The 'created' field expresses when the signature was created. + // The value MUST be a Unix timestamp integer value. See 'HTTP signature' section 2.1.4. + created := now.Unix() + + var h crypto.Hash + var err error + var prefix string + var expiresUnix float64 + + if auth.SignatureMaxValidity < 0 { + return fmt.Errorf("Signature validity must be a positive value") + } + if auth.SignatureMaxValidity > 0 { + e := now.Add(auth.SignatureMaxValidity) + expiresUnix = float64(e.Unix()) + float64(e.Nanosecond()) / float64(time.Second) + } + // Determine the cryptographic hash to be used for the signature and the body digest. + switch auth.SigningScheme { + case HttpSigningSchemeRsaSha512, HttpSigningSchemeHs2019: + h = crypto.SHA512 + prefix = "SHA-512=" + case HttpSigningSchemeRsaSha256: + // This is deprecated and should no longer be used. + h = crypto.SHA256 + prefix = "SHA-256=" + default: + return fmt.Errorf("Unsupported signature scheme: %v", auth.SigningScheme) + } + if !h.Available() { + return fmt.Errorf("Hash '%v' is not available", h) + } + + // Build the "(request-target)" signature header. + var sb bytes.Buffer + fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Method), r.URL.EscapedPath()) + if r.URL.RawQuery != "" { + // The ":path" pseudo-header field includes the path and query parts + // of the target URI (the "path-absolute" production and optionally a + // '?' character followed by the "query" production (see Sections 3.3 + // and 3.4 of [RFC3986] + fmt.Fprintf(&sb, "?%s", r.URL.RawQuery) + } + requestTarget := sb.String() + sb.Reset() + + // Build the string to be signed. + signedHeaders := auth.SignedHeaders + if len(signedHeaders) == 0 { + signedHeaders = []string{HttpSignatureParameterCreated} + } + // Validate the list of signed headers has no duplicates. + m := make(map[string]bool) + for _, h := range signedHeaders { + m[h] = true + } + if len(m) != len(signedHeaders) { + return fmt.Errorf("List of signed headers must not have any duplicates") + } + hasCreatedParameter := false + hasExpiresParameter := false + for i, header := range signedHeaders { + header = strings.ToLower(header) + var value string + switch header { + case strings.ToLower(HttpHeaderAuthorization): + return fmt.Errorf("Cannot include the 'Authorization' header as a signed header.") + case HttpSignatureParameterRequestTarget: + value = requestTarget + case HttpSignatureParameterCreated: + value = fmt.Sprintf("%d", created) + hasCreatedParameter = true + case HttpSignatureParameterExpires: + if auth.SignatureMaxValidity.Nanoseconds() == 0 { + return fmt.Errorf("Cannot set '(expires)' signature parameter. SignatureMaxValidity is not configured.") + } + value = fmt.Sprintf("%.3f", expiresUnix) + hasExpiresParameter = true + case "date": + value = date + r.Header.Set(HttpHeaderDate, date) + case "digest": + // Calculate the digest of the HTTP request body. + // Calculate body digest per RFC 3230 section 4.3.2 + bodyHash := h.New() + if r.Body != nil { + // Make a copy of the body io.Reader so that we can read the body to calculate the hash, + // then one more time when marshaling the request. + var body io.Reader + body, err = r.GetBody() + if err != nil { + return err + } + if _, err = io.Copy(bodyHash, body); err != nil { + return err + } + } + d := bodyHash.Sum(nil) + value = prefix + base64.StdEncoding.EncodeToString(d) + r.Header.Set(HttpHeaderDigest, value) + case "host": + value = r.Host + r.Header.Set(HttpHeaderHost, r.Host) + default: + var ok bool + var v []string + canonicalHeader := textproto.CanonicalMIMEHeaderKey(header) + if v, ok = r.Header[canonicalHeader]; !ok { + // If a header specified in the headers parameter cannot be matched with + // a provided header in the message, the implementation MUST produce an error. + return fmt.Errorf("Header '%s' does not exist in the request", canonicalHeader) + } + // If there are multiple instances of the same header field, all + // header field values associated with the header field MUST be + // concatenated, separated by a ASCII comma and an ASCII space + // `, `, and used in the order in which they will appear in the + // transmitted HTTP message. + value = strings.Join(v, ", ") + } + if i > 0 { + fmt.Fprintf(&sb, "\n") + } + fmt.Fprintf(&sb, "%s: %s", header, value) + } + if expiresUnix != 0 && !hasExpiresParameter { + return fmt.Errorf("SignatureMaxValidity is specified, but '(expired)' parameter is not present") + } + msg := []byte(sb.String()) + msgHash := h.New() + if _, err = msgHash.Write(msg); err != nil { + return err + } + d := msgHash.Sum(nil) + + var signature []byte + switch key := auth.privateKey.(type) { + case *rsa.PrivateKey: + switch auth.SigningAlgorithm { + case HttpSigningAlgorithmRsaPKCS1v15: + signature, err = rsa.SignPKCS1v15(rand.Reader, key, h, d) + case "", HttpSigningAlgorithmRsaPSS: + signature, err = rsa.SignPSS(rand.Reader, key, h, d, nil) + default: + return fmt.Errorf("Unsupported signing algorithm: '%s'", auth.SigningAlgorithm) + } + case *ecdsa.PrivateKey: + signature, err = key.Sign(rand.Reader, d, h) + case ed25519.PrivateKey: // requires go 1.13 + signature, err = key.Sign(rand.Reader, msg, crypto.Hash(0)) + default: + return fmt.Errorf("Unsupported private key") + } + if err != nil { + return err + } + + sb.Reset() + for i, header := range signedHeaders { + if i > 0 { + sb.WriteRune(' ') + } + sb.WriteString(strings.ToLower(header)) + } + headers_list := sb.String() + sb.Reset() + fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, auth.KeyId, auth.SigningScheme) + if hasCreatedParameter { + fmt.Fprintf(&sb, "created=%d,", created) + } + if hasExpiresParameter { + fmt.Fprintf(&sb, "expires=%.3f,", expiresUnix) + } + fmt.Fprintf(&sb, `headers="%s",signature="%s"`, headers_list, base64.StdEncoding.EncodeToString(signature)) + authStr := sb.String() + r.Header.Set(HttpHeaderAuthorization, authStr) + return nil +} diff --git a/gen/templates/utils.mustache b/gen/templates/utils.mustache new file mode 100644 index 0000000..fed52d7 --- /dev/null +++ b/gen/templates/utils.mustache @@ -0,0 +1,326 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "encoding/json" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/gen/yarn.lock b/gen/yarn.lock new file mode 100644 index 0000000..3ef3758 --- /dev/null +++ b/gen/yarn.lock @@ -0,0 +1,1878 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@hapi/address@^2.1.2": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" + integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== + +"@hapi/formula@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@hapi/formula/-/formula-1.2.0.tgz#994649c7fea1a90b91a0a1e6d983523f680e10cd" + integrity sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA== + +"@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0": + version "8.5.1" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" + integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== + +"@hapi/joi@^16.1.7": + version "16.1.8" + resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-16.1.8.tgz#84c1f126269489871ad4e2decc786e0adef06839" + integrity sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg== + dependencies: + "@hapi/address" "^2.1.2" + "@hapi/formula" "^1.2.0" + "@hapi/hoek" "^8.2.4" + "@hapi/pinpoint" "^1.0.2" + "@hapi/topo" "^3.1.3" + +"@hapi/pinpoint@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@hapi/pinpoint/-/pinpoint-1.0.2.tgz#025b7a36dbbf4d35bf1acd071c26b20ef41e0d13" + integrity sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ== + +"@hapi/topo@^3.1.3": + version "3.1.6" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" + integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== + dependencies: + "@hapi/hoek" "^8.3.0" + +"@nestjs/common@7.6.14": + version "7.6.14" + resolved "https://registry.yarnpkg.com/@nestjs/common/-/common-7.6.14.tgz#abdad360ef107482345b111eeee74fbef00620c9" + integrity sha512-XJrGoGttCsIOvG2+EXl09pl9iCmYXnhPjx3ndPPigMRdXQGLVpF38OdzroWTD7aYU5rHo3Co21G9cYl8aqdt2Q== + dependencies: + axios "0.21.1" + iterare "1.2.1" + tslib "2.1.0" + uuid "8.3.2" + +"@nestjs/core@7.6.14": + version "7.6.14" + resolved "https://registry.yarnpkg.com/@nestjs/core/-/core-7.6.14.tgz#b3be15506aee33b847abce993a7371439b292dd9" + integrity sha512-iAeQIsC79xcLTpga3he48ROX4g561VFsfbksicqotrFy0k9czKxVtHxevsnwo8KzFsYXQqOCO6XYI8MsuAjMcg== + dependencies: + "@nuxtjs/opencollective" "0.3.2" + fast-safe-stringify "2.0.7" + iterare "1.2.1" + object-hash "2.1.1" + path-to-regexp "3.2.0" + tslib "2.1.0" + uuid "8.3.2" + +"@nuxtjs/opencollective@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz#620ce1044f7ac77185e825e1936115bb38e2681c" + integrity sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA== + dependencies: + chalk "^4.1.0" + consola "^2.15.0" + node-fetch "^2.6.1" + +"@openapitools/openapi-generator-cli@2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.2.2.tgz#12b2171a0404731e35aa89a2e0c146186480f51c" + integrity sha512-Hl0/5bvv/ETYFuPpTPXqAtChHE2+lLrH0ATl8MtNDxtdXRLoQGCeT8jdT600VvCqJToRkNvQ1JPHbcg/hehyBw== + dependencies: + "@nestjs/common" "7.6.14" + "@nestjs/core" "7.6.14" + "@nuxtjs/opencollective" "0.3.2" + chalk "4.1.0" + commander "6.2.1" + compare-versions "3.6.0" + concurrently "5.3.0" + console.table "0.10.0" + fs-extra "9.1.0" + glob "7.1.6" + inquirer "7.3.3" + lodash "4.17.21" + reflect-metadata "0.1.13" + rxjs "6.6.6" + tslib "1.13.0" + +"@sindresorhus/is@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" + integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== + +"@types/hapi__joi@^17.1.0": + version "17.1.6" + resolved "https://registry.yarnpkg.com/@types/hapi__joi/-/hapi__joi-17.1.6.tgz#b84663676aa9753c17183718338dd40ddcbd3754" + integrity sha512-y3A1MzNC0FmzD5+ys59RziE1WqKrL13nxtJgrSzjoO7boue5B7zZD2nZLPwrSuUviFjpKFQtgHYSvhDGfIE4jA== + +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +archive-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70" + integrity sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA= + dependencies: + file-type "^4.2.0" + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +axios@0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bin-build@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" + integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== + dependencies: + decompress "^4.0.0" + download "^6.2.2" + execa "^0.7.0" + p-map-series "^1.0.0" + tempfile "^2.0.0" + +bl@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" + integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + +buffer@^5.2.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +cacheable-request@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" + integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= + dependencies: + clone-response "1.0.2" + get-stream "3.0.0" + http-cache-semantics "3.8.1" + keyv "3.0.0" + lowercase-keys "1.0.0" + normalize-url "2.0.1" + responselike "1.0.2" + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caw@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" + integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== + dependencies: + get-proxy "^2.0.0" + isurl "^1.0.0-alpha5" + tunnel-agent "^0.6.0" + url-to-options "^1.0.1" + +chalk@4.1.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +clone-response@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + +commander@^2.8.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +compare-versions@3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" + integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concurrently@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.3.0.tgz#7500de6410d043c912b2da27de3202cb489b1e7b" + integrity sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ== + dependencies: + chalk "^2.4.2" + date-fns "^2.0.1" + lodash "^4.17.15" + read-pkg "^4.0.1" + rxjs "^6.5.2" + spawn-command "^0.0.2-1" + supports-color "^6.1.0" + tree-kill "^1.2.2" + yargs "^13.3.0" + +config-chain@^1.1.11: + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + +consola@^2.15.0: + version "2.15.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" + integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== + +console.table@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/console.table/-/console.table-0.10.0.tgz#0917025588875befd70cf2eff4bef2c6e2d75d04" + integrity sha1-CRcCVYiHW+/XDPLv9L7yxuLXXQQ= + dependencies: + easy-table "1.1.0" + +content-disposition@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +date-fns@^2.0.1: + version "2.19.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.19.0.tgz#65193348635a28d5d916c43ec7ce6fbd145059e1" + integrity sha512-X3bf2iTPgCAQp9wvjOQytnf5vO5rESYRXlPIVcgSbtT5OTScPcsf9eZU+B/YIkKAtYr5WeCii58BgATrNitlWg== + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" + integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== + dependencies: + file-type "^5.2.0" + is-stream "^1.1.0" + tar-stream "^1.5.2" + +decompress-tarbz2@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" + integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== + dependencies: + decompress-tar "^4.1.0" + file-type "^6.1.0" + is-stream "^1.1.0" + seek-bzip "^1.0.5" + unbzip2-stream "^1.0.9" + +decompress-targz@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" + integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== + dependencies: + decompress-tar "^4.1.1" + file-type "^5.2.0" + is-stream "^1.1.0" + +decompress-unzip@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" + integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + dependencies: + file-type "^3.8.0" + get-stream "^2.2.0" + pify "^2.3.0" + yauzl "^2.4.2" + +decompress@^4.0.0, decompress@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" + integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== + dependencies: + decompress-tar "^4.0.0" + decompress-tarbz2 "^4.0.0" + decompress-targz "^4.0.0" + decompress-unzip "^4.0.1" + graceful-fs "^4.1.10" + make-dir "^1.0.0" + pify "^2.3.0" + strip-dirs "^2.0.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +download@^6.2.2: + version "6.2.5" + resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" + integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== + dependencies: + caw "^2.0.0" + content-disposition "^0.5.2" + decompress "^4.0.0" + ext-name "^5.0.0" + file-type "5.2.0" + filenamify "^2.0.0" + get-stream "^3.0.0" + got "^7.0.0" + make-dir "^1.0.0" + p-event "^1.0.0" + pify "^3.0.0" + +download@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/download/-/download-8.0.0.tgz#afc0b309730811731aae9f5371c9f46be73e51b1" + integrity sha512-ASRY5QhDk7FK+XrQtQyvhpDKanLluEEQtWl/J7Lxuf/b+i8RYh997QeXvL85xitrmRKVlx9c7eTrcRdq2GS4eA== + dependencies: + archive-type "^4.0.0" + content-disposition "^0.5.2" + decompress "^4.2.1" + ext-name "^5.0.0" + file-type "^11.1.0" + filenamify "^3.0.0" + get-stream "^4.1.0" + got "^8.3.1" + make-dir "^2.1.0" + p-event "^2.1.0" + pify "^4.0.1" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +easy-table@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/easy-table/-/easy-table-1.1.0.tgz#86f9ab4c102f0371b7297b92a651d5824bc8cb73" + integrity sha1-hvmrTBAvA3G3KXuSplHVgkvIy3M= + optionalDependencies: + wcwidth ">=1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +ext-list@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" + integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== + dependencies: + mime-db "^1.28.0" + +ext-name@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" + integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== + dependencies: + ext-list "^2.0.0" + sort-keys-length "^1.0.0" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-safe-stringify@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" + integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-type@5.2.0, file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" + integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + +file-type@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-11.1.0.tgz#93780f3fed98b599755d846b99a1617a2ad063b8" + integrity sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g== + +file-type@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + +file-type@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5" + integrity sha1-G2AOX8ofvcboDApwxxyNul95BsU= + +file-type@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" + integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== + +filename-reserved-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" + integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= + +filenamify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" + integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== + dependencies: + filename-reserved-regex "^2.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + +filenamify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-3.0.0.tgz#9603eb688179f8c5d40d828626dcbb92c3a4672c" + integrity sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g== + dependencies: + filename-reserved-regex "^2.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +follow-redirects@^1.10.0: + version "1.13.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" + integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== + +from2@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-proxy@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" + integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== + dependencies: + npm-conf "^1.1.0" + +get-stream@3.0.0, get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +got@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +got@^8.3.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" + integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== + dependencies: + "@sindresorhus/is" "^0.7.0" + cacheable-request "^2.1.1" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + into-stream "^3.1.0" + is-retry-allowed "^1.1.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + mimic-response "^1.0.0" + p-cancelable "^0.4.0" + p-timeout "^2.0.1" + pify "^3.0.0" + safe-buffer "^5.1.1" + timed-out "^4.0.1" + url-parse-lax "^3.0.0" + url-to-options "^1.0.1" + +graceful-fs@^4.1.10, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.6" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + +http-cache-semantics@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +inquirer@7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +into-stream@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" + integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= + dependencies: + from2 "^2.1.1" + p-is-promise "^1.1.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-core-module@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-invalid-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-invalid-path/-/is-invalid-path-0.1.0.tgz#307a855b3cf1a938b44ea70d2c61106053714f34" + integrity sha1-MHqFWzzxqTi0TqcNLGEQYFNxTzQ= + dependencies: + is-glob "^2.0.0" + +is-natural-number@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" + integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-stream@^1.0.0, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-valid-path@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-valid-path/-/is-valid-path-0.1.1.tgz#110f9ff74c37f663e1ec7915eb451f2db93ac9df" + integrity sha1-EQ+f90w39mPh7HkV60UfLbk6yd8= + dependencies: + is-invalid-path "^0.1.0" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +iterare@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/iterare/-/iterare-1.2.1.tgz#139c400ff7363690e33abffa33cbba8920f00042" + integrity sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q== + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +keyv@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" + integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== + dependencies: + json-buffer "3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.19: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lowercase-keys@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= + +lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +mime-db@^1.28.0: + version "1.46.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" + integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-jq@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/node-jq/-/node-jq-1.12.0.tgz#5300765b8211fee6152d565728e0d831841d040f" + integrity sha512-WRFwaguXJ8PAA0s660eRrPoubSOyvu1YsbpXdIMiG8uhnf7g/QgwZPBjDgDBTFL8cptd3rsB5YzofQ8Ff9bTFw== + dependencies: + "@hapi/joi" "^16.1.7" + "@types/hapi__joi" "^17.1.0" + bin-build "^3.0.0" + download "^8.0.0" + is-valid-path "^0.1.1" + strip-eof "^1.0.0" + strip-final-newline "^2.0.0" + tempfile "^3.0.0" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-url@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" + integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== + dependencies: + prepend-http "^2.0.0" + query-string "^5.0.1" + sort-keys "^2.0.0" + +npm-conf@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" + integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== + dependencies: + config-chain "^1.1.11" + pify "^3.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-hash@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.1.1.tgz#9447d0279b4fcf80cff3259bf66a1dc73afabe09" + integrity sha512-VOJmgmS+7wvXf8CjbQmimtCnEx3IAoLxI3fp2fbWehxrWBcAQFbk+vcwb6vzR0VZv/eNCJ/27j151ZTwqW/JeQ== + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" + integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== + +p-event@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" + integrity sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU= + dependencies: + p-timeout "^1.1.1" + +p-event@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" + integrity sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA== + dependencies: + p-timeout "^2.0.1" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" + integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= + +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-map-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" + integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= + dependencies: + p-reduce "^1.0.0" + +p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-timeout@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" + integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== + dependencies: + p-finally "^1.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.2.0.tgz#fa7877ecbc495c601907562222453c43cc204a5f" + integrity sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + +pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +read-pkg@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" + integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= + dependencies: + normalize-package-data "^2.3.2" + parse-json "^4.0.0" + pify "^3.0.0" + +readable-stream@^2.0.0, readable-stream@^2.3.0, readable-stream@^2.3.5: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +reflect-metadata@0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" + integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve@^1.10.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +responselike@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +rxjs@6.6.6, rxjs@^6.5.2, rxjs@^6.6.0: + version "6.6.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.6.tgz#14d8417aa5a07c5e633995b525e1e3c0dec03b70" + integrity sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg== + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +seek-bzip@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" + integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== + dependencies: + commander "^2.8.1" + +"semver@2 || 3 || 4 || 5", semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +sort-keys-length@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" + integrity sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg= + dependencies: + sort-keys "^1.0.0" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= + dependencies: + is-plain-obj "^1.0.0" + +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + dependencies: + is-plain-obj "^1.0.0" + +spawn-command@^0.0.2-1: + version "0.0.2-1" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" + integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-dirs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" + integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== + dependencies: + is-natural-number "^4.0.1" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-outer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" + integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== + dependencies: + escape-string-regexp "^1.0.2" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +tar-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== + dependencies: + bl "^1.0.0" + buffer-alloc "^1.2.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.3.0" + to-buffer "^1.1.1" + xtend "^4.0.0" + +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= + +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + +tempfile@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" + integrity sha1-awRGhWqbERTRhW/8vlCczLCXcmU= + dependencies: + temp-dir "^1.0.0" + uuid "^3.0.1" + +tempfile@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-3.0.0.tgz#5376a3492de7c54150d0cc0612c3f00e2cdaf76c" + integrity sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw== + dependencies: + temp-dir "^2.0.0" + uuid "^3.3.2" + +through@^2.3.6, through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-buffer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== + +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + +trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE= + dependencies: + escape-string-regexp "^1.0.2" + +tslib@1.13.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + +tslib@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + +unbzip2-stream@^1.0.9: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +uuid@8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +uuid@^3.0.1, uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +wcwidth@>=1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yauzl@^2.4.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" diff --git a/go.mod b/go.mod index 3de6564..f981155 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,7 @@ -module github.com/muxinc/mux-go +module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.15 +go 1.13 require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 // indirect - github.com/golang/protobuf v1.3.1 // indirect - golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect - google.golang.org/appengine v1.5.0 // indirect + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 ) diff --git a/go.sum b/go.sum index 91cf9c8..734252e 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,13 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/model_abridged_video_view.go b/model_abridged_video_view.go index b26d647..2f8f5b5 100644 --- a/model_abridged_video_view.go +++ b/model_abridged_video_view.go @@ -1,18 +1,475 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// AbridgedVideoView struct for AbridgedVideoView type AbridgedVideoView struct { - Id string `json:"id,omitempty"` - ViewerOsFamily string `json:"viewer_os_family,omitempty"` - ViewerApplicationName string `json:"viewer_application_name,omitempty"` - VideoTitle string `json:"video_title,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - PlayerErrorMessage string `json:"player_error_message,omitempty"` - PlayerErrorCode string `json:"player_error_code,omitempty"` - ErrorTypeId int32 `json:"error_type_id,omitempty"` - CountryCode string `json:"country_code,omitempty"` - ViewStart string `json:"view_start,omitempty"` - ViewEnd string `json:"view_end,omitempty"` + Id *string `json:"id,omitempty"` + ViewerOsFamily *string `json:"viewer_os_family,omitempty"` + ViewerApplicationName *string `json:"viewer_application_name,omitempty"` + VideoTitle *string `json:"video_title,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + PlayerErrorMessage *string `json:"player_error_message,omitempty"` + PlayerErrorCode *string `json:"player_error_code,omitempty"` + ErrorTypeId *int32 `json:"error_type_id,omitempty"` + CountryCode *string `json:"country_code,omitempty"` + ViewStart *string `json:"view_start,omitempty"` + ViewEnd *string `json:"view_end,omitempty"` +} + +// NewAbridgedVideoView instantiates a new AbridgedVideoView 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 NewAbridgedVideoView() *AbridgedVideoView { + this := AbridgedVideoView{} + return &this +} + +// NewAbridgedVideoViewWithDefaults instantiates a new AbridgedVideoView 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 NewAbridgedVideoViewWithDefaults() *AbridgedVideoView { + this := AbridgedVideoView{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetId() string { + if o == nil || o.Id == nil { + 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 *AbridgedVideoView) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AbridgedVideoView) SetId(v string) { + o.Id = &v +} + +// GetViewerOsFamily returns the ViewerOsFamily field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetViewerOsFamily() string { + if o == nil || o.ViewerOsFamily == nil { + var ret string + return ret + } + return *o.ViewerOsFamily +} + +// GetViewerOsFamilyOk returns a tuple with the ViewerOsFamily field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetViewerOsFamilyOk() (*string, bool) { + if o == nil || o.ViewerOsFamily == nil { + return nil, false + } + return o.ViewerOsFamily, true +} + +// HasViewerOsFamily returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasViewerOsFamily() bool { + if o != nil && o.ViewerOsFamily != nil { + return true + } + + return false +} + +// SetViewerOsFamily gets a reference to the given string and assigns it to the ViewerOsFamily field. +func (o *AbridgedVideoView) SetViewerOsFamily(v string) { + o.ViewerOsFamily = &v } + +// GetViewerApplicationName returns the ViewerApplicationName field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetViewerApplicationName() string { + if o == nil || o.ViewerApplicationName == nil { + var ret string + return ret + } + return *o.ViewerApplicationName +} + +// GetViewerApplicationNameOk returns a tuple with the ViewerApplicationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetViewerApplicationNameOk() (*string, bool) { + if o == nil || o.ViewerApplicationName == nil { + return nil, false + } + return o.ViewerApplicationName, true +} + +// HasViewerApplicationName returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasViewerApplicationName() bool { + if o != nil && o.ViewerApplicationName != nil { + return true + } + + return false +} + +// SetViewerApplicationName gets a reference to the given string and assigns it to the ViewerApplicationName field. +func (o *AbridgedVideoView) SetViewerApplicationName(v string) { + o.ViewerApplicationName = &v +} + +// GetVideoTitle returns the VideoTitle field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetVideoTitle() string { + if o == nil || o.VideoTitle == nil { + var ret string + return ret + } + return *o.VideoTitle +} + +// GetVideoTitleOk returns a tuple with the VideoTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetVideoTitleOk() (*string, bool) { + if o == nil || o.VideoTitle == nil { + return nil, false + } + return o.VideoTitle, true +} + +// HasVideoTitle returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasVideoTitle() bool { + if o != nil && o.VideoTitle != nil { + return true + } + + return false +} + +// SetVideoTitle gets a reference to the given string and assigns it to the VideoTitle field. +func (o *AbridgedVideoView) SetVideoTitle(v string) { + o.VideoTitle = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *AbridgedVideoView) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetPlayerErrorMessage returns the PlayerErrorMessage field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetPlayerErrorMessage() string { + if o == nil || o.PlayerErrorMessage == nil { + var ret string + return ret + } + return *o.PlayerErrorMessage +} + +// GetPlayerErrorMessageOk returns a tuple with the PlayerErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetPlayerErrorMessageOk() (*string, bool) { + if o == nil || o.PlayerErrorMessage == nil { + return nil, false + } + return o.PlayerErrorMessage, true +} + +// HasPlayerErrorMessage returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasPlayerErrorMessage() bool { + if o != nil && o.PlayerErrorMessage != nil { + return true + } + + return false +} + +// SetPlayerErrorMessage gets a reference to the given string and assigns it to the PlayerErrorMessage field. +func (o *AbridgedVideoView) SetPlayerErrorMessage(v string) { + o.PlayerErrorMessage = &v +} + +// GetPlayerErrorCode returns the PlayerErrorCode field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetPlayerErrorCode() string { + if o == nil || o.PlayerErrorCode == nil { + var ret string + return ret + } + return *o.PlayerErrorCode +} + +// GetPlayerErrorCodeOk returns a tuple with the PlayerErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetPlayerErrorCodeOk() (*string, bool) { + if o == nil || o.PlayerErrorCode == nil { + return nil, false + } + return o.PlayerErrorCode, true +} + +// HasPlayerErrorCode returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasPlayerErrorCode() bool { + if o != nil && o.PlayerErrorCode != nil { + return true + } + + return false +} + +// SetPlayerErrorCode gets a reference to the given string and assigns it to the PlayerErrorCode field. +func (o *AbridgedVideoView) SetPlayerErrorCode(v string) { + o.PlayerErrorCode = &v +} + +// GetErrorTypeId returns the ErrorTypeId field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetErrorTypeId() int32 { + if o == nil || o.ErrorTypeId == nil { + var ret int32 + return ret + } + return *o.ErrorTypeId +} + +// GetErrorTypeIdOk returns a tuple with the ErrorTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetErrorTypeIdOk() (*int32, bool) { + if o == nil || o.ErrorTypeId == nil { + return nil, false + } + return o.ErrorTypeId, true +} + +// HasErrorTypeId returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasErrorTypeId() bool { + if o != nil && o.ErrorTypeId != nil { + return true + } + + return false +} + +// SetErrorTypeId gets a reference to the given int32 and assigns it to the ErrorTypeId field. +func (o *AbridgedVideoView) SetErrorTypeId(v int32) { + o.ErrorTypeId = &v +} + +// GetCountryCode returns the CountryCode field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetCountryCode() string { + if o == nil || o.CountryCode == nil { + var ret string + return ret + } + return *o.CountryCode +} + +// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetCountryCodeOk() (*string, bool) { + if o == nil || o.CountryCode == nil { + return nil, false + } + return o.CountryCode, true +} + +// HasCountryCode returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasCountryCode() bool { + if o != nil && o.CountryCode != nil { + return true + } + + return false +} + +// SetCountryCode gets a reference to the given string and assigns it to the CountryCode field. +func (o *AbridgedVideoView) SetCountryCode(v string) { + o.CountryCode = &v +} + +// GetViewStart returns the ViewStart field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetViewStart() string { + if o == nil || o.ViewStart == nil { + var ret string + return ret + } + return *o.ViewStart +} + +// GetViewStartOk returns a tuple with the ViewStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetViewStartOk() (*string, bool) { + if o == nil || o.ViewStart == nil { + return nil, false + } + return o.ViewStart, true +} + +// HasViewStart returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasViewStart() bool { + if o != nil && o.ViewStart != nil { + return true + } + + return false +} + +// SetViewStart gets a reference to the given string and assigns it to the ViewStart field. +func (o *AbridgedVideoView) SetViewStart(v string) { + o.ViewStart = &v +} + +// GetViewEnd returns the ViewEnd field value if set, zero value otherwise. +func (o *AbridgedVideoView) GetViewEnd() string { + if o == nil || o.ViewEnd == nil { + var ret string + return ret + } + return *o.ViewEnd +} + +// GetViewEndOk returns a tuple with the ViewEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AbridgedVideoView) GetViewEndOk() (*string, bool) { + if o == nil || o.ViewEnd == nil { + return nil, false + } + return o.ViewEnd, true +} + +// HasViewEnd returns a boolean if a field has been set. +func (o *AbridgedVideoView) HasViewEnd() bool { + if o != nil && o.ViewEnd != nil { + return true + } + + return false +} + +// SetViewEnd gets a reference to the given string and assigns it to the ViewEnd field. +func (o *AbridgedVideoView) SetViewEnd(v string) { + o.ViewEnd = &v +} + +func (o AbridgedVideoView) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.ViewerOsFamily != nil { + toSerialize["viewer_os_family"] = o.ViewerOsFamily + } + if o.ViewerApplicationName != nil { + toSerialize["viewer_application_name"] = o.ViewerApplicationName + } + if o.VideoTitle != nil { + toSerialize["video_title"] = o.VideoTitle + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.PlayerErrorMessage != nil { + toSerialize["player_error_message"] = o.PlayerErrorMessage + } + if o.PlayerErrorCode != nil { + toSerialize["player_error_code"] = o.PlayerErrorCode + } + if o.ErrorTypeId != nil { + toSerialize["error_type_id"] = o.ErrorTypeId + } + if o.CountryCode != nil { + toSerialize["country_code"] = o.CountryCode + } + if o.ViewStart != nil { + toSerialize["view_start"] = o.ViewStart + } + if o.ViewEnd != nil { + toSerialize["view_end"] = o.ViewEnd + } + return json.Marshal(toSerialize) +} + +type NullableAbridgedVideoView struct { + value *AbridgedVideoView + isSet bool +} + +func (v NullableAbridgedVideoView) Get() *AbridgedVideoView { + return v.value +} + +func (v *NullableAbridgedVideoView) Set(val *AbridgedVideoView) { + v.value = val + v.isSet = true +} + +func (v NullableAbridgedVideoView) IsSet() bool { + return v.isSet +} + +func (v *NullableAbridgedVideoView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAbridgedVideoView(val *AbridgedVideoView) *NullableAbridgedVideoView { + return &NullableAbridgedVideoView{value: val, isSet: true} +} + +func (v NullableAbridgedVideoView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAbridgedVideoView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset.go b/model_asset.go index 59c8c0f..61169d2 100644 --- a/model_asset.go +++ b/model_asset.go @@ -1,45 +1,935 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Asset struct for Asset type Asset struct { - // Unique identifier for the Asset. - Id string `json:"id,omitempty"` - // Time at which the object was created. Measured in seconds since the Unix epoch. - CreatedAt string `json:"created_at,omitempty"` - DeletedAt string `json:"deleted_at,omitempty"` + // Unique identifier for the Asset. Max 255 characters. + Id *string `json:"id,omitempty"` + // Time the Asset was created, defined as a Unix timestamp (seconds since epoch). + CreatedAt *string `json:"created_at,omitempty"` // The status of the asset. - Status string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` // The duration of the asset in seconds (max duration for a single asset is 24 hours). - Duration float64 `json:"duration,omitempty"` + Duration *float64 `json:"duration,omitempty"` // The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. - MaxStoredResolution string `json:"max_stored_resolution,omitempty"` - // The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. - MaxStoredFrameRate float64 `json:"max_stored_frame_rate,omitempty"` + MaxStoredResolution *string `json:"max_stored_resolution,omitempty"` + // The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined. + MaxStoredFrameRate *float64 `json:"max_stored_frame_rate,omitempty"` // The aspect ratio of the asset in the form of `width:height`, for example `16:9`. - AspectRatio string `json:"aspect_ratio,omitempty"` - PlaybackIds []PlaybackId `json:"playback_ids,omitempty"` - Tracks []Track `json:"tracks,omitempty"` - Errors AssetErrors `json:"errors,omitempty"` - PerTitleEncode bool `json:"per_title_encode,omitempty"` + AspectRatio *string `json:"aspect_ratio,omitempty"` + // An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/video/play-your-videos) for more details. + PlaybackIds *[]PlaybackID `json:"playback_ids,omitempty"` + // The individual media tracks that make up an asset. + Tracks *[]Track `json:"tracks,omitempty"` + Errors *AssetErrors `json:"errors,omitempty"` + PerTitleEncode *bool `json:"per_title_encode,omitempty"` // Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state. - IsLive bool `json:"is_live,omitempty"` + IsLive *bool `json:"is_live,omitempty"` // Arbitrary metadata set for the asset. Max 255 characters. - Passthrough string `json:"passthrough,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` // Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. - LiveStreamId string `json:"live_stream_id,omitempty"` - Master AssetMaster `json:"master,omitempty"` - MasterAccess string `json:"master_access,omitempty"` - Mp4Support string `json:"mp4_support,omitempty"` + LiveStreamId *string `json:"live_stream_id,omitempty"` + Master *AssetMaster `json:"master,omitempty"` + MasterAccess *string `json:"master_access,omitempty"` + Mp4Support *string `json:"mp4_support,omitempty"` // Asset Identifier of the video used as the source for creating the clip. - SourceAssetId string `json:"source_asset_id,omitempty"` + SourceAssetId *string `json:"source_asset_id,omitempty"` // Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. - NormalizeAudio bool `json:"normalize_audio,omitempty"` - StaticRenditions AssetStaticRenditions `json:"static_renditions,omitempty"` + NormalizeAudio *bool `json:"normalize_audio,omitempty"` + StaticRenditions *AssetStaticRenditions `json:"static_renditions,omitempty"` // An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream - RecordingTimes []AssetRecordingTimes `json:"recording_times,omitempty"` - NonStandardInputReasons AssetNonStandardInputReasons `json:"non_standard_input_reasons,omitempty"` - // Indicates this asset is a test asset if the value is `true`. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. - Test bool `json:"test,omitempty"` + RecordingTimes *[]AssetRecordingTimes `json:"recording_times,omitempty"` + NonStandardInputReasons *AssetNonStandardInputReasons `json:"non_standard_input_reasons,omitempty"` + // True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. + Test *bool `json:"test,omitempty"` +} + +// NewAsset instantiates a new Asset 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 NewAsset() *Asset { + this := Asset{} + var masterAccess string = "none" + this.MasterAccess = &masterAccess + var mp4Support string = "none" + this.Mp4Support = &mp4Support + var normalizeAudio bool = false + this.NormalizeAudio = &normalizeAudio + return &this +} + +// NewAssetWithDefaults instantiates a new Asset 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 NewAssetWithDefaults() *Asset { + this := Asset{} + var masterAccess string = "none" + this.MasterAccess = &masterAccess + var mp4Support string = "none" + this.Mp4Support = &mp4Support + var normalizeAudio bool = false + this.NormalizeAudio = &normalizeAudio + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Asset) GetId() string { + if o == nil || o.Id == nil { + 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 *Asset) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Asset) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Asset) SetId(v string) { + o.Id = &v } + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Asset) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Asset) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Asset) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Asset) GetStatus() string { + if o == nil || o.Status == nil { + 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 *Asset) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Asset) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Asset) SetStatus(v string) { + o.Status = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *Asset) GetDuration() float64 { + if o == nil || o.Duration == nil { + var ret float64 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetDurationOk() (*float64, bool) { + if o == nil || o.Duration == nil { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *Asset) HasDuration() bool { + if o != nil && o.Duration != nil { + return true + } + + return false +} + +// SetDuration gets a reference to the given float64 and assigns it to the Duration field. +func (o *Asset) SetDuration(v float64) { + o.Duration = &v +} + +// GetMaxStoredResolution returns the MaxStoredResolution field value if set, zero value otherwise. +func (o *Asset) GetMaxStoredResolution() string { + if o == nil || o.MaxStoredResolution == nil { + var ret string + return ret + } + return *o.MaxStoredResolution +} + +// GetMaxStoredResolutionOk returns a tuple with the MaxStoredResolution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetMaxStoredResolutionOk() (*string, bool) { + if o == nil || o.MaxStoredResolution == nil { + return nil, false + } + return o.MaxStoredResolution, true +} + +// HasMaxStoredResolution returns a boolean if a field has been set. +func (o *Asset) HasMaxStoredResolution() bool { + if o != nil && o.MaxStoredResolution != nil { + return true + } + + return false +} + +// SetMaxStoredResolution gets a reference to the given string and assigns it to the MaxStoredResolution field. +func (o *Asset) SetMaxStoredResolution(v string) { + o.MaxStoredResolution = &v +} + +// GetMaxStoredFrameRate returns the MaxStoredFrameRate field value if set, zero value otherwise. +func (o *Asset) GetMaxStoredFrameRate() float64 { + if o == nil || o.MaxStoredFrameRate == nil { + var ret float64 + return ret + } + return *o.MaxStoredFrameRate +} + +// GetMaxStoredFrameRateOk returns a tuple with the MaxStoredFrameRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetMaxStoredFrameRateOk() (*float64, bool) { + if o == nil || o.MaxStoredFrameRate == nil { + return nil, false + } + return o.MaxStoredFrameRate, true +} + +// HasMaxStoredFrameRate returns a boolean if a field has been set. +func (o *Asset) HasMaxStoredFrameRate() bool { + if o != nil && o.MaxStoredFrameRate != nil { + return true + } + + return false +} + +// SetMaxStoredFrameRate gets a reference to the given float64 and assigns it to the MaxStoredFrameRate field. +func (o *Asset) SetMaxStoredFrameRate(v float64) { + o.MaxStoredFrameRate = &v +} + +// GetAspectRatio returns the AspectRatio field value if set, zero value otherwise. +func (o *Asset) GetAspectRatio() string { + if o == nil || o.AspectRatio == nil { + var ret string + return ret + } + return *o.AspectRatio +} + +// GetAspectRatioOk returns a tuple with the AspectRatio field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetAspectRatioOk() (*string, bool) { + if o == nil || o.AspectRatio == nil { + return nil, false + } + return o.AspectRatio, true +} + +// HasAspectRatio returns a boolean if a field has been set. +func (o *Asset) HasAspectRatio() bool { + if o != nil && o.AspectRatio != nil { + return true + } + + return false +} + +// SetAspectRatio gets a reference to the given string and assigns it to the AspectRatio field. +func (o *Asset) SetAspectRatio(v string) { + o.AspectRatio = &v +} + +// GetPlaybackIds returns the PlaybackIds field value if set, zero value otherwise. +func (o *Asset) GetPlaybackIds() []PlaybackID { + if o == nil || o.PlaybackIds == nil { + var ret []PlaybackID + return ret + } + return *o.PlaybackIds +} + +// GetPlaybackIdsOk returns a tuple with the PlaybackIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetPlaybackIdsOk() (*[]PlaybackID, bool) { + if o == nil || o.PlaybackIds == nil { + return nil, false + } + return o.PlaybackIds, true +} + +// HasPlaybackIds returns a boolean if a field has been set. +func (o *Asset) HasPlaybackIds() bool { + if o != nil && o.PlaybackIds != nil { + return true + } + + return false +} + +// SetPlaybackIds gets a reference to the given []PlaybackID and assigns it to the PlaybackIds field. +func (o *Asset) SetPlaybackIds(v []PlaybackID) { + o.PlaybackIds = &v +} + +// GetTracks returns the Tracks field value if set, zero value otherwise. +func (o *Asset) GetTracks() []Track { + if o == nil || o.Tracks == nil { + var ret []Track + return ret + } + return *o.Tracks +} + +// GetTracksOk returns a tuple with the Tracks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetTracksOk() (*[]Track, bool) { + if o == nil || o.Tracks == nil { + return nil, false + } + return o.Tracks, true +} + +// HasTracks returns a boolean if a field has been set. +func (o *Asset) HasTracks() bool { + if o != nil && o.Tracks != nil { + return true + } + + return false +} + +// SetTracks gets a reference to the given []Track and assigns it to the Tracks field. +func (o *Asset) SetTracks(v []Track) { + o.Tracks = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *Asset) GetErrors() AssetErrors { + if o == nil || o.Errors == nil { + var ret AssetErrors + return ret + } + return *o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetErrorsOk() (*AssetErrors, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *Asset) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given AssetErrors and assigns it to the Errors field. +func (o *Asset) SetErrors(v AssetErrors) { + o.Errors = &v +} + +// GetPerTitleEncode returns the PerTitleEncode field value if set, zero value otherwise. +func (o *Asset) GetPerTitleEncode() bool { + if o == nil || o.PerTitleEncode == nil { + var ret bool + return ret + } + return *o.PerTitleEncode +} + +// GetPerTitleEncodeOk returns a tuple with the PerTitleEncode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetPerTitleEncodeOk() (*bool, bool) { + if o == nil || o.PerTitleEncode == nil { + return nil, false + } + return o.PerTitleEncode, true +} + +// HasPerTitleEncode returns a boolean if a field has been set. +func (o *Asset) HasPerTitleEncode() bool { + if o != nil && o.PerTitleEncode != nil { + return true + } + + return false +} + +// SetPerTitleEncode gets a reference to the given bool and assigns it to the PerTitleEncode field. +func (o *Asset) SetPerTitleEncode(v bool) { + o.PerTitleEncode = &v +} + +// GetIsLive returns the IsLive field value if set, zero value otherwise. +func (o *Asset) GetIsLive() bool { + if o == nil || o.IsLive == nil { + var ret bool + return ret + } + return *o.IsLive +} + +// GetIsLiveOk returns a tuple with the IsLive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetIsLiveOk() (*bool, bool) { + if o == nil || o.IsLive == nil { + return nil, false + } + return o.IsLive, true +} + +// HasIsLive returns a boolean if a field has been set. +func (o *Asset) HasIsLive() bool { + if o != nil && o.IsLive != nil { + return true + } + + return false +} + +// SetIsLive gets a reference to the given bool and assigns it to the IsLive field. +func (o *Asset) SetIsLive(v bool) { + o.IsLive = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *Asset) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *Asset) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *Asset) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetLiveStreamId returns the LiveStreamId field value if set, zero value otherwise. +func (o *Asset) GetLiveStreamId() string { + if o == nil || o.LiveStreamId == nil { + var ret string + return ret + } + return *o.LiveStreamId +} + +// GetLiveStreamIdOk returns a tuple with the LiveStreamId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetLiveStreamIdOk() (*string, bool) { + if o == nil || o.LiveStreamId == nil { + return nil, false + } + return o.LiveStreamId, true +} + +// HasLiveStreamId returns a boolean if a field has been set. +func (o *Asset) HasLiveStreamId() bool { + if o != nil && o.LiveStreamId != nil { + return true + } + + return false +} + +// SetLiveStreamId gets a reference to the given string and assigns it to the LiveStreamId field. +func (o *Asset) SetLiveStreamId(v string) { + o.LiveStreamId = &v +} + +// GetMaster returns the Master field value if set, zero value otherwise. +func (o *Asset) GetMaster() AssetMaster { + if o == nil || o.Master == nil { + var ret AssetMaster + return ret + } + return *o.Master +} + +// GetMasterOk returns a tuple with the Master field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetMasterOk() (*AssetMaster, bool) { + if o == nil || o.Master == nil { + return nil, false + } + return o.Master, true +} + +// HasMaster returns a boolean if a field has been set. +func (o *Asset) HasMaster() bool { + if o != nil && o.Master != nil { + return true + } + + return false +} + +// SetMaster gets a reference to the given AssetMaster and assigns it to the Master field. +func (o *Asset) SetMaster(v AssetMaster) { + o.Master = &v +} + +// GetMasterAccess returns the MasterAccess field value if set, zero value otherwise. +func (o *Asset) GetMasterAccess() string { + if o == nil || o.MasterAccess == nil { + var ret string + return ret + } + return *o.MasterAccess +} + +// GetMasterAccessOk returns a tuple with the MasterAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetMasterAccessOk() (*string, bool) { + if o == nil || o.MasterAccess == nil { + return nil, false + } + return o.MasterAccess, true +} + +// HasMasterAccess returns a boolean if a field has been set. +func (o *Asset) HasMasterAccess() bool { + if o != nil && o.MasterAccess != nil { + return true + } + + return false +} + +// SetMasterAccess gets a reference to the given string and assigns it to the MasterAccess field. +func (o *Asset) SetMasterAccess(v string) { + o.MasterAccess = &v +} + +// GetMp4Support returns the Mp4Support field value if set, zero value otherwise. +func (o *Asset) GetMp4Support() string { + if o == nil || o.Mp4Support == nil { + var ret string + return ret + } + return *o.Mp4Support +} + +// GetMp4SupportOk returns a tuple with the Mp4Support field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetMp4SupportOk() (*string, bool) { + if o == nil || o.Mp4Support == nil { + return nil, false + } + return o.Mp4Support, true +} + +// HasMp4Support returns a boolean if a field has been set. +func (o *Asset) HasMp4Support() bool { + if o != nil && o.Mp4Support != nil { + return true + } + + return false +} + +// SetMp4Support gets a reference to the given string and assigns it to the Mp4Support field. +func (o *Asset) SetMp4Support(v string) { + o.Mp4Support = &v +} + +// GetSourceAssetId returns the SourceAssetId field value if set, zero value otherwise. +func (o *Asset) GetSourceAssetId() string { + if o == nil || o.SourceAssetId == nil { + var ret string + return ret + } + return *o.SourceAssetId +} + +// GetSourceAssetIdOk returns a tuple with the SourceAssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetSourceAssetIdOk() (*string, bool) { + if o == nil || o.SourceAssetId == nil { + return nil, false + } + return o.SourceAssetId, true +} + +// HasSourceAssetId returns a boolean if a field has been set. +func (o *Asset) HasSourceAssetId() bool { + if o != nil && o.SourceAssetId != nil { + return true + } + + return false +} + +// SetSourceAssetId gets a reference to the given string and assigns it to the SourceAssetId field. +func (o *Asset) SetSourceAssetId(v string) { + o.SourceAssetId = &v +} + +// GetNormalizeAudio returns the NormalizeAudio field value if set, zero value otherwise. +func (o *Asset) GetNormalizeAudio() bool { + if o == nil || o.NormalizeAudio == nil { + var ret bool + return ret + } + return *o.NormalizeAudio +} + +// GetNormalizeAudioOk returns a tuple with the NormalizeAudio field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetNormalizeAudioOk() (*bool, bool) { + if o == nil || o.NormalizeAudio == nil { + return nil, false + } + return o.NormalizeAudio, true +} + +// HasNormalizeAudio returns a boolean if a field has been set. +func (o *Asset) HasNormalizeAudio() bool { + if o != nil && o.NormalizeAudio != nil { + return true + } + + return false +} + +// SetNormalizeAudio gets a reference to the given bool and assigns it to the NormalizeAudio field. +func (o *Asset) SetNormalizeAudio(v bool) { + o.NormalizeAudio = &v +} + +// GetStaticRenditions returns the StaticRenditions field value if set, zero value otherwise. +func (o *Asset) GetStaticRenditions() AssetStaticRenditions { + if o == nil || o.StaticRenditions == nil { + var ret AssetStaticRenditions + return ret + } + return *o.StaticRenditions +} + +// GetStaticRenditionsOk returns a tuple with the StaticRenditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetStaticRenditionsOk() (*AssetStaticRenditions, bool) { + if o == nil || o.StaticRenditions == nil { + return nil, false + } + return o.StaticRenditions, true +} + +// HasStaticRenditions returns a boolean if a field has been set. +func (o *Asset) HasStaticRenditions() bool { + if o != nil && o.StaticRenditions != nil { + return true + } + + return false +} + +// SetStaticRenditions gets a reference to the given AssetStaticRenditions and assigns it to the StaticRenditions field. +func (o *Asset) SetStaticRenditions(v AssetStaticRenditions) { + o.StaticRenditions = &v +} + +// GetRecordingTimes returns the RecordingTimes field value if set, zero value otherwise. +func (o *Asset) GetRecordingTimes() []AssetRecordingTimes { + if o == nil || o.RecordingTimes == nil { + var ret []AssetRecordingTimes + return ret + } + return *o.RecordingTimes +} + +// GetRecordingTimesOk returns a tuple with the RecordingTimes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetRecordingTimesOk() (*[]AssetRecordingTimes, bool) { + if o == nil || o.RecordingTimes == nil { + return nil, false + } + return o.RecordingTimes, true +} + +// HasRecordingTimes returns a boolean if a field has been set. +func (o *Asset) HasRecordingTimes() bool { + if o != nil && o.RecordingTimes != nil { + return true + } + + return false +} + +// SetRecordingTimes gets a reference to the given []AssetRecordingTimes and assigns it to the RecordingTimes field. +func (o *Asset) SetRecordingTimes(v []AssetRecordingTimes) { + o.RecordingTimes = &v +} + +// GetNonStandardInputReasons returns the NonStandardInputReasons field value if set, zero value otherwise. +func (o *Asset) GetNonStandardInputReasons() AssetNonStandardInputReasons { + if o == nil || o.NonStandardInputReasons == nil { + var ret AssetNonStandardInputReasons + return ret + } + return *o.NonStandardInputReasons +} + +// GetNonStandardInputReasonsOk returns a tuple with the NonStandardInputReasons field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetNonStandardInputReasonsOk() (*AssetNonStandardInputReasons, bool) { + if o == nil || o.NonStandardInputReasons == nil { + return nil, false + } + return o.NonStandardInputReasons, true +} + +// HasNonStandardInputReasons returns a boolean if a field has been set. +func (o *Asset) HasNonStandardInputReasons() bool { + if o != nil && o.NonStandardInputReasons != nil { + return true + } + + return false +} + +// SetNonStandardInputReasons gets a reference to the given AssetNonStandardInputReasons and assigns it to the NonStandardInputReasons field. +func (o *Asset) SetNonStandardInputReasons(v AssetNonStandardInputReasons) { + o.NonStandardInputReasons = &v +} + +// GetTest returns the Test field value if set, zero value otherwise. +func (o *Asset) GetTest() bool { + if o == nil || o.Test == nil { + var ret bool + return ret + } + return *o.Test +} + +// GetTestOk returns a tuple with the Test field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetTestOk() (*bool, bool) { + if o == nil || o.Test == nil { + return nil, false + } + return o.Test, true +} + +// HasTest returns a boolean if a field has been set. +func (o *Asset) HasTest() bool { + if o != nil && o.Test != nil { + return true + } + + return false +} + +// SetTest gets a reference to the given bool and assigns it to the Test field. +func (o *Asset) SetTest(v bool) { + o.Test = &v +} + +func (o Asset) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if o.MaxStoredResolution != nil { + toSerialize["max_stored_resolution"] = o.MaxStoredResolution + } + if o.MaxStoredFrameRate != nil { + toSerialize["max_stored_frame_rate"] = o.MaxStoredFrameRate + } + if o.AspectRatio != nil { + toSerialize["aspect_ratio"] = o.AspectRatio + } + if o.PlaybackIds != nil { + toSerialize["playback_ids"] = o.PlaybackIds + } + if o.Tracks != nil { + toSerialize["tracks"] = o.Tracks + } + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + if o.PerTitleEncode != nil { + toSerialize["per_title_encode"] = o.PerTitleEncode + } + if o.IsLive != nil { + toSerialize["is_live"] = o.IsLive + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.LiveStreamId != nil { + toSerialize["live_stream_id"] = o.LiveStreamId + } + if o.Master != nil { + toSerialize["master"] = o.Master + } + if o.MasterAccess != nil { + toSerialize["master_access"] = o.MasterAccess + } + if o.Mp4Support != nil { + toSerialize["mp4_support"] = o.Mp4Support + } + if o.SourceAssetId != nil { + toSerialize["source_asset_id"] = o.SourceAssetId + } + if o.NormalizeAudio != nil { + toSerialize["normalize_audio"] = o.NormalizeAudio + } + if o.StaticRenditions != nil { + toSerialize["static_renditions"] = o.StaticRenditions + } + if o.RecordingTimes != nil { + toSerialize["recording_times"] = o.RecordingTimes + } + if o.NonStandardInputReasons != nil { + toSerialize["non_standard_input_reasons"] = o.NonStandardInputReasons + } + if o.Test != nil { + toSerialize["test"] = o.Test + } + return json.Marshal(toSerialize) +} + +type NullableAsset struct { + value *Asset + isSet bool +} + +func (v NullableAsset) Get() *Asset { + return v.value +} + +func (v *NullableAsset) Set(val *Asset) { + v.value = val + v.isSet = true +} + +func (v NullableAsset) IsSet() bool { + return v.isSet +} + +func (v *NullableAsset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAsset(val *Asset) *NullableAsset { + return &NullableAsset{value: val, isSet: true} +} + +func (v NullableAsset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAsset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_errors.go b/model_asset_errors.go index 4541800..2d18a03 100644 --- a/model_asset_errors.go +++ b/model_asset_errors.go @@ -1,11 +1,153 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// AssetErrors Object that describes any errors that happened when processing this asset. type AssetErrors struct { // The type of error that occurred for this asset. - Type string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` // Error messages with more details. - Messages []string `json:"messages,omitempty"` + Messages *[]string `json:"messages,omitempty"` +} + +// NewAssetErrors instantiates a new AssetErrors 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 NewAssetErrors() *AssetErrors { + this := AssetErrors{} + return &this +} + +// NewAssetErrorsWithDefaults instantiates a new AssetErrors 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 NewAssetErrorsWithDefaults() *AssetErrors { + this := AssetErrors{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AssetErrors) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetErrors) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AssetErrors) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AssetErrors) SetType(v string) { + o.Type = &v +} + +// GetMessages returns the Messages field value if set, zero value otherwise. +func (o *AssetErrors) GetMessages() []string { + if o == nil || o.Messages == nil { + var ret []string + return ret + } + return *o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetErrors) GetMessagesOk() (*[]string, bool) { + if o == nil || o.Messages == nil { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *AssetErrors) HasMessages() bool { + if o != nil && o.Messages != nil { + return true + } + + return false } + +// SetMessages gets a reference to the given []string and assigns it to the Messages field. +func (o *AssetErrors) SetMessages(v []string) { + o.Messages = &v +} + +func (o AssetErrors) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Messages != nil { + toSerialize["messages"] = o.Messages + } + return json.Marshal(toSerialize) +} + +type NullableAssetErrors struct { + value *AssetErrors + isSet bool +} + +func (v NullableAssetErrors) Get() *AssetErrors { + return v.value +} + +func (v *NullableAssetErrors) Set(val *AssetErrors) { + v.value = val + v.isSet = true +} + +func (v NullableAssetErrors) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetErrors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetErrors(val *AssetErrors) *NullableAssetErrors { + return &NullableAssetErrors{value: val, isSet: true} +} + +func (v NullableAssetErrors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetErrors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_master.go b/model_asset_master.go index 774092d..bce2802 100644 --- a/model_asset_master.go +++ b/model_asset_master.go @@ -1,10 +1,152 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -// An object containing the current status of Master Access and the link to the Master MP4 file when ready. This object does not exist if `master_acess` is set to `none` and when the temporary URL expires. +import ( + "encoding/json" +) + +// AssetMaster An object containing the current status of Master Access and the link to the Master MP4 file when ready. This object does not exist if `master_acess` is set to `none` and when the temporary URL expires. type AssetMaster struct { - Status string `json:"status,omitempty"` - Url string `json:"url,omitempty"` + Status *string `json:"status,omitempty"` + // The temporary URL to the master version of the video, as an MP4 file. This URL will expire after 24 hours. + Url *string `json:"url,omitempty"` +} + +// NewAssetMaster instantiates a new AssetMaster 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 NewAssetMaster() *AssetMaster { + this := AssetMaster{} + return &this +} + +// NewAssetMasterWithDefaults instantiates a new AssetMaster 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 NewAssetMasterWithDefaults() *AssetMaster { + this := AssetMaster{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AssetMaster) GetStatus() string { + if o == nil || o.Status == nil { + 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 *AssetMaster) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AssetMaster) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *AssetMaster) SetStatus(v string) { + o.Status = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *AssetMaster) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetMaster) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *AssetMaster) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false } + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *AssetMaster) SetUrl(v string) { + o.Url = &v +} + +func (o AssetMaster) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Url != nil { + toSerialize["url"] = o.Url + } + return json.Marshal(toSerialize) +} + +type NullableAssetMaster struct { + value *AssetMaster + isSet bool +} + +func (v NullableAssetMaster) Get() *AssetMaster { + return v.value +} + +func (v *NullableAssetMaster) Set(val *AssetMaster) { + v.value = val + v.isSet = true +} + +func (v NullableAssetMaster) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetMaster) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetMaster(val *AssetMaster) *NullableAssetMaster { + return &NullableAssetMaster{value: val, isSet: true} +} + +func (v NullableAssetMaster) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetMaster) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_non_standard_input_reasons.go b/model_asset_non_standard_input_reasons.go index 801e672..df9959f 100644 --- a/model_asset_non_standard_input_reasons.go +++ b/model_asset_non_standard_input_reasons.go @@ -1,25 +1,412 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// AssetNonStandardInputReasons An object containing one or more reasons the input file is non-standard. See [the guide on minimizing processing time](https://docs.mux.com/guides/video/minimize-processing-time) for more information on what a standard input is defined as. This object only exists on on-demand assets that have non-standard inputs, so if missing you can assume the input qualifies as standard. type AssetNonStandardInputReasons struct { - // The video codec used on the input file. - VideoCodec string `json:"video_codec,omitempty"` - // The audio codec used on the input file. - AudioCodec string `json:"audio_codec,omitempty"` - // The video key frame Interval (also called as Group of Picture or GOP) of the input file. - VideoGopSize string `json:"video_gop_size,omitempty"` - // The video frame rate of the input file. - VideoFrameRate string `json:"video_frame_rate,omitempty"` - // The video resolution of the input file. - VideoResolution string `json:"video_resolution,omitempty"` + // The video codec used on the input file. For example, the input file encoded with `hevc` video codec is non-standard and the value of this parameter is `hevc`. + VideoCodec *string `json:"video_codec,omitempty"` + // The audio codec used on the input file. Non-AAC audio codecs are non-standard. + AudioCodec *string `json:"audio_codec,omitempty"` + // The video key frame Interval (also called as Group of Picture or GOP) of the input file is `high`. This parameter is present when the gop is greater than 10 seconds. + VideoGopSize *string `json:"video_gop_size,omitempty"` + // The video frame rate of the input file. Video with average frames per second (fps) less than 10 or greater than 120 is non-standard. A `-1` frame rate value indicates Mux could not determine the frame rate of the video track. + VideoFrameRate *string `json:"video_frame_rate,omitempty"` + // The video resolution of the input file. Video resolution higher than 2048 pixels on any one dimension (height or width) is considered non-standard, The resolution value is presented as `width` x `height` in pixels. + VideoResolution *string `json:"video_resolution,omitempty"` // The video pixel aspect ratio of the input file. - PixelAspectRatio string `json:"pixel_aspect_ratio,omitempty"` + PixelAspectRatio *string `json:"pixel_aspect_ratio,omitempty"` // Video Edit List reason indicates that the input file's video track contains a complex Edit Decision List. - VideoEditList string `json:"video_edit_list,omitempty"` + VideoEditList *string `json:"video_edit_list,omitempty"` // Audio Edit List reason indicates that the input file's audio track contains a complex Edit Decision List. - AudioEditList string `json:"audio_edit_list,omitempty"` + AudioEditList *string `json:"audio_edit_list,omitempty"` // A catch-all reason when the input file in created with non-standard encoding parameters. - UnexpectedMediaFileParameters string `json:"unexpected_media_file_parameters,omitempty"` + UnexpectedMediaFileParameters *string `json:"unexpected_media_file_parameters,omitempty"` +} + +// NewAssetNonStandardInputReasons instantiates a new AssetNonStandardInputReasons 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 NewAssetNonStandardInputReasons() *AssetNonStandardInputReasons { + this := AssetNonStandardInputReasons{} + return &this +} + +// NewAssetNonStandardInputReasonsWithDefaults instantiates a new AssetNonStandardInputReasons 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 NewAssetNonStandardInputReasonsWithDefaults() *AssetNonStandardInputReasons { + this := AssetNonStandardInputReasons{} + return &this +} + +// GetVideoCodec returns the VideoCodec field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetVideoCodec() string { + if o == nil || o.VideoCodec == nil { + var ret string + return ret + } + return *o.VideoCodec +} + +// GetVideoCodecOk returns a tuple with the VideoCodec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetVideoCodecOk() (*string, bool) { + if o == nil || o.VideoCodec == nil { + return nil, false + } + return o.VideoCodec, true +} + +// HasVideoCodec returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasVideoCodec() bool { + if o != nil && o.VideoCodec != nil { + return true + } + + return false +} + +// SetVideoCodec gets a reference to the given string and assigns it to the VideoCodec field. +func (o *AssetNonStandardInputReasons) SetVideoCodec(v string) { + o.VideoCodec = &v +} + +// GetAudioCodec returns the AudioCodec field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetAudioCodec() string { + if o == nil || o.AudioCodec == nil { + var ret string + return ret + } + return *o.AudioCodec +} + +// GetAudioCodecOk returns a tuple with the AudioCodec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetAudioCodecOk() (*string, bool) { + if o == nil || o.AudioCodec == nil { + return nil, false + } + return o.AudioCodec, true +} + +// HasAudioCodec returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasAudioCodec() bool { + if o != nil && o.AudioCodec != nil { + return true + } + + return false +} + +// SetAudioCodec gets a reference to the given string and assigns it to the AudioCodec field. +func (o *AssetNonStandardInputReasons) SetAudioCodec(v string) { + o.AudioCodec = &v +} + +// GetVideoGopSize returns the VideoGopSize field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetVideoGopSize() string { + if o == nil || o.VideoGopSize == nil { + var ret string + return ret + } + return *o.VideoGopSize +} + +// GetVideoGopSizeOk returns a tuple with the VideoGopSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetVideoGopSizeOk() (*string, bool) { + if o == nil || o.VideoGopSize == nil { + return nil, false + } + return o.VideoGopSize, true +} + +// HasVideoGopSize returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasVideoGopSize() bool { + if o != nil && o.VideoGopSize != nil { + return true + } + + return false +} + +// SetVideoGopSize gets a reference to the given string and assigns it to the VideoGopSize field. +func (o *AssetNonStandardInputReasons) SetVideoGopSize(v string) { + o.VideoGopSize = &v +} + +// GetVideoFrameRate returns the VideoFrameRate field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetVideoFrameRate() string { + if o == nil || o.VideoFrameRate == nil { + var ret string + return ret + } + return *o.VideoFrameRate +} + +// GetVideoFrameRateOk returns a tuple with the VideoFrameRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetVideoFrameRateOk() (*string, bool) { + if o == nil || o.VideoFrameRate == nil { + return nil, false + } + return o.VideoFrameRate, true } + +// HasVideoFrameRate returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasVideoFrameRate() bool { + if o != nil && o.VideoFrameRate != nil { + return true + } + + return false +} + +// SetVideoFrameRate gets a reference to the given string and assigns it to the VideoFrameRate field. +func (o *AssetNonStandardInputReasons) SetVideoFrameRate(v string) { + o.VideoFrameRate = &v +} + +// GetVideoResolution returns the VideoResolution field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetVideoResolution() string { + if o == nil || o.VideoResolution == nil { + var ret string + return ret + } + return *o.VideoResolution +} + +// GetVideoResolutionOk returns a tuple with the VideoResolution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetVideoResolutionOk() (*string, bool) { + if o == nil || o.VideoResolution == nil { + return nil, false + } + return o.VideoResolution, true +} + +// HasVideoResolution returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasVideoResolution() bool { + if o != nil && o.VideoResolution != nil { + return true + } + + return false +} + +// SetVideoResolution gets a reference to the given string and assigns it to the VideoResolution field. +func (o *AssetNonStandardInputReasons) SetVideoResolution(v string) { + o.VideoResolution = &v +} + +// GetPixelAspectRatio returns the PixelAspectRatio field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetPixelAspectRatio() string { + if o == nil || o.PixelAspectRatio == nil { + var ret string + return ret + } + return *o.PixelAspectRatio +} + +// GetPixelAspectRatioOk returns a tuple with the PixelAspectRatio field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetPixelAspectRatioOk() (*string, bool) { + if o == nil || o.PixelAspectRatio == nil { + return nil, false + } + return o.PixelAspectRatio, true +} + +// HasPixelAspectRatio returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasPixelAspectRatio() bool { + if o != nil && o.PixelAspectRatio != nil { + return true + } + + return false +} + +// SetPixelAspectRatio gets a reference to the given string and assigns it to the PixelAspectRatio field. +func (o *AssetNonStandardInputReasons) SetPixelAspectRatio(v string) { + o.PixelAspectRatio = &v +} + +// GetVideoEditList returns the VideoEditList field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetVideoEditList() string { + if o == nil || o.VideoEditList == nil { + var ret string + return ret + } + return *o.VideoEditList +} + +// GetVideoEditListOk returns a tuple with the VideoEditList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetVideoEditListOk() (*string, bool) { + if o == nil || o.VideoEditList == nil { + return nil, false + } + return o.VideoEditList, true +} + +// HasVideoEditList returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasVideoEditList() bool { + if o != nil && o.VideoEditList != nil { + return true + } + + return false +} + +// SetVideoEditList gets a reference to the given string and assigns it to the VideoEditList field. +func (o *AssetNonStandardInputReasons) SetVideoEditList(v string) { + o.VideoEditList = &v +} + +// GetAudioEditList returns the AudioEditList field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetAudioEditList() string { + if o == nil || o.AudioEditList == nil { + var ret string + return ret + } + return *o.AudioEditList +} + +// GetAudioEditListOk returns a tuple with the AudioEditList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetAudioEditListOk() (*string, bool) { + if o == nil || o.AudioEditList == nil { + return nil, false + } + return o.AudioEditList, true +} + +// HasAudioEditList returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasAudioEditList() bool { + if o != nil && o.AudioEditList != nil { + return true + } + + return false +} + +// SetAudioEditList gets a reference to the given string and assigns it to the AudioEditList field. +func (o *AssetNonStandardInputReasons) SetAudioEditList(v string) { + o.AudioEditList = &v +} + +// GetUnexpectedMediaFileParameters returns the UnexpectedMediaFileParameters field value if set, zero value otherwise. +func (o *AssetNonStandardInputReasons) GetUnexpectedMediaFileParameters() string { + if o == nil || o.UnexpectedMediaFileParameters == nil { + var ret string + return ret + } + return *o.UnexpectedMediaFileParameters +} + +// GetUnexpectedMediaFileParametersOk returns a tuple with the UnexpectedMediaFileParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetNonStandardInputReasons) GetUnexpectedMediaFileParametersOk() (*string, bool) { + if o == nil || o.UnexpectedMediaFileParameters == nil { + return nil, false + } + return o.UnexpectedMediaFileParameters, true +} + +// HasUnexpectedMediaFileParameters returns a boolean if a field has been set. +func (o *AssetNonStandardInputReasons) HasUnexpectedMediaFileParameters() bool { + if o != nil && o.UnexpectedMediaFileParameters != nil { + return true + } + + return false +} + +// SetUnexpectedMediaFileParameters gets a reference to the given string and assigns it to the UnexpectedMediaFileParameters field. +func (o *AssetNonStandardInputReasons) SetUnexpectedMediaFileParameters(v string) { + o.UnexpectedMediaFileParameters = &v +} + +func (o AssetNonStandardInputReasons) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.VideoCodec != nil { + toSerialize["video_codec"] = o.VideoCodec + } + if o.AudioCodec != nil { + toSerialize["audio_codec"] = o.AudioCodec + } + if o.VideoGopSize != nil { + toSerialize["video_gop_size"] = o.VideoGopSize + } + if o.VideoFrameRate != nil { + toSerialize["video_frame_rate"] = o.VideoFrameRate + } + if o.VideoResolution != nil { + toSerialize["video_resolution"] = o.VideoResolution + } + if o.PixelAspectRatio != nil { + toSerialize["pixel_aspect_ratio"] = o.PixelAspectRatio + } + if o.VideoEditList != nil { + toSerialize["video_edit_list"] = o.VideoEditList + } + if o.AudioEditList != nil { + toSerialize["audio_edit_list"] = o.AudioEditList + } + if o.UnexpectedMediaFileParameters != nil { + toSerialize["unexpected_media_file_parameters"] = o.UnexpectedMediaFileParameters + } + return json.Marshal(toSerialize) +} + +type NullableAssetNonStandardInputReasons struct { + value *AssetNonStandardInputReasons + isSet bool +} + +func (v NullableAssetNonStandardInputReasons) Get() *AssetNonStandardInputReasons { + return v.value +} + +func (v *NullableAssetNonStandardInputReasons) Set(val *AssetNonStandardInputReasons) { + v.value = val + v.isSet = true +} + +func (v NullableAssetNonStandardInputReasons) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetNonStandardInputReasons) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetNonStandardInputReasons(val *AssetNonStandardInputReasons) *NullableAssetNonStandardInputReasons { + return &NullableAssetNonStandardInputReasons{value: val, isSet: true} +} + +func (v NullableAssetNonStandardInputReasons) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetNonStandardInputReasons) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_recording_times.go b/model_asset_recording_times.go index fd8a993..d8856d2 100644 --- a/model_asset_recording_times.go +++ b/model_asset_recording_times.go @@ -1,15 +1,154 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( + "encoding/json" "time" ) +// AssetRecordingTimes struct for AssetRecordingTimes type AssetRecordingTimes struct { // The time at which the recording for the live stream started. The time value is Unix epoch time represented in ISO 8601 format. - StartedAt time.Time `json:"started_at,omitempty"` + StartedAt *time.Time `json:"started_at,omitempty"` // The duration of the live stream recorded. The time value is in seconds. - Duration float64 `json:"duration,omitempty"` + Duration *float64 `json:"duration,omitempty"` +} + +// NewAssetRecordingTimes instantiates a new AssetRecordingTimes 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 NewAssetRecordingTimes() *AssetRecordingTimes { + this := AssetRecordingTimes{} + return &this +} + +// NewAssetRecordingTimesWithDefaults instantiates a new AssetRecordingTimes 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 NewAssetRecordingTimesWithDefaults() *AssetRecordingTimes { + this := AssetRecordingTimes{} + return &this +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *AssetRecordingTimes) GetStartedAt() time.Time { + if o == nil || o.StartedAt == nil { + var ret time.Time + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetRecordingTimes) GetStartedAtOk() (*time.Time, bool) { + if o == nil || o.StartedAt == nil { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *AssetRecordingTimes) HasStartedAt() bool { + if o != nil && o.StartedAt != nil { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given time.Time and assigns it to the StartedAt field. +func (o *AssetRecordingTimes) SetStartedAt(v time.Time) { + o.StartedAt = &v } + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *AssetRecordingTimes) GetDuration() float64 { + if o == nil || o.Duration == nil { + var ret float64 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetRecordingTimes) GetDurationOk() (*float64, bool) { + if o == nil || o.Duration == nil { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *AssetRecordingTimes) HasDuration() bool { + if o != nil && o.Duration != nil { + return true + } + + return false +} + +// SetDuration gets a reference to the given float64 and assigns it to the Duration field. +func (o *AssetRecordingTimes) SetDuration(v float64) { + o.Duration = &v +} + +func (o AssetRecordingTimes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.StartedAt != nil { + toSerialize["started_at"] = o.StartedAt + } + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + return json.Marshal(toSerialize) +} + +type NullableAssetRecordingTimes struct { + value *AssetRecordingTimes + isSet bool +} + +func (v NullableAssetRecordingTimes) Get() *AssetRecordingTimes { + return v.value +} + +func (v *NullableAssetRecordingTimes) Set(val *AssetRecordingTimes) { + v.value = val + v.isSet = true +} + +func (v NullableAssetRecordingTimes) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetRecordingTimes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetRecordingTimes(val *AssetRecordingTimes) *NullableAssetRecordingTimes { + return &NullableAssetRecordingTimes{value: val, isSet: true} +} + +func (v NullableAssetRecordingTimes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetRecordingTimes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_response.go b/model_asset_response.go index aeafd8d..c2548b3 100644 --- a/model_asset_response.go +++ b/model_asset_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// AssetResponse struct for AssetResponse type AssetResponse struct { - Data Asset `json:"data,omitempty"` + Data *Asset `json:"data,omitempty"` +} + +// NewAssetResponse instantiates a new AssetResponse 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 NewAssetResponse() *AssetResponse { + this := AssetResponse{} + return &this +} + +// NewAssetResponseWithDefaults instantiates a new AssetResponse 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 NewAssetResponseWithDefaults() *AssetResponse { + this := AssetResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AssetResponse) GetData() Asset { + if o == nil || o.Data == nil { + var ret Asset + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetResponse) GetDataOk() (*Asset, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *AssetResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given Asset and assigns it to the Data field. +func (o *AssetResponse) SetData(v Asset) { + o.Data = &v +} + +func (o AssetResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableAssetResponse struct { + value *AssetResponse + isSet bool +} + +func (v NullableAssetResponse) Get() *AssetResponse { + return v.value +} + +func (v *NullableAssetResponse) Set(val *AssetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAssetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetResponse(val *AssetResponse) *NullableAssetResponse { + return &NullableAssetResponse{value: val, isSet: true} +} + +func (v NullableAssetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_static_renditions.go b/model_asset_static_renditions.go index ae6aef3..fba325c 100644 --- a/model_asset_static_renditions.go +++ b/model_asset_static_renditions.go @@ -1,10 +1,157 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// AssetStaticRenditions An object containing the current status of any static renditions (mp4s). The object does not exist if no static renditions have been requested. See [Download your videos](https://docs.mux.com/guides/video/download-your-videos) for more information. type AssetStaticRenditions struct { // Indicates the status of downloadable MP4 versions of this asset. - Status string `json:"status,omitempty"` - Files []AssetStaticRenditionsFiles `json:"files,omitempty"` + Status *string `json:"status,omitempty"` + // Array of file objects. + Files *[]AssetStaticRenditionsFiles `json:"files,omitempty"` +} + +// NewAssetStaticRenditions instantiates a new AssetStaticRenditions 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 NewAssetStaticRenditions() *AssetStaticRenditions { + this := AssetStaticRenditions{} + var status string = "disabled" + this.Status = &status + return &this +} + +// NewAssetStaticRenditionsWithDefaults instantiates a new AssetStaticRenditions 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 NewAssetStaticRenditionsWithDefaults() *AssetStaticRenditions { + this := AssetStaticRenditions{} + var status string = "disabled" + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AssetStaticRenditions) GetStatus() string { + if o == nil || o.Status == nil { + 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 *AssetStaticRenditions) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *AssetStaticRenditions) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *AssetStaticRenditions) SetStatus(v string) { + o.Status = &v +} + +// GetFiles returns the Files field value if set, zero value otherwise. +func (o *AssetStaticRenditions) GetFiles() []AssetStaticRenditionsFiles { + if o == nil || o.Files == nil { + var ret []AssetStaticRenditionsFiles + return ret + } + return *o.Files +} + +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetStaticRenditions) GetFilesOk() (*[]AssetStaticRenditionsFiles, bool) { + if o == nil || o.Files == nil { + return nil, false + } + return o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *AssetStaticRenditions) HasFiles() bool { + if o != nil && o.Files != nil { + return true + } + + return false } + +// SetFiles gets a reference to the given []AssetStaticRenditionsFiles and assigns it to the Files field. +func (o *AssetStaticRenditions) SetFiles(v []AssetStaticRenditionsFiles) { + o.Files = &v +} + +func (o AssetStaticRenditions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Files != nil { + toSerialize["files"] = o.Files + } + return json.Marshal(toSerialize) +} + +type NullableAssetStaticRenditions struct { + value *AssetStaticRenditions + isSet bool +} + +func (v NullableAssetStaticRenditions) Get() *AssetStaticRenditions { + return v.value +} + +func (v *NullableAssetStaticRenditions) Set(val *AssetStaticRenditions) { + v.value = val + v.isSet = true +} + +func (v NullableAssetStaticRenditions) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetStaticRenditions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetStaticRenditions(val *AssetStaticRenditions) *NullableAssetStaticRenditions { + return &NullableAssetStaticRenditions{value: val, isSet: true} +} + +func (v NullableAssetStaticRenditions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetStaticRenditions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_asset_static_renditions_files.go b/model_asset_static_renditions_files.go index 5c21673..6483b8c 100644 --- a/model_asset_static_renditions_files.go +++ b/model_asset_static_renditions_files.go @@ -1,17 +1,300 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// AssetStaticRenditionsFiles struct for AssetStaticRenditionsFiles type AssetStaticRenditionsFiles struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` // Extension of the static rendition file - Ext string `json:"ext,omitempty"` + Ext *string `json:"ext,omitempty"` // The height of the static rendition's file in pixels - Height int32 `json:"height,omitempty"` + Height *int32 `json:"height,omitempty"` // The width of the static rendition's file in pixels - Width int32 `json:"width,omitempty"` + Width *int32 `json:"width,omitempty"` // The bitrate in bits per second - Bitrate int64 `json:"bitrate,omitempty"` - Filesize string `json:"filesize,omitempty"` + Bitrate *int64 `json:"bitrate,omitempty"` + // The file size in bytes + Filesize *string `json:"filesize,omitempty"` +} + +// NewAssetStaticRenditionsFiles instantiates a new AssetStaticRenditionsFiles 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 NewAssetStaticRenditionsFiles() *AssetStaticRenditionsFiles { + this := AssetStaticRenditionsFiles{} + return &this +} + +// NewAssetStaticRenditionsFilesWithDefaults instantiates a new AssetStaticRenditionsFiles 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 NewAssetStaticRenditionsFilesWithDefaults() *AssetStaticRenditionsFiles { + this := AssetStaticRenditionsFiles{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AssetStaticRenditionsFiles) GetName() string { + if o == nil || o.Name == nil { + 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 *AssetStaticRenditionsFiles) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AssetStaticRenditionsFiles) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AssetStaticRenditionsFiles) SetName(v string) { + o.Name = &v +} + +// GetExt returns the Ext field value if set, zero value otherwise. +func (o *AssetStaticRenditionsFiles) GetExt() string { + if o == nil || o.Ext == nil { + var ret string + return ret + } + return *o.Ext +} + +// GetExtOk returns a tuple with the Ext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetStaticRenditionsFiles) GetExtOk() (*string, bool) { + if o == nil || o.Ext == nil { + return nil, false + } + return o.Ext, true +} + +// HasExt returns a boolean if a field has been set. +func (o *AssetStaticRenditionsFiles) HasExt() bool { + if o != nil && o.Ext != nil { + return true + } + + return false +} + +// SetExt gets a reference to the given string and assigns it to the Ext field. +func (o *AssetStaticRenditionsFiles) SetExt(v string) { + o.Ext = &v +} + +// GetHeight returns the Height field value if set, zero value otherwise. +func (o *AssetStaticRenditionsFiles) GetHeight() int32 { + if o == nil || o.Height == nil { + var ret int32 + return ret + } + return *o.Height +} + +// GetHeightOk returns a tuple with the Height field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetStaticRenditionsFiles) GetHeightOk() (*int32, bool) { + if o == nil || o.Height == nil { + return nil, false + } + return o.Height, true +} + +// HasHeight returns a boolean if a field has been set. +func (o *AssetStaticRenditionsFiles) HasHeight() bool { + if o != nil && o.Height != nil { + return true + } + + return false +} + +// SetHeight gets a reference to the given int32 and assigns it to the Height field. +func (o *AssetStaticRenditionsFiles) SetHeight(v int32) { + o.Height = &v +} + +// GetWidth returns the Width field value if set, zero value otherwise. +func (o *AssetStaticRenditionsFiles) GetWidth() int32 { + if o == nil || o.Width == nil { + var ret int32 + return ret + } + return *o.Width +} + +// GetWidthOk returns a tuple with the Width field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetStaticRenditionsFiles) GetWidthOk() (*int32, bool) { + if o == nil || o.Width == nil { + return nil, false + } + return o.Width, true +} + +// HasWidth returns a boolean if a field has been set. +func (o *AssetStaticRenditionsFiles) HasWidth() bool { + if o != nil && o.Width != nil { + return true + } + + return false } + +// SetWidth gets a reference to the given int32 and assigns it to the Width field. +func (o *AssetStaticRenditionsFiles) SetWidth(v int32) { + o.Width = &v +} + +// GetBitrate returns the Bitrate field value if set, zero value otherwise. +func (o *AssetStaticRenditionsFiles) GetBitrate() int64 { + if o == nil || o.Bitrate == nil { + var ret int64 + return ret + } + return *o.Bitrate +} + +// GetBitrateOk returns a tuple with the Bitrate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetStaticRenditionsFiles) GetBitrateOk() (*int64, bool) { + if o == nil || o.Bitrate == nil { + return nil, false + } + return o.Bitrate, true +} + +// HasBitrate returns a boolean if a field has been set. +func (o *AssetStaticRenditionsFiles) HasBitrate() bool { + if o != nil && o.Bitrate != nil { + return true + } + + return false +} + +// SetBitrate gets a reference to the given int64 and assigns it to the Bitrate field. +func (o *AssetStaticRenditionsFiles) SetBitrate(v int64) { + o.Bitrate = &v +} + +// GetFilesize returns the Filesize field value if set, zero value otherwise. +func (o *AssetStaticRenditionsFiles) GetFilesize() string { + if o == nil || o.Filesize == nil { + var ret string + return ret + } + return *o.Filesize +} + +// GetFilesizeOk returns a tuple with the Filesize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetStaticRenditionsFiles) GetFilesizeOk() (*string, bool) { + if o == nil || o.Filesize == nil { + return nil, false + } + return o.Filesize, true +} + +// HasFilesize returns a boolean if a field has been set. +func (o *AssetStaticRenditionsFiles) HasFilesize() bool { + if o != nil && o.Filesize != nil { + return true + } + + return false +} + +// SetFilesize gets a reference to the given string and assigns it to the Filesize field. +func (o *AssetStaticRenditionsFiles) SetFilesize(v string) { + o.Filesize = &v +} + +func (o AssetStaticRenditionsFiles) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Ext != nil { + toSerialize["ext"] = o.Ext + } + if o.Height != nil { + toSerialize["height"] = o.Height + } + if o.Width != nil { + toSerialize["width"] = o.Width + } + if o.Bitrate != nil { + toSerialize["bitrate"] = o.Bitrate + } + if o.Filesize != nil { + toSerialize["filesize"] = o.Filesize + } + return json.Marshal(toSerialize) +} + +type NullableAssetStaticRenditionsFiles struct { + value *AssetStaticRenditionsFiles + isSet bool +} + +func (v NullableAssetStaticRenditionsFiles) Get() *AssetStaticRenditionsFiles { + return v.value +} + +func (v *NullableAssetStaticRenditionsFiles) Set(val *AssetStaticRenditionsFiles) { + v.value = val + v.isSet = true +} + +func (v NullableAssetStaticRenditionsFiles) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetStaticRenditionsFiles) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetStaticRenditionsFiles(val *AssetStaticRenditionsFiles) *NullableAssetStaticRenditionsFiles { + return &NullableAssetStaticRenditionsFiles{value: val, isSet: true} +} + +func (v NullableAssetStaticRenditionsFiles) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetStaticRenditionsFiles) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_breakdown_value.go b/model_breakdown_value.go index 3abecec..05182c1 100644 --- a/model_breakdown_value.go +++ b/model_breakdown_value.go @@ -1,12 +1,259 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// BreakdownValue struct for BreakdownValue type BreakdownValue struct { - Views int64 `json:"views,omitempty"` - Value float64 `json:"value,omitempty"` - TotalWatchTime int64 `json:"total_watch_time,omitempty"` - NegativeImpact int32 `json:"negative_impact,omitempty"` - Field string `json:"field,omitempty"` + Views *int64 `json:"views,omitempty"` + Value *float64 `json:"value,omitempty"` + TotalWatchTime *int64 `json:"total_watch_time,omitempty"` + NegativeImpact *int32 `json:"negative_impact,omitempty"` + Field *string `json:"field,omitempty"` +} + +// NewBreakdownValue instantiates a new BreakdownValue 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 NewBreakdownValue() *BreakdownValue { + this := BreakdownValue{} + return &this +} + +// NewBreakdownValueWithDefaults instantiates a new BreakdownValue 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 NewBreakdownValueWithDefaults() *BreakdownValue { + this := BreakdownValue{} + return &this +} + +// GetViews returns the Views field value if set, zero value otherwise. +func (o *BreakdownValue) GetViews() int64 { + if o == nil || o.Views == nil { + var ret int64 + return ret + } + return *o.Views +} + +// GetViewsOk returns a tuple with the Views field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BreakdownValue) GetViewsOk() (*int64, bool) { + if o == nil || o.Views == nil { + return nil, false + } + return o.Views, true +} + +// HasViews returns a boolean if a field has been set. +func (o *BreakdownValue) HasViews() bool { + if o != nil && o.Views != nil { + return true + } + + return false +} + +// SetViews gets a reference to the given int64 and assigns it to the Views field. +func (o *BreakdownValue) SetViews(v int64) { + o.Views = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *BreakdownValue) GetValue() float64 { + if o == nil || o.Value == nil { + var ret float64 + 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. +func (o *BreakdownValue) GetValueOk() (*float64, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *BreakdownValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *BreakdownValue) SetValue(v float64) { + o.Value = &v +} + +// GetTotalWatchTime returns the TotalWatchTime field value if set, zero value otherwise. +func (o *BreakdownValue) GetTotalWatchTime() int64 { + if o == nil || o.TotalWatchTime == nil { + var ret int64 + return ret + } + return *o.TotalWatchTime +} + +// GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BreakdownValue) GetTotalWatchTimeOk() (*int64, bool) { + if o == nil || o.TotalWatchTime == nil { + return nil, false + } + return o.TotalWatchTime, true } + +// HasTotalWatchTime returns a boolean if a field has been set. +func (o *BreakdownValue) HasTotalWatchTime() bool { + if o != nil && o.TotalWatchTime != nil { + return true + } + + return false +} + +// SetTotalWatchTime gets a reference to the given int64 and assigns it to the TotalWatchTime field. +func (o *BreakdownValue) SetTotalWatchTime(v int64) { + o.TotalWatchTime = &v +} + +// GetNegativeImpact returns the NegativeImpact field value if set, zero value otherwise. +func (o *BreakdownValue) GetNegativeImpact() int32 { + if o == nil || o.NegativeImpact == nil { + var ret int32 + return ret + } + return *o.NegativeImpact +} + +// GetNegativeImpactOk returns a tuple with the NegativeImpact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BreakdownValue) GetNegativeImpactOk() (*int32, bool) { + if o == nil || o.NegativeImpact == nil { + return nil, false + } + return o.NegativeImpact, true +} + +// HasNegativeImpact returns a boolean if a field has been set. +func (o *BreakdownValue) HasNegativeImpact() bool { + if o != nil && o.NegativeImpact != nil { + return true + } + + return false +} + +// SetNegativeImpact gets a reference to the given int32 and assigns it to the NegativeImpact field. +func (o *BreakdownValue) SetNegativeImpact(v int32) { + o.NegativeImpact = &v +} + +// GetField returns the Field field value if set, zero value otherwise. +func (o *BreakdownValue) GetField() string { + if o == nil || o.Field == nil { + var ret string + return ret + } + return *o.Field +} + +// GetFieldOk returns a tuple with the Field field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BreakdownValue) GetFieldOk() (*string, bool) { + if o == nil || o.Field == nil { + return nil, false + } + return o.Field, true +} + +// HasField returns a boolean if a field has been set. +func (o *BreakdownValue) HasField() bool { + if o != nil && o.Field != nil { + return true + } + + return false +} + +// SetField gets a reference to the given string and assigns it to the Field field. +func (o *BreakdownValue) SetField(v string) { + o.Field = &v +} + +func (o BreakdownValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Views != nil { + toSerialize["views"] = o.Views + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.TotalWatchTime != nil { + toSerialize["total_watch_time"] = o.TotalWatchTime + } + if o.NegativeImpact != nil { + toSerialize["negative_impact"] = o.NegativeImpact + } + if o.Field != nil { + toSerialize["field"] = o.Field + } + return json.Marshal(toSerialize) +} + +type NullableBreakdownValue struct { + value *BreakdownValue + isSet bool +} + +func (v NullableBreakdownValue) Get() *BreakdownValue { + return v.value +} + +func (v *NullableBreakdownValue) Set(val *BreakdownValue) { + v.value = val + v.isSet = true +} + +func (v NullableBreakdownValue) IsSet() bool { + return v.isSet +} + +func (v *NullableBreakdownValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBreakdownValue(val *BreakdownValue) *NullableBreakdownValue { + return &NullableBreakdownValue{value: val, isSet: true} +} + +func (v NullableBreakdownValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBreakdownValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_asset_request.go b/model_create_asset_request.go index 99f8f77..666503d 100644 --- a/model_create_asset_request.go +++ b/model_create_asset_request.go @@ -1,22 +1,378 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// CreateAssetRequest struct for CreateAssetRequest type CreateAssetRequest struct { // An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. - Input []InputSettings `json:"input,omitempty"` + Input *[]InputSettings `json:"input,omitempty"` // An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. - PlaybackPolicy []PlaybackPolicy `json:"playback_policy,omitempty"` - PerTitleEncode bool `json:"per_title_encode,omitempty"` + PlaybackPolicy *[]PlaybackPolicy `json:"playback_policy,omitempty"` + PerTitleEncode *bool `json:"per_title_encode,omitempty"` // Arbitrary metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. - Passthrough string `json:"passthrough,omitempty"` - // Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. - Mp4Support string `json:"mp4_support,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` + // Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](/guides/video/download-your-videos) for more information. + Mp4Support *string `json:"mp4_support,omitempty"` // Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. - NormalizeAudio bool `json:"normalize_audio,omitempty"` - // Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your vidoes guide](/guides/video/download-your-videos) for more information. - MasterAccess string `json:"master_access,omitempty"` + NormalizeAudio *bool `json:"normalize_audio,omitempty"` + // Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](/guides/video/download-your-videos) for more information. + MasterAccess *string `json:"master_access,omitempty"` // Marks the asset as a test asset when the value is set to true. A Test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test asset are watermarked with the Mux logo, limited to 10 seconds, deleted after 24 hrs. - Test bool `json:"test,omitempty"` + Test *bool `json:"test,omitempty"` +} + +// NewCreateAssetRequest instantiates a new CreateAssetRequest 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 NewCreateAssetRequest() *CreateAssetRequest { + this := CreateAssetRequest{} + var normalizeAudio bool = false + this.NormalizeAudio = &normalizeAudio + return &this +} + +// NewCreateAssetRequestWithDefaults instantiates a new CreateAssetRequest 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 NewCreateAssetRequestWithDefaults() *CreateAssetRequest { + this := CreateAssetRequest{} + var normalizeAudio bool = false + this.NormalizeAudio = &normalizeAudio + return &this +} + +// GetInput returns the Input field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetInput() []InputSettings { + if o == nil || o.Input == nil { + var ret []InputSettings + return ret + } + return *o.Input +} + +// GetInputOk returns a tuple with the Input field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetInputOk() (*[]InputSettings, bool) { + if o == nil || o.Input == nil { + return nil, false + } + return o.Input, true +} + +// HasInput returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasInput() bool { + if o != nil && o.Input != nil { + return true + } + + return false +} + +// SetInput gets a reference to the given []InputSettings and assigns it to the Input field. +func (o *CreateAssetRequest) SetInput(v []InputSettings) { + o.Input = &v +} + +// GetPlaybackPolicy returns the PlaybackPolicy field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetPlaybackPolicy() []PlaybackPolicy { + if o == nil || o.PlaybackPolicy == nil { + var ret []PlaybackPolicy + return ret + } + return *o.PlaybackPolicy +} + +// GetPlaybackPolicyOk returns a tuple with the PlaybackPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetPlaybackPolicyOk() (*[]PlaybackPolicy, bool) { + if o == nil || o.PlaybackPolicy == nil { + return nil, false + } + return o.PlaybackPolicy, true +} + +// HasPlaybackPolicy returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasPlaybackPolicy() bool { + if o != nil && o.PlaybackPolicy != nil { + return true + } + + return false +} + +// SetPlaybackPolicy gets a reference to the given []PlaybackPolicy and assigns it to the PlaybackPolicy field. +func (o *CreateAssetRequest) SetPlaybackPolicy(v []PlaybackPolicy) { + o.PlaybackPolicy = &v +} + +// GetPerTitleEncode returns the PerTitleEncode field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetPerTitleEncode() bool { + if o == nil || o.PerTitleEncode == nil { + var ret bool + return ret + } + return *o.PerTitleEncode +} + +// GetPerTitleEncodeOk returns a tuple with the PerTitleEncode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetPerTitleEncodeOk() (*bool, bool) { + if o == nil || o.PerTitleEncode == nil { + return nil, false + } + return o.PerTitleEncode, true +} + +// HasPerTitleEncode returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasPerTitleEncode() bool { + if o != nil && o.PerTitleEncode != nil { + return true + } + + return false +} + +// SetPerTitleEncode gets a reference to the given bool and assigns it to the PerTitleEncode field. +func (o *CreateAssetRequest) SetPerTitleEncode(v bool) { + o.PerTitleEncode = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *CreateAssetRequest) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetMp4Support returns the Mp4Support field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetMp4Support() string { + if o == nil || o.Mp4Support == nil { + var ret string + return ret + } + return *o.Mp4Support +} + +// GetMp4SupportOk returns a tuple with the Mp4Support field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetMp4SupportOk() (*string, bool) { + if o == nil || o.Mp4Support == nil { + return nil, false + } + return o.Mp4Support, true +} + +// HasMp4Support returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasMp4Support() bool { + if o != nil && o.Mp4Support != nil { + return true + } + + return false } + +// SetMp4Support gets a reference to the given string and assigns it to the Mp4Support field. +func (o *CreateAssetRequest) SetMp4Support(v string) { + o.Mp4Support = &v +} + +// GetNormalizeAudio returns the NormalizeAudio field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetNormalizeAudio() bool { + if o == nil || o.NormalizeAudio == nil { + var ret bool + return ret + } + return *o.NormalizeAudio +} + +// GetNormalizeAudioOk returns a tuple with the NormalizeAudio field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetNormalizeAudioOk() (*bool, bool) { + if o == nil || o.NormalizeAudio == nil { + return nil, false + } + return o.NormalizeAudio, true +} + +// HasNormalizeAudio returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasNormalizeAudio() bool { + if o != nil && o.NormalizeAudio != nil { + return true + } + + return false +} + +// SetNormalizeAudio gets a reference to the given bool and assigns it to the NormalizeAudio field. +func (o *CreateAssetRequest) SetNormalizeAudio(v bool) { + o.NormalizeAudio = &v +} + +// GetMasterAccess returns the MasterAccess field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetMasterAccess() string { + if o == nil || o.MasterAccess == nil { + var ret string + return ret + } + return *o.MasterAccess +} + +// GetMasterAccessOk returns a tuple with the MasterAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetMasterAccessOk() (*string, bool) { + if o == nil || o.MasterAccess == nil { + return nil, false + } + return o.MasterAccess, true +} + +// HasMasterAccess returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasMasterAccess() bool { + if o != nil && o.MasterAccess != nil { + return true + } + + return false +} + +// SetMasterAccess gets a reference to the given string and assigns it to the MasterAccess field. +func (o *CreateAssetRequest) SetMasterAccess(v string) { + o.MasterAccess = &v +} + +// GetTest returns the Test field value if set, zero value otherwise. +func (o *CreateAssetRequest) GetTest() bool { + if o == nil || o.Test == nil { + var ret bool + return ret + } + return *o.Test +} + +// GetTestOk returns a tuple with the Test field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRequest) GetTestOk() (*bool, bool) { + if o == nil || o.Test == nil { + return nil, false + } + return o.Test, true +} + +// HasTest returns a boolean if a field has been set. +func (o *CreateAssetRequest) HasTest() bool { + if o != nil && o.Test != nil { + return true + } + + return false +} + +// SetTest gets a reference to the given bool and assigns it to the Test field. +func (o *CreateAssetRequest) SetTest(v bool) { + o.Test = &v +} + +func (o CreateAssetRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Input != nil { + toSerialize["input"] = o.Input + } + if o.PlaybackPolicy != nil { + toSerialize["playback_policy"] = o.PlaybackPolicy + } + if o.PerTitleEncode != nil { + toSerialize["per_title_encode"] = o.PerTitleEncode + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.Mp4Support != nil { + toSerialize["mp4_support"] = o.Mp4Support + } + if o.NormalizeAudio != nil { + toSerialize["normalize_audio"] = o.NormalizeAudio + } + if o.MasterAccess != nil { + toSerialize["master_access"] = o.MasterAccess + } + if o.Test != nil { + toSerialize["test"] = o.Test + } + return json.Marshal(toSerialize) +} + +type NullableCreateAssetRequest struct { + value *CreateAssetRequest + isSet bool +} + +func (v NullableCreateAssetRequest) Get() *CreateAssetRequest { + return v.value +} + +func (v *NullableCreateAssetRequest) Set(val *CreateAssetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAssetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAssetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAssetRequest(val *CreateAssetRequest) *NullableCreateAssetRequest { + return &NullableCreateAssetRequest{value: val, isSet: true} +} + +func (v NullableCreateAssetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAssetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_live_stream_request.go b/model_create_live_stream_request.go index dc02157..1f5f2fe 100644 --- a/model_create_live_stream_request.go +++ b/model_create_live_stream_request.go @@ -1,16 +1,334 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// CreateLiveStreamRequest struct for CreateLiveStreamRequest type CreateLiveStreamRequest struct { - PlaybackPolicy []PlaybackPolicy `json:"playback_policy,omitempty"` - NewAssetSettings CreateAssetRequest `json:"new_asset_settings,omitempty"` + PlaybackPolicy *[]PlaybackPolicy `json:"playback_policy,omitempty"` + NewAssetSettings *CreateAssetRequest `json:"new_asset_settings,omitempty"` // When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. - ReconnectWindow float32 `json:"reconnect_window,omitempty"` - Passthrough string `json:"passthrough,omitempty"` + ReconnectWindow *float32 `json:"reconnect_window,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` // Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ - ReducedLatency bool `json:"reduced_latency,omitempty"` - Test bool `json:"test,omitempty"` - SimulcastTargets []CreateSimulcastTargetRequest `json:"simulcast_targets,omitempty"` + ReducedLatency *bool `json:"reduced_latency,omitempty"` + // Marks the live stream as a test live stream when the value is set to true. A test live stream can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test live streams created. Test live streams are watermarked with the Mux logo and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. + Test *bool `json:"test,omitempty"` + SimulcastTargets *[]CreateSimulcastTargetRequest `json:"simulcast_targets,omitempty"` +} + +// NewCreateLiveStreamRequest instantiates a new CreateLiveStreamRequest 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 NewCreateLiveStreamRequest() *CreateLiveStreamRequest { + this := CreateLiveStreamRequest{} + return &this +} + +// NewCreateLiveStreamRequestWithDefaults instantiates a new CreateLiveStreamRequest 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 NewCreateLiveStreamRequestWithDefaults() *CreateLiveStreamRequest { + this := CreateLiveStreamRequest{} + return &this } + +// GetPlaybackPolicy returns the PlaybackPolicy field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetPlaybackPolicy() []PlaybackPolicy { + if o == nil || o.PlaybackPolicy == nil { + var ret []PlaybackPolicy + return ret + } + return *o.PlaybackPolicy +} + +// GetPlaybackPolicyOk returns a tuple with the PlaybackPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetPlaybackPolicyOk() (*[]PlaybackPolicy, bool) { + if o == nil || o.PlaybackPolicy == nil { + return nil, false + } + return o.PlaybackPolicy, true +} + +// HasPlaybackPolicy returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasPlaybackPolicy() bool { + if o != nil && o.PlaybackPolicy != nil { + return true + } + + return false +} + +// SetPlaybackPolicy gets a reference to the given []PlaybackPolicy and assigns it to the PlaybackPolicy field. +func (o *CreateLiveStreamRequest) SetPlaybackPolicy(v []PlaybackPolicy) { + o.PlaybackPolicy = &v +} + +// GetNewAssetSettings returns the NewAssetSettings field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetNewAssetSettings() CreateAssetRequest { + if o == nil || o.NewAssetSettings == nil { + var ret CreateAssetRequest + return ret + } + return *o.NewAssetSettings +} + +// GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetNewAssetSettingsOk() (*CreateAssetRequest, bool) { + if o == nil || o.NewAssetSettings == nil { + return nil, false + } + return o.NewAssetSettings, true +} + +// HasNewAssetSettings returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasNewAssetSettings() bool { + if o != nil && o.NewAssetSettings != nil { + return true + } + + return false +} + +// SetNewAssetSettings gets a reference to the given CreateAssetRequest and assigns it to the NewAssetSettings field. +func (o *CreateLiveStreamRequest) SetNewAssetSettings(v CreateAssetRequest) { + o.NewAssetSettings = &v +} + +// GetReconnectWindow returns the ReconnectWindow field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetReconnectWindow() float32 { + if o == nil || o.ReconnectWindow == nil { + var ret float32 + return ret + } + return *o.ReconnectWindow +} + +// GetReconnectWindowOk returns a tuple with the ReconnectWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetReconnectWindowOk() (*float32, bool) { + if o == nil || o.ReconnectWindow == nil { + return nil, false + } + return o.ReconnectWindow, true +} + +// HasReconnectWindow returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasReconnectWindow() bool { + if o != nil && o.ReconnectWindow != nil { + return true + } + + return false +} + +// SetReconnectWindow gets a reference to the given float32 and assigns it to the ReconnectWindow field. +func (o *CreateLiveStreamRequest) SetReconnectWindow(v float32) { + o.ReconnectWindow = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *CreateLiveStreamRequest) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetReducedLatency returns the ReducedLatency field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetReducedLatency() bool { + if o == nil || o.ReducedLatency == nil { + var ret bool + return ret + } + return *o.ReducedLatency +} + +// GetReducedLatencyOk returns a tuple with the ReducedLatency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetReducedLatencyOk() (*bool, bool) { + if o == nil || o.ReducedLatency == nil { + return nil, false + } + return o.ReducedLatency, true +} + +// HasReducedLatency returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasReducedLatency() bool { + if o != nil && o.ReducedLatency != nil { + return true + } + + return false +} + +// SetReducedLatency gets a reference to the given bool and assigns it to the ReducedLatency field. +func (o *CreateLiveStreamRequest) SetReducedLatency(v bool) { + o.ReducedLatency = &v +} + +// GetTest returns the Test field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetTest() bool { + if o == nil || o.Test == nil { + var ret bool + return ret + } + return *o.Test +} + +// GetTestOk returns a tuple with the Test field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetTestOk() (*bool, bool) { + if o == nil || o.Test == nil { + return nil, false + } + return o.Test, true +} + +// HasTest returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasTest() bool { + if o != nil && o.Test != nil { + return true + } + + return false +} + +// SetTest gets a reference to the given bool and assigns it to the Test field. +func (o *CreateLiveStreamRequest) SetTest(v bool) { + o.Test = &v +} + +// GetSimulcastTargets returns the SimulcastTargets field value if set, zero value otherwise. +func (o *CreateLiveStreamRequest) GetSimulcastTargets() []CreateSimulcastTargetRequest { + if o == nil || o.SimulcastTargets == nil { + var ret []CreateSimulcastTargetRequest + return ret + } + return *o.SimulcastTargets +} + +// GetSimulcastTargetsOk returns a tuple with the SimulcastTargets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateLiveStreamRequest) GetSimulcastTargetsOk() (*[]CreateSimulcastTargetRequest, bool) { + if o == nil || o.SimulcastTargets == nil { + return nil, false + } + return o.SimulcastTargets, true +} + +// HasSimulcastTargets returns a boolean if a field has been set. +func (o *CreateLiveStreamRequest) HasSimulcastTargets() bool { + if o != nil && o.SimulcastTargets != nil { + return true + } + + return false +} + +// SetSimulcastTargets gets a reference to the given []CreateSimulcastTargetRequest and assigns it to the SimulcastTargets field. +func (o *CreateLiveStreamRequest) SetSimulcastTargets(v []CreateSimulcastTargetRequest) { + o.SimulcastTargets = &v +} + +func (o CreateLiveStreamRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.PlaybackPolicy != nil { + toSerialize["playback_policy"] = o.PlaybackPolicy + } + if o.NewAssetSettings != nil { + toSerialize["new_asset_settings"] = o.NewAssetSettings + } + if o.ReconnectWindow != nil { + toSerialize["reconnect_window"] = o.ReconnectWindow + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.ReducedLatency != nil { + toSerialize["reduced_latency"] = o.ReducedLatency + } + if o.Test != nil { + toSerialize["test"] = o.Test + } + if o.SimulcastTargets != nil { + toSerialize["simulcast_targets"] = o.SimulcastTargets + } + return json.Marshal(toSerialize) +} + +type NullableCreateLiveStreamRequest struct { + value *CreateLiveStreamRequest + isSet bool +} + +func (v NullableCreateLiveStreamRequest) Get() *CreateLiveStreamRequest { + return v.value +} + +func (v *NullableCreateLiveStreamRequest) Set(val *CreateLiveStreamRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateLiveStreamRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateLiveStreamRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateLiveStreamRequest(val *CreateLiveStreamRequest) *NullableCreateLiveStreamRequest { + return &NullableCreateLiveStreamRequest{value: val, isSet: true} +} + +func (v NullableCreateLiveStreamRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateLiveStreamRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_playback_id_request.go b/model_create_playback_id_request.go index bb3a00e..44fc98d 100644 --- a/model_create_playback_id_request.go +++ b/model_create_playback_id_request.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -type CreatePlaybackIdRequest struct { - Policy PlaybackPolicy `json:"policy,omitempty"` +import ( + "encoding/json" +) + +// CreatePlaybackIDRequest struct for CreatePlaybackIDRequest +type CreatePlaybackIDRequest struct { + Policy *PlaybackPolicy `json:"policy,omitempty"` +} + +// NewCreatePlaybackIDRequest instantiates a new CreatePlaybackIDRequest 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 NewCreatePlaybackIDRequest() *CreatePlaybackIDRequest { + this := CreatePlaybackIDRequest{} + return &this +} + +// NewCreatePlaybackIDRequestWithDefaults instantiates a new CreatePlaybackIDRequest 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 NewCreatePlaybackIDRequestWithDefaults() *CreatePlaybackIDRequest { + this := CreatePlaybackIDRequest{} + return &this +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *CreatePlaybackIDRequest) GetPolicy() PlaybackPolicy { + if o == nil || o.Policy == nil { + var ret PlaybackPolicy + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePlaybackIDRequest) GetPolicyOk() (*PlaybackPolicy, bool) { + if o == nil || o.Policy == nil { + return nil, false + } + return o.Policy, true } + +// HasPolicy returns a boolean if a field has been set. +func (o *CreatePlaybackIDRequest) HasPolicy() bool { + if o != nil && o.Policy != nil { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PlaybackPolicy and assigns it to the Policy field. +func (o *CreatePlaybackIDRequest) SetPolicy(v PlaybackPolicy) { + o.Policy = &v +} + +func (o CreatePlaybackIDRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Policy != nil { + toSerialize["policy"] = o.Policy + } + return json.Marshal(toSerialize) +} + +type NullableCreatePlaybackIDRequest struct { + value *CreatePlaybackIDRequest + isSet bool +} + +func (v NullableCreatePlaybackIDRequest) Get() *CreatePlaybackIDRequest { + return v.value +} + +func (v *NullableCreatePlaybackIDRequest) Set(val *CreatePlaybackIDRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatePlaybackIDRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatePlaybackIDRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatePlaybackIDRequest(val *CreatePlaybackIDRequest) *NullableCreatePlaybackIDRequest { + return &NullableCreatePlaybackIDRequest{value: val, isSet: true} +} + +func (v NullableCreatePlaybackIDRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatePlaybackIDRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_playback_id_response.go b/model_create_playback_id_response.go index 9a80df3..013554a 100644 --- a/model_create_playback_id_response.go +++ b/model_create_playback_id_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -type CreatePlaybackIdResponse struct { - Data PlaybackId `json:"data,omitempty"` +import ( + "encoding/json" +) + +// CreatePlaybackIDResponse struct for CreatePlaybackIDResponse +type CreatePlaybackIDResponse struct { + Data *PlaybackID `json:"data,omitempty"` +} + +// NewCreatePlaybackIDResponse instantiates a new CreatePlaybackIDResponse 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 NewCreatePlaybackIDResponse() *CreatePlaybackIDResponse { + this := CreatePlaybackIDResponse{} + return &this +} + +// NewCreatePlaybackIDResponseWithDefaults instantiates a new CreatePlaybackIDResponse 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 NewCreatePlaybackIDResponseWithDefaults() *CreatePlaybackIDResponse { + this := CreatePlaybackIDResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CreatePlaybackIDResponse) GetData() PlaybackID { + if o == nil || o.Data == nil { + var ret PlaybackID + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePlaybackIDResponse) GetDataOk() (*PlaybackID, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *CreatePlaybackIDResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given PlaybackID and assigns it to the Data field. +func (o *CreatePlaybackIDResponse) SetData(v PlaybackID) { + o.Data = &v +} + +func (o CreatePlaybackIDResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableCreatePlaybackIDResponse struct { + value *CreatePlaybackIDResponse + isSet bool +} + +func (v NullableCreatePlaybackIDResponse) Get() *CreatePlaybackIDResponse { + return v.value +} + +func (v *NullableCreatePlaybackIDResponse) Set(val *CreatePlaybackIDResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreatePlaybackIDResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatePlaybackIDResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatePlaybackIDResponse(val *CreatePlaybackIDResponse) *NullableCreatePlaybackIDResponse { + return &NullableCreatePlaybackIDResponse{value: val, isSet: true} +} + +func (v NullableCreatePlaybackIDResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatePlaybackIDResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_simulcast_target_request.go b/model_create_simulcast_target_request.go index 073cc7a..0717cea 100644 --- a/model_create_simulcast_target_request.go +++ b/model_create_simulcast_target_request.go @@ -1,13 +1,183 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// CreateSimulcastTargetRequest struct for CreateSimulcastTargetRequest type CreateSimulcastTargetRequest struct { // Arbitrary metadata set by you when creating a simulcast target. - Passthrough string `json:"passthrough,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` // Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. - StreamKey string `json:"stream_key,omitempty"` + StreamKey *string `json:"stream_key,omitempty"` // RTMP hostname including application name for the third party live streaming service. Example: 'rtmp://live.example.com/app'. Url string `json:"url"` } + +// NewCreateSimulcastTargetRequest instantiates a new CreateSimulcastTargetRequest 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 NewCreateSimulcastTargetRequest(url string, ) *CreateSimulcastTargetRequest { + this := CreateSimulcastTargetRequest{} + this.Url = url + return &this +} + +// NewCreateSimulcastTargetRequestWithDefaults instantiates a new CreateSimulcastTargetRequest 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 NewCreateSimulcastTargetRequestWithDefaults() *CreateSimulcastTargetRequest { + this := CreateSimulcastTargetRequest{} + return &this +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *CreateSimulcastTargetRequest) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSimulcastTargetRequest) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *CreateSimulcastTargetRequest) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *CreateSimulcastTargetRequest) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetStreamKey returns the StreamKey field value if set, zero value otherwise. +func (o *CreateSimulcastTargetRequest) GetStreamKey() string { + if o == nil || o.StreamKey == nil { + var ret string + return ret + } + return *o.StreamKey +} + +// GetStreamKeyOk returns a tuple with the StreamKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSimulcastTargetRequest) GetStreamKeyOk() (*string, bool) { + if o == nil || o.StreamKey == nil { + return nil, false + } + return o.StreamKey, true +} + +// HasStreamKey returns a boolean if a field has been set. +func (o *CreateSimulcastTargetRequest) HasStreamKey() bool { + if o != nil && o.StreamKey != nil { + return true + } + + return false +} + +// SetStreamKey gets a reference to the given string and assigns it to the StreamKey field. +func (o *CreateSimulcastTargetRequest) SetStreamKey(v string) { + o.StreamKey = &v +} + +// GetUrl returns the Url field value +func (o *CreateSimulcastTargetRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *CreateSimulcastTargetRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *CreateSimulcastTargetRequest) SetUrl(v string) { + o.Url = v +} + +func (o CreateSimulcastTargetRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.StreamKey != nil { + toSerialize["stream_key"] = o.StreamKey + } + if true { + toSerialize["url"] = o.Url + } + return json.Marshal(toSerialize) +} + +type NullableCreateSimulcastTargetRequest struct { + value *CreateSimulcastTargetRequest + isSet bool +} + +func (v NullableCreateSimulcastTargetRequest) Get() *CreateSimulcastTargetRequest { + return v.value +} + +func (v *NullableCreateSimulcastTargetRequest) Set(val *CreateSimulcastTargetRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateSimulcastTargetRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateSimulcastTargetRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateSimulcastTargetRequest(val *CreateSimulcastTargetRequest) *NullableCreateSimulcastTargetRequest { + return &NullableCreateSimulcastTargetRequest{value: val, isSet: true} +} + +func (v NullableCreateSimulcastTargetRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateSimulcastTargetRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_track_request.go b/model_create_track_request.go index bee9d59..b276e84 100644 --- a/model_create_track_request.go +++ b/model_create_track_request.go @@ -1,18 +1,307 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// CreateTrackRequest struct for CreateTrackRequest type CreateTrackRequest struct { - Url string `json:"url"` - Type string `json:"type"` + Url string `json:"url"` + Type string `json:"type"` TextType string `json:"text_type"` // The language code value must be a valid BCP 47 specification compliant value. For example, en for English or en-US for the US version of English. LanguageCode string `json:"language_code"` // The name of the track containing a human-readable description. This value must be unqiue across all the text type and subtitles text type tracks. HLS manifest will associate subtitle text track with this value. For example, set the value to \"English\" for subtitles text track with language_code as en-US. If this parameter is not included, Mux will auto-populate based on the language_code value. - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` // Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). - ClosedCaptions bool `json:"closed_captions,omitempty"` + ClosedCaptions *bool `json:"closed_captions,omitempty"` // Arbitrary metadata set for the track either when creating the asset or track. - Passthrough string `json:"passthrough,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` +} + +// NewCreateTrackRequest instantiates a new CreateTrackRequest 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 NewCreateTrackRequest(url string, type_ string, textType string, languageCode string, ) *CreateTrackRequest { + this := CreateTrackRequest{} + this.Url = url + this.Type = type_ + this.TextType = textType + this.LanguageCode = languageCode + return &this +} + +// NewCreateTrackRequestWithDefaults instantiates a new CreateTrackRequest 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 NewCreateTrackRequestWithDefaults() *CreateTrackRequest { + this := CreateTrackRequest{} + return &this +} + +// GetUrl returns the Url field value +func (o *CreateTrackRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *CreateTrackRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *CreateTrackRequest) SetUrl(v string) { + o.Url = v +} + +// GetType returns the Type field value +func (o *CreateTrackRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateTrackRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateTrackRequest) SetType(v string) { + o.Type = v +} + +// GetTextType returns the TextType field value +func (o *CreateTrackRequest) GetTextType() string { + if o == nil { + var ret string + return ret + } + + return o.TextType +} + +// GetTextTypeOk returns a tuple with the TextType field value +// and a boolean to check if the value has been set. +func (o *CreateTrackRequest) GetTextTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TextType, true +} + +// SetTextType sets field value +func (o *CreateTrackRequest) SetTextType(v string) { + o.TextType = v +} + +// GetLanguageCode returns the LanguageCode field value +func (o *CreateTrackRequest) GetLanguageCode() string { + if o == nil { + var ret string + return ret + } + + return o.LanguageCode +} + +// GetLanguageCodeOk returns a tuple with the LanguageCode field value +// and a boolean to check if the value has been set. +func (o *CreateTrackRequest) GetLanguageCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LanguageCode, true +} + +// SetLanguageCode sets field value +func (o *CreateTrackRequest) SetLanguageCode(v string) { + o.LanguageCode = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateTrackRequest) GetName() string { + if o == nil || o.Name == nil { + 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 *CreateTrackRequest) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateTrackRequest) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateTrackRequest) SetName(v string) { + o.Name = &v +} + +// GetClosedCaptions returns the ClosedCaptions field value if set, zero value otherwise. +func (o *CreateTrackRequest) GetClosedCaptions() bool { + if o == nil || o.ClosedCaptions == nil { + var ret bool + return ret + } + return *o.ClosedCaptions +} + +// GetClosedCaptionsOk returns a tuple with the ClosedCaptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTrackRequest) GetClosedCaptionsOk() (*bool, bool) { + if o == nil || o.ClosedCaptions == nil { + return nil, false + } + return o.ClosedCaptions, true +} + +// HasClosedCaptions returns a boolean if a field has been set. +func (o *CreateTrackRequest) HasClosedCaptions() bool { + if o != nil && o.ClosedCaptions != nil { + return true + } + + return false +} + +// SetClosedCaptions gets a reference to the given bool and assigns it to the ClosedCaptions field. +func (o *CreateTrackRequest) SetClosedCaptions(v bool) { + o.ClosedCaptions = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *CreateTrackRequest) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTrackRequest) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *CreateTrackRequest) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *CreateTrackRequest) SetPassthrough(v string) { + o.Passthrough = &v +} + +func (o CreateTrackRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["url"] = o.Url + } + if true { + toSerialize["type"] = o.Type + } + if true { + toSerialize["text_type"] = o.TextType + } + if true { + toSerialize["language_code"] = o.LanguageCode + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.ClosedCaptions != nil { + toSerialize["closed_captions"] = o.ClosedCaptions + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + return json.Marshal(toSerialize) +} + +type NullableCreateTrackRequest struct { + value *CreateTrackRequest + isSet bool +} + +func (v NullableCreateTrackRequest) Get() *CreateTrackRequest { + return v.value +} + +func (v *NullableCreateTrackRequest) Set(val *CreateTrackRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateTrackRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateTrackRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateTrackRequest(val *CreateTrackRequest) *NullableCreateTrackRequest { + return &NullableCreateTrackRequest{value: val, isSet: true} +} + +func (v NullableCreateTrackRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateTrackRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_track_response.go b/model_create_track_response.go index caf8523..459c099 100644 --- a/model_create_track_response.go +++ b/model_create_track_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// CreateTrackResponse struct for CreateTrackResponse type CreateTrackResponse struct { - Data Track `json:"data,omitempty"` + Data *Track `json:"data,omitempty"` +} + +// NewCreateTrackResponse instantiates a new CreateTrackResponse 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 NewCreateTrackResponse() *CreateTrackResponse { + this := CreateTrackResponse{} + return &this +} + +// NewCreateTrackResponseWithDefaults instantiates a new CreateTrackResponse 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 NewCreateTrackResponseWithDefaults() *CreateTrackResponse { + this := CreateTrackResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CreateTrackResponse) GetData() Track { + if o == nil || o.Data == nil { + var ret Track + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTrackResponse) GetDataOk() (*Track, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *CreateTrackResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given Track and assigns it to the Data field. +func (o *CreateTrackResponse) SetData(v Track) { + o.Data = &v +} + +func (o CreateTrackResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableCreateTrackResponse struct { + value *CreateTrackResponse + isSet bool +} + +func (v NullableCreateTrackResponse) Get() *CreateTrackResponse { + return v.value +} + +func (v *NullableCreateTrackResponse) Set(val *CreateTrackResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateTrackResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateTrackResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateTrackResponse(val *CreateTrackResponse) *NullableCreateTrackResponse { + return &NullableCreateTrackResponse{value: val, isSet: true} +} + +func (v NullableCreateTrackResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateTrackResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_upload_request.go b/model_create_upload_request.go index 4a8b114..fb0b0da 100644 --- a/model_create_upload_request.go +++ b/model_create_upload_request.go @@ -1,13 +1,222 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// CreateUploadRequest struct for CreateUploadRequest type CreateUploadRequest struct { // Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` - Timeout int32 `json:"timeout,omitempty"` + Timeout *int32 `json:"timeout,omitempty"` // If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. - CorsOrigin string `json:"cors_origin,omitempty"` + CorsOrigin *string `json:"cors_origin,omitempty"` NewAssetSettings CreateAssetRequest `json:"new_asset_settings"` - Test bool `json:"test,omitempty"` + Test *bool `json:"test,omitempty"` +} + +// NewCreateUploadRequest instantiates a new CreateUploadRequest 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 NewCreateUploadRequest(newAssetSettings CreateAssetRequest, ) *CreateUploadRequest { + this := CreateUploadRequest{} + var timeout int32 = 3600 + this.Timeout = &timeout + this.NewAssetSettings = newAssetSettings + return &this +} + +// NewCreateUploadRequestWithDefaults instantiates a new CreateUploadRequest 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 NewCreateUploadRequestWithDefaults() *CreateUploadRequest { + this := CreateUploadRequest{} + var timeout int32 = 3600 + this.Timeout = &timeout + return &this +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *CreateUploadRequest) GetTimeout() int32 { + if o == nil || o.Timeout == nil { + var ret int32 + return ret + } + return *o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUploadRequest) GetTimeoutOk() (*int32, bool) { + if o == nil || o.Timeout == nil { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *CreateUploadRequest) HasTimeout() bool { + if o != nil && o.Timeout != nil { + return true + } + + return false +} + +// SetTimeout gets a reference to the given int32 and assigns it to the Timeout field. +func (o *CreateUploadRequest) SetTimeout(v int32) { + o.Timeout = &v +} + +// GetCorsOrigin returns the CorsOrigin field value if set, zero value otherwise. +func (o *CreateUploadRequest) GetCorsOrigin() string { + if o == nil || o.CorsOrigin == nil { + var ret string + return ret + } + return *o.CorsOrigin +} + +// GetCorsOriginOk returns a tuple with the CorsOrigin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUploadRequest) GetCorsOriginOk() (*string, bool) { + if o == nil || o.CorsOrigin == nil { + return nil, false + } + return o.CorsOrigin, true +} + +// HasCorsOrigin returns a boolean if a field has been set. +func (o *CreateUploadRequest) HasCorsOrigin() bool { + if o != nil && o.CorsOrigin != nil { + return true + } + + return false +} + +// SetCorsOrigin gets a reference to the given string and assigns it to the CorsOrigin field. +func (o *CreateUploadRequest) SetCorsOrigin(v string) { + o.CorsOrigin = &v +} + +// GetNewAssetSettings returns the NewAssetSettings field value +func (o *CreateUploadRequest) GetNewAssetSettings() CreateAssetRequest { + if o == nil { + var ret CreateAssetRequest + return ret + } + + return o.NewAssetSettings +} + +// GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field value +// and a boolean to check if the value has been set. +func (o *CreateUploadRequest) GetNewAssetSettingsOk() (*CreateAssetRequest, bool) { + if o == nil { + return nil, false + } + return &o.NewAssetSettings, true +} + +// SetNewAssetSettings sets field value +func (o *CreateUploadRequest) SetNewAssetSettings(v CreateAssetRequest) { + o.NewAssetSettings = v +} + +// GetTest returns the Test field value if set, zero value otherwise. +func (o *CreateUploadRequest) GetTest() bool { + if o == nil || o.Test == nil { + var ret bool + return ret + } + return *o.Test +} + +// GetTestOk returns a tuple with the Test field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUploadRequest) GetTestOk() (*bool, bool) { + if o == nil || o.Test == nil { + return nil, false + } + return o.Test, true +} + +// HasTest returns a boolean if a field has been set. +func (o *CreateUploadRequest) HasTest() bool { + if o != nil && o.Test != nil { + return true + } + + return false +} + +// SetTest gets a reference to the given bool and assigns it to the Test field. +func (o *CreateUploadRequest) SetTest(v bool) { + o.Test = &v +} + +func (o CreateUploadRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Timeout != nil { + toSerialize["timeout"] = o.Timeout + } + if o.CorsOrigin != nil { + toSerialize["cors_origin"] = o.CorsOrigin + } + if true { + toSerialize["new_asset_settings"] = o.NewAssetSettings + } + if o.Test != nil { + toSerialize["test"] = o.Test + } + return json.Marshal(toSerialize) +} + +type NullableCreateUploadRequest struct { + value *CreateUploadRequest + isSet bool +} + +func (v NullableCreateUploadRequest) Get() *CreateUploadRequest { + return v.value +} + +func (v *NullableCreateUploadRequest) Set(val *CreateUploadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUploadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUploadRequest) Unset() { + v.value = nil + v.isSet = false } + +func NewNullableCreateUploadRequest(val *CreateUploadRequest) *NullableCreateUploadRequest { + return &NullableCreateUploadRequest{value: val, isSet: true} +} + +func (v NullableCreateUploadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUploadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_delivery_report.go b/model_delivery_report.go index 5e45838..e138458 100644 --- a/model_delivery_report.go +++ b/model_delivery_report.go @@ -1,14 +1,375 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// DeliveryReport struct for DeliveryReport type DeliveryReport struct { - LiveStreamId string `json:"live_stream_id,omitempty"` - AssetId string `json:"asset_id,omitempty"` - Passthrough string `json:"passthrough,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - AssetState string `json:"asset_state,omitempty"` - AssetDuration float64 `json:"asset_duration,omitempty"` - DeliveredSeconds float64 `json:"delivered_seconds,omitempty"` + // Unique identifier for the live stream that created the asset. + LiveStreamId *string `json:"live_stream_id,omitempty"` + // Unique identifier for the asset. + AssetId *string `json:"asset_id,omitempty"` + // The `passthrough` value for the asset. + Passthrough *string `json:"passthrough,omitempty"` + // Time at which the asset was created. Measured in seconds since the Unix epoch. + CreatedAt *string `json:"created_at,omitempty"` + // If exists, time at which the asset was deleted. Measured in seconds since the Unix epoch. + DeletedAt *string `json:"deleted_at,omitempty"` + // The state of the asset. + AssetState *string `json:"asset_state,omitempty"` + // The duration of the asset in seconds. + AssetDuration *float64 `json:"asset_duration,omitempty"` + // Total number of delivered seconds during this time window. + DeliveredSeconds *float64 `json:"delivered_seconds,omitempty"` +} + +// NewDeliveryReport instantiates a new DeliveryReport 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 NewDeliveryReport() *DeliveryReport { + this := DeliveryReport{} + return &this +} + +// NewDeliveryReportWithDefaults instantiates a new DeliveryReport 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 NewDeliveryReportWithDefaults() *DeliveryReport { + this := DeliveryReport{} + return &this +} + +// GetLiveStreamId returns the LiveStreamId field value if set, zero value otherwise. +func (o *DeliveryReport) GetLiveStreamId() string { + if o == nil || o.LiveStreamId == nil { + var ret string + return ret + } + return *o.LiveStreamId +} + +// GetLiveStreamIdOk returns a tuple with the LiveStreamId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetLiveStreamIdOk() (*string, bool) { + if o == nil || o.LiveStreamId == nil { + return nil, false + } + return o.LiveStreamId, true +} + +// HasLiveStreamId returns a boolean if a field has been set. +func (o *DeliveryReport) HasLiveStreamId() bool { + if o != nil && o.LiveStreamId != nil { + return true + } + + return false +} + +// SetLiveStreamId gets a reference to the given string and assigns it to the LiveStreamId field. +func (o *DeliveryReport) SetLiveStreamId(v string) { + o.LiveStreamId = &v +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *DeliveryReport) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *DeliveryReport) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *DeliveryReport) SetAssetId(v string) { + o.AssetId = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *DeliveryReport) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *DeliveryReport) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *DeliveryReport) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DeliveryReport) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DeliveryReport) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *DeliveryReport) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise. +func (o *DeliveryReport) GetDeletedAt() string { + if o == nil || o.DeletedAt == nil { + var ret string + return ret + } + return *o.DeletedAt +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetDeletedAtOk() (*string, bool) { + if o == nil || o.DeletedAt == nil { + return nil, false + } + return o.DeletedAt, true +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *DeliveryReport) HasDeletedAt() bool { + if o != nil && o.DeletedAt != nil { + return true + } + + return false } + +// SetDeletedAt gets a reference to the given string and assigns it to the DeletedAt field. +func (o *DeliveryReport) SetDeletedAt(v string) { + o.DeletedAt = &v +} + +// GetAssetState returns the AssetState field value if set, zero value otherwise. +func (o *DeliveryReport) GetAssetState() string { + if o == nil || o.AssetState == nil { + var ret string + return ret + } + return *o.AssetState +} + +// GetAssetStateOk returns a tuple with the AssetState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetAssetStateOk() (*string, bool) { + if o == nil || o.AssetState == nil { + return nil, false + } + return o.AssetState, true +} + +// HasAssetState returns a boolean if a field has been set. +func (o *DeliveryReport) HasAssetState() bool { + if o != nil && o.AssetState != nil { + return true + } + + return false +} + +// SetAssetState gets a reference to the given string and assigns it to the AssetState field. +func (o *DeliveryReport) SetAssetState(v string) { + o.AssetState = &v +} + +// GetAssetDuration returns the AssetDuration field value if set, zero value otherwise. +func (o *DeliveryReport) GetAssetDuration() float64 { + if o == nil || o.AssetDuration == nil { + var ret float64 + return ret + } + return *o.AssetDuration +} + +// GetAssetDurationOk returns a tuple with the AssetDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetAssetDurationOk() (*float64, bool) { + if o == nil || o.AssetDuration == nil { + return nil, false + } + return o.AssetDuration, true +} + +// HasAssetDuration returns a boolean if a field has been set. +func (o *DeliveryReport) HasAssetDuration() bool { + if o != nil && o.AssetDuration != nil { + return true + } + + return false +} + +// SetAssetDuration gets a reference to the given float64 and assigns it to the AssetDuration field. +func (o *DeliveryReport) SetAssetDuration(v float64) { + o.AssetDuration = &v +} + +// GetDeliveredSeconds returns the DeliveredSeconds field value if set, zero value otherwise. +func (o *DeliveryReport) GetDeliveredSeconds() float64 { + if o == nil || o.DeliveredSeconds == nil { + var ret float64 + return ret + } + return *o.DeliveredSeconds +} + +// GetDeliveredSecondsOk returns a tuple with the DeliveredSeconds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryReport) GetDeliveredSecondsOk() (*float64, bool) { + if o == nil || o.DeliveredSeconds == nil { + return nil, false + } + return o.DeliveredSeconds, true +} + +// HasDeliveredSeconds returns a boolean if a field has been set. +func (o *DeliveryReport) HasDeliveredSeconds() bool { + if o != nil && o.DeliveredSeconds != nil { + return true + } + + return false +} + +// SetDeliveredSeconds gets a reference to the given float64 and assigns it to the DeliveredSeconds field. +func (o *DeliveryReport) SetDeliveredSeconds(v float64) { + o.DeliveredSeconds = &v +} + +func (o DeliveryReport) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.LiveStreamId != nil { + toSerialize["live_stream_id"] = o.LiveStreamId + } + if o.AssetId != nil { + toSerialize["asset_id"] = o.AssetId + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.DeletedAt != nil { + toSerialize["deleted_at"] = o.DeletedAt + } + if o.AssetState != nil { + toSerialize["asset_state"] = o.AssetState + } + if o.AssetDuration != nil { + toSerialize["asset_duration"] = o.AssetDuration + } + if o.DeliveredSeconds != nil { + toSerialize["delivered_seconds"] = o.DeliveredSeconds + } + return json.Marshal(toSerialize) +} + +type NullableDeliveryReport struct { + value *DeliveryReport + isSet bool +} + +func (v NullableDeliveryReport) Get() *DeliveryReport { + return v.value +} + +func (v *NullableDeliveryReport) Set(val *DeliveryReport) { + v.value = val + v.isSet = true +} + +func (v NullableDeliveryReport) IsSet() bool { + return v.isSet +} + +func (v *NullableDeliveryReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeliveryReport(val *DeliveryReport) *NullableDeliveryReport { + return &NullableDeliveryReport{value: val, isSet: true} +} + +func (v NullableDeliveryReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeliveryReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dimension_value.go b/model_dimension_value.go index 03559ba..19dc3ad 100644 --- a/model_dimension_value.go +++ b/model_dimension_value.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// DimensionValue struct for DimensionValue type DimensionValue struct { - Value string `json:"value,omitempty"` - TotalCount int64 `json:"total_count,omitempty"` + Value *string `json:"value,omitempty"` + TotalCount *int64 `json:"total_count,omitempty"` +} + +// NewDimensionValue instantiates a new DimensionValue 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 NewDimensionValue() *DimensionValue { + this := DimensionValue{} + return &this +} + +// NewDimensionValueWithDefaults instantiates a new DimensionValue 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 NewDimensionValueWithDefaults() *DimensionValue { + this := DimensionValue{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DimensionValue) GetValue() string { + if o == nil || o.Value == nil { + var ret string + 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. +func (o *DimensionValue) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DimensionValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *DimensionValue) SetValue(v string) { + o.Value = &v +} + +// GetTotalCount returns the TotalCount field value if set, zero value otherwise. +func (o *DimensionValue) GetTotalCount() int64 { + if o == nil || o.TotalCount == nil { + var ret int64 + return ret + } + return *o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DimensionValue) GetTotalCountOk() (*int64, bool) { + if o == nil || o.TotalCount == nil { + return nil, false + } + return o.TotalCount, true +} + +// HasTotalCount returns a boolean if a field has been set. +func (o *DimensionValue) HasTotalCount() bool { + if o != nil && o.TotalCount != nil { + return true + } + + return false } + +// SetTotalCount gets a reference to the given int64 and assigns it to the TotalCount field. +func (o *DimensionValue) SetTotalCount(v int64) { + o.TotalCount = &v +} + +func (o DimensionValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.TotalCount != nil { + toSerialize["total_count"] = o.TotalCount + } + return json.Marshal(toSerialize) +} + +type NullableDimensionValue struct { + value *DimensionValue + isSet bool +} + +func (v NullableDimensionValue) Get() *DimensionValue { + return v.value +} + +func (v *NullableDimensionValue) Set(val *DimensionValue) { + v.value = val + v.isSet = true +} + +func (v NullableDimensionValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDimensionValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDimensionValue(val *DimensionValue) *NullableDimensionValue { + return &NullableDimensionValue{value: val, isSet: true} +} + +func (v NullableDimensionValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDimensionValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_disable_live_stream_response.go b/model_disable_live_stream_response.go index 938260b..1b33047 100644 --- a/model_disable_live_stream_response.go +++ b/model_disable_live_stream_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// DisableLiveStreamResponse struct for DisableLiveStreamResponse type DisableLiveStreamResponse struct { - Data map[string]interface{} `json:"data,omitempty"` + Data *map[string]interface{} `json:"data,omitempty"` +} + +// NewDisableLiveStreamResponse instantiates a new DisableLiveStreamResponse 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 NewDisableLiveStreamResponse() *DisableLiveStreamResponse { + this := DisableLiveStreamResponse{} + return &this +} + +// NewDisableLiveStreamResponseWithDefaults instantiates a new DisableLiveStreamResponse 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 NewDisableLiveStreamResponseWithDefaults() *DisableLiveStreamResponse { + this := DisableLiveStreamResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DisableLiveStreamResponse) GetData() map[string]interface{} { + if o == nil || o.Data == nil { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DisableLiveStreamResponse) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *DisableLiveStreamResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *DisableLiveStreamResponse) SetData(v map[string]interface{}) { + o.Data = &v +} + +func (o DisableLiveStreamResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableDisableLiveStreamResponse struct { + value *DisableLiveStreamResponse + isSet bool +} + +func (v NullableDisableLiveStreamResponse) Get() *DisableLiveStreamResponse { + return v.value +} + +func (v *NullableDisableLiveStreamResponse) Set(val *DisableLiveStreamResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDisableLiveStreamResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDisableLiveStreamResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDisableLiveStreamResponse(val *DisableLiveStreamResponse) *NullableDisableLiveStreamResponse { + return &NullableDisableLiveStreamResponse{value: val, isSet: true} +} + +func (v NullableDisableLiveStreamResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDisableLiveStreamResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_enable_live_stream_response.go b/model_enable_live_stream_response.go index 8410637..63db773 100644 --- a/model_enable_live_stream_response.go +++ b/model_enable_live_stream_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// EnableLiveStreamResponse struct for EnableLiveStreamResponse type EnableLiveStreamResponse struct { - Data map[string]interface{} `json:"data,omitempty"` + Data *map[string]interface{} `json:"data,omitempty"` +} + +// NewEnableLiveStreamResponse instantiates a new EnableLiveStreamResponse 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 NewEnableLiveStreamResponse() *EnableLiveStreamResponse { + this := EnableLiveStreamResponse{} + return &this +} + +// NewEnableLiveStreamResponseWithDefaults instantiates a new EnableLiveStreamResponse 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 NewEnableLiveStreamResponseWithDefaults() *EnableLiveStreamResponse { + this := EnableLiveStreamResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EnableLiveStreamResponse) GetData() map[string]interface{} { + if o == nil || o.Data == nil { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnableLiveStreamResponse) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *EnableLiveStreamResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *EnableLiveStreamResponse) SetData(v map[string]interface{}) { + o.Data = &v +} + +func (o EnableLiveStreamResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableEnableLiveStreamResponse struct { + value *EnableLiveStreamResponse + isSet bool +} + +func (v NullableEnableLiveStreamResponse) Get() *EnableLiveStreamResponse { + return v.value +} + +func (v *NullableEnableLiveStreamResponse) Set(val *EnableLiveStreamResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEnableLiveStreamResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEnableLiveStreamResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnableLiveStreamResponse(val *EnableLiveStreamResponse) *NullableEnableLiveStreamResponse { + return &NullableEnableLiveStreamResponse{value: val, isSet: true} +} + +func (v NullableEnableLiveStreamResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnableLiveStreamResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error.go b/model_error.go index 6f5e335..cb2b3b2 100644 --- a/model_error.go +++ b/model_error.go @@ -1,15 +1,375 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Error struct for Error type Error struct { - Id int64 `json:"id,omitempty"` - Percentage float64 `json:"percentage,omitempty"` - Notes string `json:"notes,omitempty"` - Message string `json:"message,omitempty"` - LastSeen string `json:"last_seen,omitempty"` - Description string `json:"description,omitempty"` - Count int64 `json:"count,omitempty"` - Code int64 `json:"code,omitempty"` + // A unique identifier for this error. + Id *int64 `json:"id,omitempty"` + // The percentage of views that experienced this error. + Percentage *float64 `json:"percentage,omitempty"` + // Notes that are attached to this error. + Notes *string `json:"notes,omitempty"` + // The error message. + Message *string `json:"message,omitempty"` + // The last time this error was seen (ISO 8601 timestamp). + LastSeen *string `json:"last_seen,omitempty"` + // Description of the error. + Description *string `json:"description,omitempty"` + // The total number of views that experiend this error. + Count *int64 `json:"count,omitempty"` + // The error code + Code *int64 `json:"code,omitempty"` +} + +// NewError instantiates a new Error 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 NewError() *Error { + this := Error{} + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Error) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + 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 *Error) GetIdOk() (*int64, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Error) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Error) SetId(v int64) { + o.Id = &v +} + +// GetPercentage returns the Percentage field value if set, zero value otherwise. +func (o *Error) GetPercentage() float64 { + if o == nil || o.Percentage == nil { + var ret float64 + return ret + } + return *o.Percentage +} + +// GetPercentageOk returns a tuple with the Percentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetPercentageOk() (*float64, bool) { + if o == nil || o.Percentage == nil { + return nil, false + } + return o.Percentage, true +} + +// HasPercentage returns a boolean if a field has been set. +func (o *Error) HasPercentage() bool { + if o != nil && o.Percentage != nil { + return true + } + + return false +} + +// SetPercentage gets a reference to the given float64 and assigns it to the Percentage field. +func (o *Error) SetPercentage(v float64) { + o.Percentage = &v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *Error) GetNotes() string { + if o == nil || o.Notes == nil { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetNotesOk() (*string, bool) { + if o == nil || o.Notes == nil { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *Error) HasNotes() bool { + if o != nil && o.Notes != nil { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *Error) SetNotes(v string) { + o.Notes = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Error) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Error) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Error) SetMessage(v string) { + o.Message = &v +} + +// GetLastSeen returns the LastSeen field value if set, zero value otherwise. +func (o *Error) GetLastSeen() string { + if o == nil || o.LastSeen == nil { + var ret string + return ret + } + return *o.LastSeen +} + +// GetLastSeenOk returns a tuple with the LastSeen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetLastSeenOk() (*string, bool) { + if o == nil || o.LastSeen == nil { + return nil, false + } + return o.LastSeen, true +} + +// HasLastSeen returns a boolean if a field has been set. +func (o *Error) HasLastSeen() bool { + if o != nil && o.LastSeen != nil { + return true + } + + return false } + +// SetLastSeen gets a reference to the given string and assigns it to the LastSeen field. +func (o *Error) SetLastSeen(v string) { + o.LastSeen = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Error) GetDescription() string { + if o == nil || o.Description == nil { + 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 *Error) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Error) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Error) SetDescription(v string) { + o.Description = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Error) GetCount() int64 { + if o == nil || o.Count == nil { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetCountOk() (*int64, bool) { + if o == nil || o.Count == nil { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Error) HasCount() bool { + if o != nil && o.Count != nil { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *Error) SetCount(v int64) { + o.Count = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Error) GetCode() int64 { + if o == nil || o.Code == nil { + var ret int64 + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetCodeOk() (*int64, bool) { + if o == nil || o.Code == nil { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Error) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int64 and assigns it to the Code field. +func (o *Error) SetCode(v int64) { + o.Code = &v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Percentage != nil { + toSerialize["percentage"] = o.Percentage + } + if o.Notes != nil { + toSerialize["notes"] = o.Notes + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.LastSeen != nil { + toSerialize["last_seen"] = o.LastSeen + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Count != nil { + toSerialize["count"] = o.Count + } + if o.Code != nil { + toSerialize["code"] = o.Code + } + return json.Marshal(toSerialize) +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_filter_value.go b/model_filter_value.go index 0bf8a2c..35099f1 100644 --- a/model_filter_value.go +++ b/model_filter_value.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// FilterValue struct for FilterValue type FilterValue struct { - Value string `json:"value,omitempty"` - TotalCount int64 `json:"total_count,omitempty"` + Value *string `json:"value,omitempty"` + TotalCount *int64 `json:"total_count,omitempty"` +} + +// NewFilterValue instantiates a new FilterValue 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 NewFilterValue() *FilterValue { + this := FilterValue{} + return &this +} + +// NewFilterValueWithDefaults instantiates a new FilterValue 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 NewFilterValueWithDefaults() *FilterValue { + this := FilterValue{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *FilterValue) GetValue() string { + if o == nil || o.Value == nil { + var ret string + 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. +func (o *FilterValue) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *FilterValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *FilterValue) SetValue(v string) { + o.Value = &v +} + +// GetTotalCount returns the TotalCount field value if set, zero value otherwise. +func (o *FilterValue) GetTotalCount() int64 { + if o == nil || o.TotalCount == nil { + var ret int64 + return ret + } + return *o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterValue) GetTotalCountOk() (*int64, bool) { + if o == nil || o.TotalCount == nil { + return nil, false + } + return o.TotalCount, true +} + +// HasTotalCount returns a boolean if a field has been set. +func (o *FilterValue) HasTotalCount() bool { + if o != nil && o.TotalCount != nil { + return true + } + + return false } + +// SetTotalCount gets a reference to the given int64 and assigns it to the TotalCount field. +func (o *FilterValue) SetTotalCount(v int64) { + o.TotalCount = &v +} + +func (o FilterValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.TotalCount != nil { + toSerialize["total_count"] = o.TotalCount + } + return json.Marshal(toSerialize) +} + +type NullableFilterValue struct { + value *FilterValue + isSet bool +} + +func (v NullableFilterValue) Get() *FilterValue { + return v.value +} + +func (v *NullableFilterValue) Set(val *FilterValue) { + v.value = val + v.isSet = true +} + +func (v NullableFilterValue) IsSet() bool { + return v.isSet +} + +func (v *NullableFilterValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilterValue(val *FilterValue) *NullableFilterValue { + return &NullableFilterValue{value: val, isSet: true} +} + +func (v NullableFilterValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilterValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_asset_input_info_response.go b/model_get_asset_input_info_response.go index 8290401..ccf8f48 100644 --- a/model_get_asset_input_info_response.go +++ b/model_get_asset_input_info_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetAssetInputInfoResponse struct for GetAssetInputInfoResponse type GetAssetInputInfoResponse struct { - Data []InputInfo `json:"data,omitempty"` + Data *[]InputInfo `json:"data,omitempty"` +} + +// NewGetAssetInputInfoResponse instantiates a new GetAssetInputInfoResponse 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 NewGetAssetInputInfoResponse() *GetAssetInputInfoResponse { + this := GetAssetInputInfoResponse{} + return &this +} + +// NewGetAssetInputInfoResponseWithDefaults instantiates a new GetAssetInputInfoResponse 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 NewGetAssetInputInfoResponseWithDefaults() *GetAssetInputInfoResponse { + this := GetAssetInputInfoResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetAssetInputInfoResponse) GetData() []InputInfo { + if o == nil || o.Data == nil { + var ret []InputInfo + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAssetInputInfoResponse) GetDataOk() (*[]InputInfo, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *GetAssetInputInfoResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []InputInfo and assigns it to the Data field. +func (o *GetAssetInputInfoResponse) SetData(v []InputInfo) { + o.Data = &v +} + +func (o GetAssetInputInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableGetAssetInputInfoResponse struct { + value *GetAssetInputInfoResponse + isSet bool +} + +func (v NullableGetAssetInputInfoResponse) Get() *GetAssetInputInfoResponse { + return v.value +} + +func (v *NullableGetAssetInputInfoResponse) Set(val *GetAssetInputInfoResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAssetInputInfoResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAssetInputInfoResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAssetInputInfoResponse(val *GetAssetInputInfoResponse) *NullableGetAssetInputInfoResponse { + return &NullableGetAssetInputInfoResponse{value: val, isSet: true} +} + +func (v NullableGetAssetInputInfoResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAssetInputInfoResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_asset_or_live_stream_id_response.go b/model_get_asset_or_live_stream_id_response.go index c28abe1..fd75b71 100644 --- a/model_get_asset_or_live_stream_id_response.go +++ b/model_get_asset_or_live_stream_id_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetAssetOrLiveStreamIdResponse struct for GetAssetOrLiveStreamIdResponse type GetAssetOrLiveStreamIdResponse struct { - Data GetAssetOrLiveStreamIdResponseData `json:"data,omitempty"` + Data *GetAssetOrLiveStreamIdResponseData `json:"data,omitempty"` +} + +// NewGetAssetOrLiveStreamIdResponse instantiates a new GetAssetOrLiveStreamIdResponse 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 NewGetAssetOrLiveStreamIdResponse() *GetAssetOrLiveStreamIdResponse { + this := GetAssetOrLiveStreamIdResponse{} + return &this +} + +// NewGetAssetOrLiveStreamIdResponseWithDefaults instantiates a new GetAssetOrLiveStreamIdResponse 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 NewGetAssetOrLiveStreamIdResponseWithDefaults() *GetAssetOrLiveStreamIdResponse { + this := GetAssetOrLiveStreamIdResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetAssetOrLiveStreamIdResponse) GetData() GetAssetOrLiveStreamIdResponseData { + if o == nil || o.Data == nil { + var ret GetAssetOrLiveStreamIdResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAssetOrLiveStreamIdResponse) GetDataOk() (*GetAssetOrLiveStreamIdResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *GetAssetOrLiveStreamIdResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given GetAssetOrLiveStreamIdResponseData and assigns it to the Data field. +func (o *GetAssetOrLiveStreamIdResponse) SetData(v GetAssetOrLiveStreamIdResponseData) { + o.Data = &v +} + +func (o GetAssetOrLiveStreamIdResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableGetAssetOrLiveStreamIdResponse struct { + value *GetAssetOrLiveStreamIdResponse + isSet bool +} + +func (v NullableGetAssetOrLiveStreamIdResponse) Get() *GetAssetOrLiveStreamIdResponse { + return v.value +} + +func (v *NullableGetAssetOrLiveStreamIdResponse) Set(val *GetAssetOrLiveStreamIdResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAssetOrLiveStreamIdResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAssetOrLiveStreamIdResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAssetOrLiveStreamIdResponse(val *GetAssetOrLiveStreamIdResponse) *NullableGetAssetOrLiveStreamIdResponse { + return &NullableGetAssetOrLiveStreamIdResponse{value: val, isSet: true} +} + +func (v NullableGetAssetOrLiveStreamIdResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAssetOrLiveStreamIdResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_asset_or_live_stream_id_response_data.go b/model_get_asset_or_live_stream_id_response_data.go index b869bcc..ff0eee4 100644 --- a/model_get_asset_or_live_stream_id_response_data.go +++ b/model_get_asset_or_live_stream_id_response_data.go @@ -1,11 +1,188 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetAssetOrLiveStreamIdResponseData struct for GetAssetOrLiveStreamIdResponseData type GetAssetOrLiveStreamIdResponseData struct { // The Playback ID used to retrieve the corresponding asset or the live stream ID - Id string `json:"id,omitempty"` - Policy PlaybackPolicy `json:"policy,omitempty"` - Object GetAssetOrLiveStreamIdResponseDataObject `json:"object,omitempty"` + Id *string `json:"id,omitempty"` + Policy *PlaybackPolicy `json:"policy,omitempty"` + Object *GetAssetOrLiveStreamIdResponseDataObject `json:"object,omitempty"` +} + +// NewGetAssetOrLiveStreamIdResponseData instantiates a new GetAssetOrLiveStreamIdResponseData 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 NewGetAssetOrLiveStreamIdResponseData() *GetAssetOrLiveStreamIdResponseData { + this := GetAssetOrLiveStreamIdResponseData{} + return &this +} + +// NewGetAssetOrLiveStreamIdResponseDataWithDefaults instantiates a new GetAssetOrLiveStreamIdResponseData 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 NewGetAssetOrLiveStreamIdResponseDataWithDefaults() *GetAssetOrLiveStreamIdResponseData { + this := GetAssetOrLiveStreamIdResponseData{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetAssetOrLiveStreamIdResponseData) GetId() string { + if o == nil || o.Id == nil { + 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 *GetAssetOrLiveStreamIdResponseData) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true } + +// HasId returns a boolean if a field has been set. +func (o *GetAssetOrLiveStreamIdResponseData) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GetAssetOrLiveStreamIdResponseData) SetId(v string) { + o.Id = &v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *GetAssetOrLiveStreamIdResponseData) GetPolicy() PlaybackPolicy { + if o == nil || o.Policy == nil { + var ret PlaybackPolicy + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAssetOrLiveStreamIdResponseData) GetPolicyOk() (*PlaybackPolicy, bool) { + if o == nil || o.Policy == nil { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *GetAssetOrLiveStreamIdResponseData) HasPolicy() bool { + if o != nil && o.Policy != nil { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PlaybackPolicy and assigns it to the Policy field. +func (o *GetAssetOrLiveStreamIdResponseData) SetPolicy(v PlaybackPolicy) { + o.Policy = &v +} + +// GetObject returns the Object field value if set, zero value otherwise. +func (o *GetAssetOrLiveStreamIdResponseData) GetObject() GetAssetOrLiveStreamIdResponseDataObject { + if o == nil || o.Object == nil { + var ret GetAssetOrLiveStreamIdResponseDataObject + 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 *GetAssetOrLiveStreamIdResponseData) GetObjectOk() (*GetAssetOrLiveStreamIdResponseDataObject, bool) { + if o == nil || o.Object == nil { + return nil, false + } + return o.Object, true +} + +// HasObject returns a boolean if a field has been set. +func (o *GetAssetOrLiveStreamIdResponseData) HasObject() bool { + if o != nil && o.Object != nil { + return true + } + + return false +} + +// SetObject gets a reference to the given GetAssetOrLiveStreamIdResponseDataObject and assigns it to the Object field. +func (o *GetAssetOrLiveStreamIdResponseData) SetObject(v GetAssetOrLiveStreamIdResponseDataObject) { + o.Object = &v +} + +func (o GetAssetOrLiveStreamIdResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Policy != nil { + toSerialize["policy"] = o.Policy + } + if o.Object != nil { + toSerialize["object"] = o.Object + } + return json.Marshal(toSerialize) +} + +type NullableGetAssetOrLiveStreamIdResponseData struct { + value *GetAssetOrLiveStreamIdResponseData + isSet bool +} + +func (v NullableGetAssetOrLiveStreamIdResponseData) Get() *GetAssetOrLiveStreamIdResponseData { + return v.value +} + +func (v *NullableGetAssetOrLiveStreamIdResponseData) Set(val *GetAssetOrLiveStreamIdResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableGetAssetOrLiveStreamIdResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAssetOrLiveStreamIdResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAssetOrLiveStreamIdResponseData(val *GetAssetOrLiveStreamIdResponseData) *NullableGetAssetOrLiveStreamIdResponseData { + return &NullableGetAssetOrLiveStreamIdResponseData{value: val, isSet: true} +} + +func (v NullableGetAssetOrLiveStreamIdResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAssetOrLiveStreamIdResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_asset_or_live_stream_id_response_data_object.go b/model_get_asset_or_live_stream_id_response_data_object.go index 6feb1da..c7627de 100644 --- a/model_get_asset_or_live_stream_id_response_data_object.go +++ b/model_get_asset_or_live_stream_id_response_data_object.go @@ -1,12 +1,153 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -// Describes the Asset or LiveStream object associated with the playback ID. +import ( + "encoding/json" +) + +// GetAssetOrLiveStreamIdResponseDataObject Describes the Asset or LiveStream object associated with the playback ID. type GetAssetOrLiveStreamIdResponseDataObject struct { // The identifier of the object. - Id string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` // Identifies the object type associated with the playback ID. - Type string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` +} + +// NewGetAssetOrLiveStreamIdResponseDataObject instantiates a new GetAssetOrLiveStreamIdResponseDataObject 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 NewGetAssetOrLiveStreamIdResponseDataObject() *GetAssetOrLiveStreamIdResponseDataObject { + this := GetAssetOrLiveStreamIdResponseDataObject{} + return &this +} + +// NewGetAssetOrLiveStreamIdResponseDataObjectWithDefaults instantiates a new GetAssetOrLiveStreamIdResponseDataObject 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 NewGetAssetOrLiveStreamIdResponseDataObjectWithDefaults() *GetAssetOrLiveStreamIdResponseDataObject { + this := GetAssetOrLiveStreamIdResponseDataObject{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetAssetOrLiveStreamIdResponseDataObject) GetId() string { + if o == nil || o.Id == nil { + 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 *GetAssetOrLiveStreamIdResponseDataObject) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetAssetOrLiveStreamIdResponseDataObject) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GetAssetOrLiveStreamIdResponseDataObject) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GetAssetOrLiveStreamIdResponseDataObject) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAssetOrLiveStreamIdResponseDataObject) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GetAssetOrLiveStreamIdResponseDataObject) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false } + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GetAssetOrLiveStreamIdResponseDataObject) SetType(v string) { + o.Type = &v +} + +func (o GetAssetOrLiveStreamIdResponseDataObject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableGetAssetOrLiveStreamIdResponseDataObject struct { + value *GetAssetOrLiveStreamIdResponseDataObject + isSet bool +} + +func (v NullableGetAssetOrLiveStreamIdResponseDataObject) Get() *GetAssetOrLiveStreamIdResponseDataObject { + return v.value +} + +func (v *NullableGetAssetOrLiveStreamIdResponseDataObject) Set(val *GetAssetOrLiveStreamIdResponseDataObject) { + v.value = val + v.isSet = true +} + +func (v NullableGetAssetOrLiveStreamIdResponseDataObject) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAssetOrLiveStreamIdResponseDataObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAssetOrLiveStreamIdResponseDataObject(val *GetAssetOrLiveStreamIdResponseDataObject) *NullableGetAssetOrLiveStreamIdResponseDataObject { + return &NullableGetAssetOrLiveStreamIdResponseDataObject{value: val, isSet: true} +} + +func (v NullableGetAssetOrLiveStreamIdResponseDataObject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAssetOrLiveStreamIdResponseDataObject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_asset_playback_id_response.go b/model_get_asset_playback_id_response.go index c536166..9150d2d 100644 --- a/model_get_asset_playback_id_response.go +++ b/model_get_asset_playback_id_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -type GetAssetPlaybackIdResponse struct { - Data PlaybackId `json:"data,omitempty"` +import ( + "encoding/json" +) + +// GetAssetPlaybackIDResponse struct for GetAssetPlaybackIDResponse +type GetAssetPlaybackIDResponse struct { + Data *PlaybackID `json:"data,omitempty"` +} + +// NewGetAssetPlaybackIDResponse instantiates a new GetAssetPlaybackIDResponse 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 NewGetAssetPlaybackIDResponse() *GetAssetPlaybackIDResponse { + this := GetAssetPlaybackIDResponse{} + return &this +} + +// NewGetAssetPlaybackIDResponseWithDefaults instantiates a new GetAssetPlaybackIDResponse 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 NewGetAssetPlaybackIDResponseWithDefaults() *GetAssetPlaybackIDResponse { + this := GetAssetPlaybackIDResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetAssetPlaybackIDResponse) GetData() PlaybackID { + if o == nil || o.Data == nil { + var ret PlaybackID + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAssetPlaybackIDResponse) GetDataOk() (*PlaybackID, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *GetAssetPlaybackIDResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given PlaybackID and assigns it to the Data field. +func (o *GetAssetPlaybackIDResponse) SetData(v PlaybackID) { + o.Data = &v +} + +func (o GetAssetPlaybackIDResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableGetAssetPlaybackIDResponse struct { + value *GetAssetPlaybackIDResponse + isSet bool +} + +func (v NullableGetAssetPlaybackIDResponse) Get() *GetAssetPlaybackIDResponse { + return v.value +} + +func (v *NullableGetAssetPlaybackIDResponse) Set(val *GetAssetPlaybackIDResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAssetPlaybackIDResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAssetPlaybackIDResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAssetPlaybackIDResponse(val *GetAssetPlaybackIDResponse) *NullableGetAssetPlaybackIDResponse { + return &NullableGetAssetPlaybackIDResponse{value: val, isSet: true} +} + +func (v NullableGetAssetPlaybackIDResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAssetPlaybackIDResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_metric_timeseries_data_response.go b/model_get_metric_timeseries_data_response.go index 8c108bc..640f1be 100644 --- a/model_get_metric_timeseries_data_response.go +++ b/model_get_metric_timeseries_data_response.go @@ -1,55 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo import ( "encoding/json" - "fmt" ) +// GetMetricTimeseriesDataResponse struct for GetMetricTimeseriesDataResponse type GetMetricTimeseriesDataResponse struct { - Data [][]string `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` -} - -// !!! 🐉 Here be dragons 🐉 !!! -// We use a custom Unmarshal to work around one awkward API call where we can't model the response -// from the API elegantly since go doesn't have heterogeneous arrays. This isn't perfect, or memory -// friendly, but it works. -func (this *GetMetricTimeseriesDataResponse) UnmarshalJSON(data []byte) error { - - // Unmarshal JSON into a string => interface{} map - var result map[string]interface{} - json.Unmarshal(data, &result) - - // Build up a new list of each of the datapoints from data as [][]string, nil checking as we go - datapoints := [][]string{} - for _, node := range result["data"].([]interface{}) { - nodeAsArray := node.([]interface{}) - d := make([]string, 3) - d[0] = nodeAsArray[0].(string) - if nodeAsArray[1] != nil { - d[1] = fmt.Sprintf("%f", nodeAsArray[1].(float64)) - } - if nodeAsArray[2] != nil { - d[2] = fmt.Sprintf("%f", nodeAsArray[2].(float64)) - } - datapoints = append(datapoints, d) - } - - // Build the array of timeframe - timeframes := []int64{} - for _, time := range result["timeframe"].([]interface{}) { - timefloat := time.(float64) - timeframes = append(timeframes, int64(timefloat)) - } - - // Set the fields on the response object to what we've pieced together - this.Data = datapoints - this.Timeframe = timeframes - this.TotalRowCount = int64(result["total_row_count"].(float64)) - - return nil + Data *[][]string `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewGetMetricTimeseriesDataResponse instantiates a new GetMetricTimeseriesDataResponse 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 NewGetMetricTimeseriesDataResponse() *GetMetricTimeseriesDataResponse { + this := GetMetricTimeseriesDataResponse{} + return &this +} + +// NewGetMetricTimeseriesDataResponseWithDefaults instantiates a new GetMetricTimeseriesDataResponse 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 NewGetMetricTimeseriesDataResponseWithDefaults() *GetMetricTimeseriesDataResponse { + this := GetMetricTimeseriesDataResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetMetricTimeseriesDataResponse) GetData() [][]string { + if o == nil || o.Data == nil { + var ret [][]string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMetricTimeseriesDataResponse) GetDataOk() (*[][]string, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetMetricTimeseriesDataResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given [][]string and assigns it to the Data field. +func (o *GetMetricTimeseriesDataResponse) SetData(v [][]string) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *GetMetricTimeseriesDataResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMetricTimeseriesDataResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *GetMetricTimeseriesDataResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *GetMetricTimeseriesDataResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *GetMetricTimeseriesDataResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe } + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMetricTimeseriesDataResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *GetMetricTimeseriesDataResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *GetMetricTimeseriesDataResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o GetMetricTimeseriesDataResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableGetMetricTimeseriesDataResponse struct { + value *GetMetricTimeseriesDataResponse + isSet bool +} + +func (v NullableGetMetricTimeseriesDataResponse) Get() *GetMetricTimeseriesDataResponse { + return v.value +} + +func (v *NullableGetMetricTimeseriesDataResponse) Set(val *GetMetricTimeseriesDataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetMetricTimeseriesDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetMetricTimeseriesDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetMetricTimeseriesDataResponse(val *GetMetricTimeseriesDataResponse) *NullableGetMetricTimeseriesDataResponse { + return &NullableGetMetricTimeseriesDataResponse{value: val, isSet: true} +} + +func (v NullableGetMetricTimeseriesDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetMetricTimeseriesDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_overall_values_response.go b/model_get_overall_values_response.go index 55cc5af..10d4244 100644 --- a/model_get_overall_values_response.go +++ b/model_get_overall_values_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetOverallValuesResponse struct for GetOverallValuesResponse type GetOverallValuesResponse struct { - Data OverallValues `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *OverallValues `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewGetOverallValuesResponse instantiates a new GetOverallValuesResponse 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 NewGetOverallValuesResponse() *GetOverallValuesResponse { + this := GetOverallValuesResponse{} + return &this +} + +// NewGetOverallValuesResponseWithDefaults instantiates a new GetOverallValuesResponse 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 NewGetOverallValuesResponseWithDefaults() *GetOverallValuesResponse { + this := GetOverallValuesResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetOverallValuesResponse) GetData() OverallValues { + if o == nil || o.Data == nil { + var ret OverallValues + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetOverallValuesResponse) GetDataOk() (*OverallValues, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *GetOverallValuesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given OverallValues and assigns it to the Data field. +func (o *GetOverallValuesResponse) SetData(v OverallValues) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *GetOverallValuesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetOverallValuesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *GetOverallValuesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *GetOverallValuesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *GetOverallValuesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetOverallValuesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *GetOverallValuesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *GetOverallValuesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o GetOverallValuesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableGetOverallValuesResponse struct { + value *GetOverallValuesResponse + isSet bool +} + +func (v NullableGetOverallValuesResponse) Get() *GetOverallValuesResponse { + return v.value +} + +func (v *NullableGetOverallValuesResponse) Set(val *GetOverallValuesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetOverallValuesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetOverallValuesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetOverallValuesResponse(val *GetOverallValuesResponse) *NullableGetOverallValuesResponse { + return &NullableGetOverallValuesResponse{value: val, isSet: true} +} + +func (v NullableGetOverallValuesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetOverallValuesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_real_time_breakdown_response.go b/model_get_real_time_breakdown_response.go index bfeefb9..95e5a38 100644 --- a/model_get_real_time_breakdown_response.go +++ b/model_get_real_time_breakdown_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetRealTimeBreakdownResponse struct for GetRealTimeBreakdownResponse type GetRealTimeBreakdownResponse struct { - Data []RealTimeBreakdownValue `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]RealTimeBreakdownValue `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewGetRealTimeBreakdownResponse instantiates a new GetRealTimeBreakdownResponse 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 NewGetRealTimeBreakdownResponse() *GetRealTimeBreakdownResponse { + this := GetRealTimeBreakdownResponse{} + return &this +} + +// NewGetRealTimeBreakdownResponseWithDefaults instantiates a new GetRealTimeBreakdownResponse 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 NewGetRealTimeBreakdownResponseWithDefaults() *GetRealTimeBreakdownResponse { + this := GetRealTimeBreakdownResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetRealTimeBreakdownResponse) GetData() []RealTimeBreakdownValue { + if o == nil || o.Data == nil { + var ret []RealTimeBreakdownValue + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeBreakdownResponse) GetDataOk() (*[]RealTimeBreakdownValue, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *GetRealTimeBreakdownResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []RealTimeBreakdownValue and assigns it to the Data field. +func (o *GetRealTimeBreakdownResponse) SetData(v []RealTimeBreakdownValue) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *GetRealTimeBreakdownResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeBreakdownResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *GetRealTimeBreakdownResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *GetRealTimeBreakdownResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *GetRealTimeBreakdownResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeBreakdownResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *GetRealTimeBreakdownResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *GetRealTimeBreakdownResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o GetRealTimeBreakdownResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableGetRealTimeBreakdownResponse struct { + value *GetRealTimeBreakdownResponse + isSet bool +} + +func (v NullableGetRealTimeBreakdownResponse) Get() *GetRealTimeBreakdownResponse { + return v.value +} + +func (v *NullableGetRealTimeBreakdownResponse) Set(val *GetRealTimeBreakdownResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetRealTimeBreakdownResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRealTimeBreakdownResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRealTimeBreakdownResponse(val *GetRealTimeBreakdownResponse) *NullableGetRealTimeBreakdownResponse { + return &NullableGetRealTimeBreakdownResponse{value: val, isSet: true} +} + +func (v NullableGetRealTimeBreakdownResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRealTimeBreakdownResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_real_time_histogram_timeseries_response.go b/model_get_real_time_histogram_timeseries_response.go index b6d4117..bd6a849 100644 --- a/model_get_real_time_histogram_timeseries_response.go +++ b/model_get_real_time_histogram_timeseries_response.go @@ -1,11 +1,223 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetRealTimeHistogramTimeseriesResponse struct for GetRealTimeHistogramTimeseriesResponse type GetRealTimeHistogramTimeseriesResponse struct { - Meta GetRealTimeHistogramTimeseriesResponseMeta `json:"meta,omitempty"` - Data []RealTimeHistogramTimeseriesDatapoint `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Meta *GetRealTimeHistogramTimeseriesResponseMeta `json:"meta,omitempty"` + Data *[]RealTimeHistogramTimeseriesDatapoint `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewGetRealTimeHistogramTimeseriesResponse instantiates a new GetRealTimeHistogramTimeseriesResponse 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 NewGetRealTimeHistogramTimeseriesResponse() *GetRealTimeHistogramTimeseriesResponse { + this := GetRealTimeHistogramTimeseriesResponse{} + return &this +} + +// NewGetRealTimeHistogramTimeseriesResponseWithDefaults instantiates a new GetRealTimeHistogramTimeseriesResponse 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 NewGetRealTimeHistogramTimeseriesResponseWithDefaults() *GetRealTimeHistogramTimeseriesResponse { + this := GetRealTimeHistogramTimeseriesResponse{} + return &this +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *GetRealTimeHistogramTimeseriesResponse) GetMeta() GetRealTimeHistogramTimeseriesResponseMeta { + if o == nil || o.Meta == nil { + var ret GetRealTimeHistogramTimeseriesResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) GetMetaOk() (*GetRealTimeHistogramTimeseriesResponseMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) HasMeta() bool { + if o != nil && o.Meta != nil { + return true + } + + return false +} + +// SetMeta gets a reference to the given GetRealTimeHistogramTimeseriesResponseMeta and assigns it to the Meta field. +func (o *GetRealTimeHistogramTimeseriesResponse) SetMeta(v GetRealTimeHistogramTimeseriesResponseMeta) { + o.Meta = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetRealTimeHistogramTimeseriesResponse) GetData() []RealTimeHistogramTimeseriesDatapoint { + if o == nil || o.Data == nil { + var ret []RealTimeHistogramTimeseriesDatapoint + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) GetDataOk() (*[]RealTimeHistogramTimeseriesDatapoint, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []RealTimeHistogramTimeseriesDatapoint and assigns it to the Data field. +func (o *GetRealTimeHistogramTimeseriesResponse) SetData(v []RealTimeHistogramTimeseriesDatapoint) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *GetRealTimeHistogramTimeseriesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false } + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *GetRealTimeHistogramTimeseriesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *GetRealTimeHistogramTimeseriesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *GetRealTimeHistogramTimeseriesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *GetRealTimeHistogramTimeseriesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o GetRealTimeHistogramTimeseriesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableGetRealTimeHistogramTimeseriesResponse struct { + value *GetRealTimeHistogramTimeseriesResponse + isSet bool +} + +func (v NullableGetRealTimeHistogramTimeseriesResponse) Get() *GetRealTimeHistogramTimeseriesResponse { + return v.value +} + +func (v *NullableGetRealTimeHistogramTimeseriesResponse) Set(val *GetRealTimeHistogramTimeseriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetRealTimeHistogramTimeseriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRealTimeHistogramTimeseriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRealTimeHistogramTimeseriesResponse(val *GetRealTimeHistogramTimeseriesResponse) *NullableGetRealTimeHistogramTimeseriesResponse { + return &NullableGetRealTimeHistogramTimeseriesResponse{value: val, isSet: true} +} + +func (v NullableGetRealTimeHistogramTimeseriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRealTimeHistogramTimeseriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_real_time_histogram_timeseries_response_meta.go b/model_get_real_time_histogram_timeseries_response_meta.go index f12c3ec..41c1cd0 100644 --- a/model_get_real_time_histogram_timeseries_response_meta.go +++ b/model_get_real_time_histogram_timeseries_response_meta.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetRealTimeHistogramTimeseriesResponseMeta struct for GetRealTimeHistogramTimeseriesResponseMeta type GetRealTimeHistogramTimeseriesResponseMeta struct { - Buckets []RealTimeHistogramTimeseriesBucket `json:"buckets,omitempty"` + Buckets *[]RealTimeHistogramTimeseriesBucket `json:"buckets,omitempty"` +} + +// NewGetRealTimeHistogramTimeseriesResponseMeta instantiates a new GetRealTimeHistogramTimeseriesResponseMeta 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 NewGetRealTimeHistogramTimeseriesResponseMeta() *GetRealTimeHistogramTimeseriesResponseMeta { + this := GetRealTimeHistogramTimeseriesResponseMeta{} + return &this +} + +// NewGetRealTimeHistogramTimeseriesResponseMetaWithDefaults instantiates a new GetRealTimeHistogramTimeseriesResponseMeta 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 NewGetRealTimeHistogramTimeseriesResponseMetaWithDefaults() *GetRealTimeHistogramTimeseriesResponseMeta { + this := GetRealTimeHistogramTimeseriesResponseMeta{} + return &this +} + +// GetBuckets returns the Buckets field value if set, zero value otherwise. +func (o *GetRealTimeHistogramTimeseriesResponseMeta) GetBuckets() []RealTimeHistogramTimeseriesBucket { + if o == nil || o.Buckets == nil { + var ret []RealTimeHistogramTimeseriesBucket + return ret + } + return *o.Buckets +} + +// GetBucketsOk returns a tuple with the Buckets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeHistogramTimeseriesResponseMeta) GetBucketsOk() (*[]RealTimeHistogramTimeseriesBucket, bool) { + if o == nil || o.Buckets == nil { + return nil, false + } + return o.Buckets, true } + +// HasBuckets returns a boolean if a field has been set. +func (o *GetRealTimeHistogramTimeseriesResponseMeta) HasBuckets() bool { + if o != nil && o.Buckets != nil { + return true + } + + return false +} + +// SetBuckets gets a reference to the given []RealTimeHistogramTimeseriesBucket and assigns it to the Buckets field. +func (o *GetRealTimeHistogramTimeseriesResponseMeta) SetBuckets(v []RealTimeHistogramTimeseriesBucket) { + o.Buckets = &v +} + +func (o GetRealTimeHistogramTimeseriesResponseMeta) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Buckets != nil { + toSerialize["buckets"] = o.Buckets + } + return json.Marshal(toSerialize) +} + +type NullableGetRealTimeHistogramTimeseriesResponseMeta struct { + value *GetRealTimeHistogramTimeseriesResponseMeta + isSet bool +} + +func (v NullableGetRealTimeHistogramTimeseriesResponseMeta) Get() *GetRealTimeHistogramTimeseriesResponseMeta { + return v.value +} + +func (v *NullableGetRealTimeHistogramTimeseriesResponseMeta) Set(val *GetRealTimeHistogramTimeseriesResponseMeta) { + v.value = val + v.isSet = true +} + +func (v NullableGetRealTimeHistogramTimeseriesResponseMeta) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRealTimeHistogramTimeseriesResponseMeta) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRealTimeHistogramTimeseriesResponseMeta(val *GetRealTimeHistogramTimeseriesResponseMeta) *NullableGetRealTimeHistogramTimeseriesResponseMeta { + return &NullableGetRealTimeHistogramTimeseriesResponseMeta{value: val, isSet: true} +} + +func (v NullableGetRealTimeHistogramTimeseriesResponseMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRealTimeHistogramTimeseriesResponseMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_real_time_timeseries_response.go b/model_get_real_time_timeseries_response.go index be4344e..7c8c162 100644 --- a/model_get_real_time_timeseries_response.go +++ b/model_get_real_time_timeseries_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// GetRealTimeTimeseriesResponse struct for GetRealTimeTimeseriesResponse type GetRealTimeTimeseriesResponse struct { - Data []RealTimeTimeseriesDatapoint `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]RealTimeTimeseriesDatapoint `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewGetRealTimeTimeseriesResponse instantiates a new GetRealTimeTimeseriesResponse 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 NewGetRealTimeTimeseriesResponse() *GetRealTimeTimeseriesResponse { + this := GetRealTimeTimeseriesResponse{} + return &this +} + +// NewGetRealTimeTimeseriesResponseWithDefaults instantiates a new GetRealTimeTimeseriesResponse 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 NewGetRealTimeTimeseriesResponseWithDefaults() *GetRealTimeTimeseriesResponse { + this := GetRealTimeTimeseriesResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetRealTimeTimeseriesResponse) GetData() []RealTimeTimeseriesDatapoint { + if o == nil || o.Data == nil { + var ret []RealTimeTimeseriesDatapoint + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeTimeseriesResponse) GetDataOk() (*[]RealTimeTimeseriesDatapoint, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *GetRealTimeTimeseriesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []RealTimeTimeseriesDatapoint and assigns it to the Data field. +func (o *GetRealTimeTimeseriesResponse) SetData(v []RealTimeTimeseriesDatapoint) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *GetRealTimeTimeseriesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeTimeseriesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *GetRealTimeTimeseriesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *GetRealTimeTimeseriesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *GetRealTimeTimeseriesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRealTimeTimeseriesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *GetRealTimeTimeseriesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *GetRealTimeTimeseriesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o GetRealTimeTimeseriesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableGetRealTimeTimeseriesResponse struct { + value *GetRealTimeTimeseriesResponse + isSet bool +} + +func (v NullableGetRealTimeTimeseriesResponse) Get() *GetRealTimeTimeseriesResponse { + return v.value +} + +func (v *NullableGetRealTimeTimeseriesResponse) Set(val *GetRealTimeTimeseriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetRealTimeTimeseriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRealTimeTimeseriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRealTimeTimeseriesResponse(val *GetRealTimeTimeseriesResponse) *NullableGetRealTimeTimeseriesResponse { + return &NullableGetRealTimeTimeseriesResponse{value: val, isSet: true} +} + +func (v NullableGetRealTimeTimeseriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRealTimeTimeseriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_incident.go b/model_incident.go index 3d76c35..7ea94a6 100644 --- a/model_incident.go +++ b/model_incident.go @@ -1,28 +1,835 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Incident struct for Incident type Incident struct { - Threshold float64 `json:"threshold,omitempty"` - Status string `json:"status,omitempty"` - StartedAt string `json:"started_at,omitempty"` - Severity string `json:"severity,omitempty"` - SampleSizeUnit string `json:"sample_size_unit,omitempty"` - SampleSize int64 `json:"sample_size,omitempty"` - ResolvedAt string `json:"resolved_at,omitempty"` - Notifications []IncidentNotification `json:"notifications,omitempty"` - NotificationRules []IncidentNotificationRule `json:"notification_rules,omitempty"` - Measurement string `json:"measurement,omitempty"` - MeasuredValueOnClose float64 `json:"measured_value_on_close,omitempty"` - MeasuredValue float64 `json:"measured_value,omitempty"` - IncidentKey string `json:"incident_key,omitempty"` - Impact string `json:"impact,omitempty"` - Id string `json:"id,omitempty"` - ErrorDescription string `json:"error_description,omitempty"` - Description string `json:"description,omitempty"` - Breakdowns []IncidentBreakdown `json:"breakdowns,omitempty"` - AffectedViewsPerHourOnOpen int64 `json:"affected_views_per_hour_on_open,omitempty"` - AffectedViewsPerHour int64 `json:"affected_views_per_hour,omitempty"` - AffectedViews int64 `json:"affected_views,omitempty"` + Threshold *float64 `json:"threshold,omitempty"` + Status *string `json:"status,omitempty"` + StartedAt *string `json:"started_at,omitempty"` + Severity *string `json:"severity,omitempty"` + SampleSizeUnit *string `json:"sample_size_unit,omitempty"` + SampleSize *int64 `json:"sample_size,omitempty"` + ResolvedAt *string `json:"resolved_at,omitempty"` + Notifications *[]IncidentNotification `json:"notifications,omitempty"` + NotificationRules *[]IncidentNotificationRule `json:"notification_rules,omitempty"` + Measurement *string `json:"measurement,omitempty"` + MeasuredValueOnClose *float64 `json:"measured_value_on_close,omitempty"` + MeasuredValue *float64 `json:"measured_value,omitempty"` + IncidentKey *string `json:"incident_key,omitempty"` + Impact *string `json:"impact,omitempty"` + Id *string `json:"id,omitempty"` + ErrorDescription *string `json:"error_description,omitempty"` + Description *string `json:"description,omitempty"` + Breakdowns *[]IncidentBreakdown `json:"breakdowns,omitempty"` + AffectedViewsPerHourOnOpen *int64 `json:"affected_views_per_hour_on_open,omitempty"` + AffectedViewsPerHour *int64 `json:"affected_views_per_hour,omitempty"` + AffectedViews *int64 `json:"affected_views,omitempty"` +} + +// NewIncident instantiates a new Incident 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 NewIncident() *Incident { + this := Incident{} + return &this +} + +// NewIncidentWithDefaults instantiates a new Incident 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 NewIncidentWithDefaults() *Incident { + this := Incident{} + return &this +} + +// GetThreshold returns the Threshold field value if set, zero value otherwise. +func (o *Incident) GetThreshold() float64 { + if o == nil || o.Threshold == nil { + var ret float64 + return ret + } + return *o.Threshold +} + +// GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetThresholdOk() (*float64, bool) { + if o == nil || o.Threshold == nil { + return nil, false + } + return o.Threshold, true +} + +// HasThreshold returns a boolean if a field has been set. +func (o *Incident) HasThreshold() bool { + if o != nil && o.Threshold != nil { + return true + } + + return false +} + +// SetThreshold gets a reference to the given float64 and assigns it to the Threshold field. +func (o *Incident) SetThreshold(v float64) { + o.Threshold = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Incident) GetStatus() string { + if o == nil || o.Status == nil { + 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 *Incident) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Incident) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Incident) SetStatus(v string) { + o.Status = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *Incident) GetStartedAt() string { + if o == nil || o.StartedAt == nil { + var ret string + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetStartedAtOk() (*string, bool) { + if o == nil || o.StartedAt == nil { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *Incident) HasStartedAt() bool { + if o != nil && o.StartedAt != nil { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given string and assigns it to the StartedAt field. +func (o *Incident) SetStartedAt(v string) { + o.StartedAt = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *Incident) GetSeverity() string { + if o == nil || o.Severity == nil { + var ret string + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetSeverityOk() (*string, bool) { + if o == nil || o.Severity == nil { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *Incident) HasSeverity() bool { + if o != nil && o.Severity != nil { + return true + } + + return false +} + +// SetSeverity gets a reference to the given string and assigns it to the Severity field. +func (o *Incident) SetSeverity(v string) { + o.Severity = &v +} + +// GetSampleSizeUnit returns the SampleSizeUnit field value if set, zero value otherwise. +func (o *Incident) GetSampleSizeUnit() string { + if o == nil || o.SampleSizeUnit == nil { + var ret string + return ret + } + return *o.SampleSizeUnit +} + +// GetSampleSizeUnitOk returns a tuple with the SampleSizeUnit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetSampleSizeUnitOk() (*string, bool) { + if o == nil || o.SampleSizeUnit == nil { + return nil, false + } + return o.SampleSizeUnit, true +} + +// HasSampleSizeUnit returns a boolean if a field has been set. +func (o *Incident) HasSampleSizeUnit() bool { + if o != nil && o.SampleSizeUnit != nil { + return true + } + + return false +} + +// SetSampleSizeUnit gets a reference to the given string and assigns it to the SampleSizeUnit field. +func (o *Incident) SetSampleSizeUnit(v string) { + o.SampleSizeUnit = &v +} + +// GetSampleSize returns the SampleSize field value if set, zero value otherwise. +func (o *Incident) GetSampleSize() int64 { + if o == nil || o.SampleSize == nil { + var ret int64 + return ret + } + return *o.SampleSize +} + +// GetSampleSizeOk returns a tuple with the SampleSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetSampleSizeOk() (*int64, bool) { + if o == nil || o.SampleSize == nil { + return nil, false + } + return o.SampleSize, true +} + +// HasSampleSize returns a boolean if a field has been set. +func (o *Incident) HasSampleSize() bool { + if o != nil && o.SampleSize != nil { + return true + } + + return false +} + +// SetSampleSize gets a reference to the given int64 and assigns it to the SampleSize field. +func (o *Incident) SetSampleSize(v int64) { + o.SampleSize = &v +} + +// GetResolvedAt returns the ResolvedAt field value if set, zero value otherwise. +func (o *Incident) GetResolvedAt() string { + if o == nil || o.ResolvedAt == nil { + var ret string + return ret + } + return *o.ResolvedAt +} + +// GetResolvedAtOk returns a tuple with the ResolvedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetResolvedAtOk() (*string, bool) { + if o == nil || o.ResolvedAt == nil { + return nil, false + } + return o.ResolvedAt, true +} + +// HasResolvedAt returns a boolean if a field has been set. +func (o *Incident) HasResolvedAt() bool { + if o != nil && o.ResolvedAt != nil { + return true + } + + return false +} + +// SetResolvedAt gets a reference to the given string and assigns it to the ResolvedAt field. +func (o *Incident) SetResolvedAt(v string) { + o.ResolvedAt = &v +} + +// GetNotifications returns the Notifications field value if set, zero value otherwise. +func (o *Incident) GetNotifications() []IncidentNotification { + if o == nil || o.Notifications == nil { + var ret []IncidentNotification + return ret + } + return *o.Notifications +} + +// GetNotificationsOk returns a tuple with the Notifications field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetNotificationsOk() (*[]IncidentNotification, bool) { + if o == nil || o.Notifications == nil { + return nil, false + } + return o.Notifications, true +} + +// HasNotifications returns a boolean if a field has been set. +func (o *Incident) HasNotifications() bool { + if o != nil && o.Notifications != nil { + return true + } + + return false +} + +// SetNotifications gets a reference to the given []IncidentNotification and assigns it to the Notifications field. +func (o *Incident) SetNotifications(v []IncidentNotification) { + o.Notifications = &v +} + +// GetNotificationRules returns the NotificationRules field value if set, zero value otherwise. +func (o *Incident) GetNotificationRules() []IncidentNotificationRule { + if o == nil || o.NotificationRules == nil { + var ret []IncidentNotificationRule + return ret + } + return *o.NotificationRules +} + +// GetNotificationRulesOk returns a tuple with the NotificationRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetNotificationRulesOk() (*[]IncidentNotificationRule, bool) { + if o == nil || o.NotificationRules == nil { + return nil, false + } + return o.NotificationRules, true +} + +// HasNotificationRules returns a boolean if a field has been set. +func (o *Incident) HasNotificationRules() bool { + if o != nil && o.NotificationRules != nil { + return true + } + + return false +} + +// SetNotificationRules gets a reference to the given []IncidentNotificationRule and assigns it to the NotificationRules field. +func (o *Incident) SetNotificationRules(v []IncidentNotificationRule) { + o.NotificationRules = &v +} + +// GetMeasurement returns the Measurement field value if set, zero value otherwise. +func (o *Incident) GetMeasurement() string { + if o == nil || o.Measurement == nil { + var ret string + return ret + } + return *o.Measurement +} + +// GetMeasurementOk returns a tuple with the Measurement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetMeasurementOk() (*string, bool) { + if o == nil || o.Measurement == nil { + return nil, false + } + return o.Measurement, true } + +// HasMeasurement returns a boolean if a field has been set. +func (o *Incident) HasMeasurement() bool { + if o != nil && o.Measurement != nil { + return true + } + + return false +} + +// SetMeasurement gets a reference to the given string and assigns it to the Measurement field. +func (o *Incident) SetMeasurement(v string) { + o.Measurement = &v +} + +// GetMeasuredValueOnClose returns the MeasuredValueOnClose field value if set, zero value otherwise. +func (o *Incident) GetMeasuredValueOnClose() float64 { + if o == nil || o.MeasuredValueOnClose == nil { + var ret float64 + return ret + } + return *o.MeasuredValueOnClose +} + +// GetMeasuredValueOnCloseOk returns a tuple with the MeasuredValueOnClose field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetMeasuredValueOnCloseOk() (*float64, bool) { + if o == nil || o.MeasuredValueOnClose == nil { + return nil, false + } + return o.MeasuredValueOnClose, true +} + +// HasMeasuredValueOnClose returns a boolean if a field has been set. +func (o *Incident) HasMeasuredValueOnClose() bool { + if o != nil && o.MeasuredValueOnClose != nil { + return true + } + + return false +} + +// SetMeasuredValueOnClose gets a reference to the given float64 and assigns it to the MeasuredValueOnClose field. +func (o *Incident) SetMeasuredValueOnClose(v float64) { + o.MeasuredValueOnClose = &v +} + +// GetMeasuredValue returns the MeasuredValue field value if set, zero value otherwise. +func (o *Incident) GetMeasuredValue() float64 { + if o == nil || o.MeasuredValue == nil { + var ret float64 + return ret + } + return *o.MeasuredValue +} + +// GetMeasuredValueOk returns a tuple with the MeasuredValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetMeasuredValueOk() (*float64, bool) { + if o == nil || o.MeasuredValue == nil { + return nil, false + } + return o.MeasuredValue, true +} + +// HasMeasuredValue returns a boolean if a field has been set. +func (o *Incident) HasMeasuredValue() bool { + if o != nil && o.MeasuredValue != nil { + return true + } + + return false +} + +// SetMeasuredValue gets a reference to the given float64 and assigns it to the MeasuredValue field. +func (o *Incident) SetMeasuredValue(v float64) { + o.MeasuredValue = &v +} + +// GetIncidentKey returns the IncidentKey field value if set, zero value otherwise. +func (o *Incident) GetIncidentKey() string { + if o == nil || o.IncidentKey == nil { + var ret string + return ret + } + return *o.IncidentKey +} + +// GetIncidentKeyOk returns a tuple with the IncidentKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetIncidentKeyOk() (*string, bool) { + if o == nil || o.IncidentKey == nil { + return nil, false + } + return o.IncidentKey, true +} + +// HasIncidentKey returns a boolean if a field has been set. +func (o *Incident) HasIncidentKey() bool { + if o != nil && o.IncidentKey != nil { + return true + } + + return false +} + +// SetIncidentKey gets a reference to the given string and assigns it to the IncidentKey field. +func (o *Incident) SetIncidentKey(v string) { + o.IncidentKey = &v +} + +// GetImpact returns the Impact field value if set, zero value otherwise. +func (o *Incident) GetImpact() string { + if o == nil || o.Impact == nil { + var ret string + return ret + } + return *o.Impact +} + +// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetImpactOk() (*string, bool) { + if o == nil || o.Impact == nil { + return nil, false + } + return o.Impact, true +} + +// HasImpact returns a boolean if a field has been set. +func (o *Incident) HasImpact() bool { + if o != nil && o.Impact != nil { + return true + } + + return false +} + +// SetImpact gets a reference to the given string and assigns it to the Impact field. +func (o *Incident) SetImpact(v string) { + o.Impact = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Incident) GetId() string { + if o == nil || o.Id == nil { + 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 *Incident) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Incident) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Incident) SetId(v string) { + o.Id = &v +} + +// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise. +func (o *Incident) GetErrorDescription() string { + if o == nil || o.ErrorDescription == nil { + var ret string + return ret + } + return *o.ErrorDescription +} + +// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetErrorDescriptionOk() (*string, bool) { + if o == nil || o.ErrorDescription == nil { + return nil, false + } + return o.ErrorDescription, true +} + +// HasErrorDescription returns a boolean if a field has been set. +func (o *Incident) HasErrorDescription() bool { + if o != nil && o.ErrorDescription != nil { + return true + } + + return false +} + +// SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field. +func (o *Incident) SetErrorDescription(v string) { + o.ErrorDescription = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Incident) GetDescription() string { + if o == nil || o.Description == nil { + 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 *Incident) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Incident) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Incident) SetDescription(v string) { + o.Description = &v +} + +// GetBreakdowns returns the Breakdowns field value if set, zero value otherwise. +func (o *Incident) GetBreakdowns() []IncidentBreakdown { + if o == nil || o.Breakdowns == nil { + var ret []IncidentBreakdown + return ret + } + return *o.Breakdowns +} + +// GetBreakdownsOk returns a tuple with the Breakdowns field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetBreakdownsOk() (*[]IncidentBreakdown, bool) { + if o == nil || o.Breakdowns == nil { + return nil, false + } + return o.Breakdowns, true +} + +// HasBreakdowns returns a boolean if a field has been set. +func (o *Incident) HasBreakdowns() bool { + if o != nil && o.Breakdowns != nil { + return true + } + + return false +} + +// SetBreakdowns gets a reference to the given []IncidentBreakdown and assigns it to the Breakdowns field. +func (o *Incident) SetBreakdowns(v []IncidentBreakdown) { + o.Breakdowns = &v +} + +// GetAffectedViewsPerHourOnOpen returns the AffectedViewsPerHourOnOpen field value if set, zero value otherwise. +func (o *Incident) GetAffectedViewsPerHourOnOpen() int64 { + if o == nil || o.AffectedViewsPerHourOnOpen == nil { + var ret int64 + return ret + } + return *o.AffectedViewsPerHourOnOpen +} + +// GetAffectedViewsPerHourOnOpenOk returns a tuple with the AffectedViewsPerHourOnOpen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetAffectedViewsPerHourOnOpenOk() (*int64, bool) { + if o == nil || o.AffectedViewsPerHourOnOpen == nil { + return nil, false + } + return o.AffectedViewsPerHourOnOpen, true +} + +// HasAffectedViewsPerHourOnOpen returns a boolean if a field has been set. +func (o *Incident) HasAffectedViewsPerHourOnOpen() bool { + if o != nil && o.AffectedViewsPerHourOnOpen != nil { + return true + } + + return false +} + +// SetAffectedViewsPerHourOnOpen gets a reference to the given int64 and assigns it to the AffectedViewsPerHourOnOpen field. +func (o *Incident) SetAffectedViewsPerHourOnOpen(v int64) { + o.AffectedViewsPerHourOnOpen = &v +} + +// GetAffectedViewsPerHour returns the AffectedViewsPerHour field value if set, zero value otherwise. +func (o *Incident) GetAffectedViewsPerHour() int64 { + if o == nil || o.AffectedViewsPerHour == nil { + var ret int64 + return ret + } + return *o.AffectedViewsPerHour +} + +// GetAffectedViewsPerHourOk returns a tuple with the AffectedViewsPerHour field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetAffectedViewsPerHourOk() (*int64, bool) { + if o == nil || o.AffectedViewsPerHour == nil { + return nil, false + } + return o.AffectedViewsPerHour, true +} + +// HasAffectedViewsPerHour returns a boolean if a field has been set. +func (o *Incident) HasAffectedViewsPerHour() bool { + if o != nil && o.AffectedViewsPerHour != nil { + return true + } + + return false +} + +// SetAffectedViewsPerHour gets a reference to the given int64 and assigns it to the AffectedViewsPerHour field. +func (o *Incident) SetAffectedViewsPerHour(v int64) { + o.AffectedViewsPerHour = &v +} + +// GetAffectedViews returns the AffectedViews field value if set, zero value otherwise. +func (o *Incident) GetAffectedViews() int64 { + if o == nil || o.AffectedViews == nil { + var ret int64 + return ret + } + return *o.AffectedViews +} + +// GetAffectedViewsOk returns a tuple with the AffectedViews field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Incident) GetAffectedViewsOk() (*int64, bool) { + if o == nil || o.AffectedViews == nil { + return nil, false + } + return o.AffectedViews, true +} + +// HasAffectedViews returns a boolean if a field has been set. +func (o *Incident) HasAffectedViews() bool { + if o != nil && o.AffectedViews != nil { + return true + } + + return false +} + +// SetAffectedViews gets a reference to the given int64 and assigns it to the AffectedViews field. +func (o *Incident) SetAffectedViews(v int64) { + o.AffectedViews = &v +} + +func (o Incident) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Threshold != nil { + toSerialize["threshold"] = o.Threshold + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.StartedAt != nil { + toSerialize["started_at"] = o.StartedAt + } + if o.Severity != nil { + toSerialize["severity"] = o.Severity + } + if o.SampleSizeUnit != nil { + toSerialize["sample_size_unit"] = o.SampleSizeUnit + } + if o.SampleSize != nil { + toSerialize["sample_size"] = o.SampleSize + } + if o.ResolvedAt != nil { + toSerialize["resolved_at"] = o.ResolvedAt + } + if o.Notifications != nil { + toSerialize["notifications"] = o.Notifications + } + if o.NotificationRules != nil { + toSerialize["notification_rules"] = o.NotificationRules + } + if o.Measurement != nil { + toSerialize["measurement"] = o.Measurement + } + if o.MeasuredValueOnClose != nil { + toSerialize["measured_value_on_close"] = o.MeasuredValueOnClose + } + if o.MeasuredValue != nil { + toSerialize["measured_value"] = o.MeasuredValue + } + if o.IncidentKey != nil { + toSerialize["incident_key"] = o.IncidentKey + } + if o.Impact != nil { + toSerialize["impact"] = o.Impact + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.ErrorDescription != nil { + toSerialize["error_description"] = o.ErrorDescription + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Breakdowns != nil { + toSerialize["breakdowns"] = o.Breakdowns + } + if o.AffectedViewsPerHourOnOpen != nil { + toSerialize["affected_views_per_hour_on_open"] = o.AffectedViewsPerHourOnOpen + } + if o.AffectedViewsPerHour != nil { + toSerialize["affected_views_per_hour"] = o.AffectedViewsPerHour + } + if o.AffectedViews != nil { + toSerialize["affected_views"] = o.AffectedViews + } + return json.Marshal(toSerialize) +} + +type NullableIncident struct { + value *Incident + isSet bool +} + +func (v NullableIncident) Get() *Incident { + return v.value +} + +func (v *NullableIncident) Set(val *Incident) { + v.value = val + v.isSet = true +} + +func (v NullableIncident) IsSet() bool { + return v.isSet +} + +func (v *NullableIncident) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncident(val *Incident) *NullableIncident { + return &NullableIncident{value: val, isSet: true} +} + +func (v NullableIncident) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncident) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_incident_breakdown.go b/model_incident_breakdown.go index c30f65f..afdbce0 100644 --- a/model_incident_breakdown.go +++ b/model_incident_breakdown.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// IncidentBreakdown struct for IncidentBreakdown type IncidentBreakdown struct { - Value string `json:"value,omitempty"` - Name string `json:"name,omitempty"` - Id string `json:"id,omitempty"` + Value *string `json:"value,omitempty"` + Name *string `json:"name,omitempty"` + Id *string `json:"id,omitempty"` +} + +// NewIncidentBreakdown instantiates a new IncidentBreakdown 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 NewIncidentBreakdown() *IncidentBreakdown { + this := IncidentBreakdown{} + return &this +} + +// NewIncidentBreakdownWithDefaults instantiates a new IncidentBreakdown 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 NewIncidentBreakdownWithDefaults() *IncidentBreakdown { + this := IncidentBreakdown{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *IncidentBreakdown) GetValue() string { + if o == nil || o.Value == nil { + var ret string + 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. +func (o *IncidentBreakdown) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true } + +// HasValue returns a boolean if a field has been set. +func (o *IncidentBreakdown) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *IncidentBreakdown) SetValue(v string) { + o.Value = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *IncidentBreakdown) GetName() string { + if o == nil || o.Name == nil { + 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 *IncidentBreakdown) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *IncidentBreakdown) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *IncidentBreakdown) SetName(v string) { + o.Name = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *IncidentBreakdown) GetId() string { + if o == nil || o.Id == nil { + 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 *IncidentBreakdown) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *IncidentBreakdown) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *IncidentBreakdown) SetId(v string) { + o.Id = &v +} + +func (o IncidentBreakdown) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableIncidentBreakdown struct { + value *IncidentBreakdown + isSet bool +} + +func (v NullableIncidentBreakdown) Get() *IncidentBreakdown { + return v.value +} + +func (v *NullableIncidentBreakdown) Set(val *IncidentBreakdown) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentBreakdown) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentBreakdown) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentBreakdown(val *IncidentBreakdown) *NullableIncidentBreakdown { + return &NullableIncidentBreakdown{value: val, isSet: true} +} + +func (v NullableIncidentBreakdown) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentBreakdown) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_incident_notification.go b/model_incident_notification.go index ccdfe83..bcab376 100644 --- a/model_incident_notification.go +++ b/model_incident_notification.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// IncidentNotification struct for IncidentNotification type IncidentNotification struct { - QueuedAt string `json:"queued_at,omitempty"` - Id int64 `json:"id,omitempty"` - AttemptedAt string `json:"attempted_at,omitempty"` + QueuedAt *string `json:"queued_at,omitempty"` + Id *int64 `json:"id,omitempty"` + AttemptedAt *string `json:"attempted_at,omitempty"` +} + +// NewIncidentNotification instantiates a new IncidentNotification 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 NewIncidentNotification() *IncidentNotification { + this := IncidentNotification{} + return &this +} + +// NewIncidentNotificationWithDefaults instantiates a new IncidentNotification 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 NewIncidentNotificationWithDefaults() *IncidentNotification { + this := IncidentNotification{} + return &this +} + +// GetQueuedAt returns the QueuedAt field value if set, zero value otherwise. +func (o *IncidentNotification) GetQueuedAt() string { + if o == nil || o.QueuedAt == nil { + var ret string + return ret + } + return *o.QueuedAt +} + +// GetQueuedAtOk returns a tuple with the QueuedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentNotification) GetQueuedAtOk() (*string, bool) { + if o == nil || o.QueuedAt == nil { + return nil, false + } + return o.QueuedAt, true } + +// HasQueuedAt returns a boolean if a field has been set. +func (o *IncidentNotification) HasQueuedAt() bool { + if o != nil && o.QueuedAt != nil { + return true + } + + return false +} + +// SetQueuedAt gets a reference to the given string and assigns it to the QueuedAt field. +func (o *IncidentNotification) SetQueuedAt(v string) { + o.QueuedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *IncidentNotification) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + 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 *IncidentNotification) GetIdOk() (*int64, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *IncidentNotification) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *IncidentNotification) SetId(v int64) { + o.Id = &v +} + +// GetAttemptedAt returns the AttemptedAt field value if set, zero value otherwise. +func (o *IncidentNotification) GetAttemptedAt() string { + if o == nil || o.AttemptedAt == nil { + var ret string + return ret + } + return *o.AttemptedAt +} + +// GetAttemptedAtOk returns a tuple with the AttemptedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentNotification) GetAttemptedAtOk() (*string, bool) { + if o == nil || o.AttemptedAt == nil { + return nil, false + } + return o.AttemptedAt, true +} + +// HasAttemptedAt returns a boolean if a field has been set. +func (o *IncidentNotification) HasAttemptedAt() bool { + if o != nil && o.AttemptedAt != nil { + return true + } + + return false +} + +// SetAttemptedAt gets a reference to the given string and assigns it to the AttemptedAt field. +func (o *IncidentNotification) SetAttemptedAt(v string) { + o.AttemptedAt = &v +} + +func (o IncidentNotification) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.QueuedAt != nil { + toSerialize["queued_at"] = o.QueuedAt + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.AttemptedAt != nil { + toSerialize["attempted_at"] = o.AttemptedAt + } + return json.Marshal(toSerialize) +} + +type NullableIncidentNotification struct { + value *IncidentNotification + isSet bool +} + +func (v NullableIncidentNotification) Get() *IncidentNotification { + return v.value +} + +func (v *NullableIncidentNotification) Set(val *IncidentNotification) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentNotification) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentNotification) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentNotification(val *IncidentNotification) *NullableIncidentNotification { + return &NullableIncidentNotification{value: val, isSet: true} +} + +func (v NullableIncidentNotification) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentNotification) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_incident_notification_rule.go b/model_incident_notification_rule.go index fdd9e38..a4da0be 100644 --- a/model_incident_notification_rule.go +++ b/model_incident_notification_rule.go @@ -1,12 +1,259 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// IncidentNotificationRule struct for IncidentNotificationRule type IncidentNotificationRule struct { - Status string `json:"status,omitempty"` - Rules []NotificationRule `json:"rules,omitempty"` - PropertyId string `json:"property_id,omitempty"` - Id string `json:"id,omitempty"` - Action string `json:"action,omitempty"` + Status *string `json:"status,omitempty"` + Rules *[]NotificationRule `json:"rules,omitempty"` + PropertyId *string `json:"property_id,omitempty"` + Id *string `json:"id,omitempty"` + Action *string `json:"action,omitempty"` +} + +// NewIncidentNotificationRule instantiates a new IncidentNotificationRule 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 NewIncidentNotificationRule() *IncidentNotificationRule { + this := IncidentNotificationRule{} + return &this +} + +// NewIncidentNotificationRuleWithDefaults instantiates a new IncidentNotificationRule 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 NewIncidentNotificationRuleWithDefaults() *IncidentNotificationRule { + this := IncidentNotificationRule{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *IncidentNotificationRule) GetStatus() string { + if o == nil || o.Status == nil { + 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 *IncidentNotificationRule) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *IncidentNotificationRule) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *IncidentNotificationRule) SetStatus(v string) { + o.Status = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *IncidentNotificationRule) GetRules() []NotificationRule { + if o == nil || o.Rules == nil { + var ret []NotificationRule + return ret + } + return *o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentNotificationRule) GetRulesOk() (*[]NotificationRule, bool) { + if o == nil || o.Rules == nil { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *IncidentNotificationRule) HasRules() bool { + if o != nil && o.Rules != nil { + return true + } + + return false +} + +// SetRules gets a reference to the given []NotificationRule and assigns it to the Rules field. +func (o *IncidentNotificationRule) SetRules(v []NotificationRule) { + o.Rules = &v +} + +// GetPropertyId returns the PropertyId field value if set, zero value otherwise. +func (o *IncidentNotificationRule) GetPropertyId() string { + if o == nil || o.PropertyId == nil { + var ret string + return ret + } + return *o.PropertyId +} + +// GetPropertyIdOk returns a tuple with the PropertyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentNotificationRule) GetPropertyIdOk() (*string, bool) { + if o == nil || o.PropertyId == nil { + return nil, false + } + return o.PropertyId, true } + +// HasPropertyId returns a boolean if a field has been set. +func (o *IncidentNotificationRule) HasPropertyId() bool { + if o != nil && o.PropertyId != nil { + return true + } + + return false +} + +// SetPropertyId gets a reference to the given string and assigns it to the PropertyId field. +func (o *IncidentNotificationRule) SetPropertyId(v string) { + o.PropertyId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *IncidentNotificationRule) GetId() string { + if o == nil || o.Id == nil { + 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 *IncidentNotificationRule) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *IncidentNotificationRule) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *IncidentNotificationRule) SetId(v string) { + o.Id = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *IncidentNotificationRule) GetAction() string { + if o == nil || o.Action == nil { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentNotificationRule) GetActionOk() (*string, bool) { + if o == nil || o.Action == nil { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *IncidentNotificationRule) HasAction() bool { + if o != nil && o.Action != nil { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *IncidentNotificationRule) SetAction(v string) { + o.Action = &v +} + +func (o IncidentNotificationRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + if o.PropertyId != nil { + toSerialize["property_id"] = o.PropertyId + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Action != nil { + toSerialize["action"] = o.Action + } + return json.Marshal(toSerialize) +} + +type NullableIncidentNotificationRule struct { + value *IncidentNotificationRule + isSet bool +} + +func (v NullableIncidentNotificationRule) Get() *IncidentNotificationRule { + return v.value +} + +func (v *NullableIncidentNotificationRule) Set(val *IncidentNotificationRule) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentNotificationRule) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentNotificationRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentNotificationRule(val *IncidentNotificationRule) *NullableIncidentNotificationRule { + return &NullableIncidentNotificationRule{value: val, isSet: true} +} + +func (v NullableIncidentNotificationRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentNotificationRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_incident_response.go b/model_incident_response.go index 64c4670..3c1b21c 100644 --- a/model_incident_response.go +++ b/model_incident_response.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// IncidentResponse struct for IncidentResponse type IncidentResponse struct { - Data Incident `json:"data,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *Incident `json:"data,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewIncidentResponse instantiates a new IncidentResponse 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 NewIncidentResponse() *IncidentResponse { + this := IncidentResponse{} + return &this +} + +// NewIncidentResponseWithDefaults instantiates a new IncidentResponse 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 NewIncidentResponseWithDefaults() *IncidentResponse { + this := IncidentResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *IncidentResponse) GetData() Incident { + if o == nil || o.Data == nil { + var ret Incident + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponse) GetDataOk() (*Incident, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *IncidentResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given Incident and assigns it to the Data field. +func (o *IncidentResponse) SetData(v Incident) { + o.Data = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *IncidentResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *IncidentResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false } + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *IncidentResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o IncidentResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableIncidentResponse struct { + value *IncidentResponse + isSet bool +} + +func (v NullableIncidentResponse) Get() *IncidentResponse { + return v.value +} + +func (v *NullableIncidentResponse) Set(val *IncidentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentResponse(val *IncidentResponse) *NullableIncidentResponse { + return &NullableIncidentResponse{value: val, isSet: true} +} + +func (v NullableIncidentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_input_file.go b/model_input_file.go index b0a61a3..045d06b 100644 --- a/model_input_file.go +++ b/model_input_file.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// InputFile struct for InputFile type InputFile struct { - ContainerFormat string `json:"container_format,omitempty"` - Tracks []InputTrack `json:"tracks,omitempty"` + ContainerFormat *string `json:"container_format,omitempty"` + Tracks *[]InputTrack `json:"tracks,omitempty"` +} + +// NewInputFile instantiates a new InputFile 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 NewInputFile() *InputFile { + this := InputFile{} + return &this +} + +// NewInputFileWithDefaults instantiates a new InputFile 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 NewInputFileWithDefaults() *InputFile { + this := InputFile{} + return &this +} + +// GetContainerFormat returns the ContainerFormat field value if set, zero value otherwise. +func (o *InputFile) GetContainerFormat() string { + if o == nil || o.ContainerFormat == nil { + var ret string + return ret + } + return *o.ContainerFormat +} + +// GetContainerFormatOk returns a tuple with the ContainerFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputFile) GetContainerFormatOk() (*string, bool) { + if o == nil || o.ContainerFormat == nil { + return nil, false + } + return o.ContainerFormat, true +} + +// HasContainerFormat returns a boolean if a field has been set. +func (o *InputFile) HasContainerFormat() bool { + if o != nil && o.ContainerFormat != nil { + return true + } + + return false +} + +// SetContainerFormat gets a reference to the given string and assigns it to the ContainerFormat field. +func (o *InputFile) SetContainerFormat(v string) { + o.ContainerFormat = &v +} + +// GetTracks returns the Tracks field value if set, zero value otherwise. +func (o *InputFile) GetTracks() []InputTrack { + if o == nil || o.Tracks == nil { + var ret []InputTrack + return ret + } + return *o.Tracks +} + +// GetTracksOk returns a tuple with the Tracks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputFile) GetTracksOk() (*[]InputTrack, bool) { + if o == nil || o.Tracks == nil { + return nil, false + } + return o.Tracks, true +} + +// HasTracks returns a boolean if a field has been set. +func (o *InputFile) HasTracks() bool { + if o != nil && o.Tracks != nil { + return true + } + + return false } + +// SetTracks gets a reference to the given []InputTrack and assigns it to the Tracks field. +func (o *InputFile) SetTracks(v []InputTrack) { + o.Tracks = &v +} + +func (o InputFile) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ContainerFormat != nil { + toSerialize["container_format"] = o.ContainerFormat + } + if o.Tracks != nil { + toSerialize["tracks"] = o.Tracks + } + return json.Marshal(toSerialize) +} + +type NullableInputFile struct { + value *InputFile + isSet bool +} + +func (v NullableInputFile) Get() *InputFile { + return v.value +} + +func (v *NullableInputFile) Set(val *InputFile) { + v.value = val + v.isSet = true +} + +func (v NullableInputFile) IsSet() bool { + return v.isSet +} + +func (v *NullableInputFile) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputFile(val *InputFile) *NullableInputFile { + return &NullableInputFile{value: val, isSet: true} +} + +func (v NullableInputFile) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputFile) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_input_info.go b/model_input_info.go index c3c9bb2..f87e03c 100644 --- a/model_input_info.go +++ b/model_input_info.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// InputInfo struct for InputInfo type InputInfo struct { - Settings InputSettings `json:"settings,omitempty"` - File InputFile `json:"file,omitempty"` + Settings *InputSettings `json:"settings,omitempty"` + File *InputFile `json:"file,omitempty"` +} + +// NewInputInfo instantiates a new InputInfo 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 NewInputInfo() *InputInfo { + this := InputInfo{} + return &this +} + +// NewInputInfoWithDefaults instantiates a new InputInfo 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 NewInputInfoWithDefaults() *InputInfo { + this := InputInfo{} + return &this +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *InputInfo) GetSettings() InputSettings { + if o == nil || o.Settings == nil { + var ret InputSettings + return ret + } + return *o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputInfo) GetSettingsOk() (*InputSettings, bool) { + if o == nil || o.Settings == nil { + return nil, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *InputInfo) HasSettings() bool { + if o != nil && o.Settings != nil { + return true + } + + return false +} + +// SetSettings gets a reference to the given InputSettings and assigns it to the Settings field. +func (o *InputInfo) SetSettings(v InputSettings) { + o.Settings = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *InputInfo) GetFile() InputFile { + if o == nil || o.File == nil { + var ret InputFile + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputInfo) GetFileOk() (*InputFile, bool) { + if o == nil || o.File == nil { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *InputInfo) HasFile() bool { + if o != nil && o.File != nil { + return true + } + + return false } + +// SetFile gets a reference to the given InputFile and assigns it to the File field. +func (o *InputInfo) SetFile(v InputFile) { + o.File = &v +} + +func (o InputInfo) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Settings != nil { + toSerialize["settings"] = o.Settings + } + if o.File != nil { + toSerialize["file"] = o.File + } + return json.Marshal(toSerialize) +} + +type NullableInputInfo struct { + value *InputInfo + isSet bool +} + +func (v NullableInputInfo) Get() *InputInfo { + return v.value +} + +func (v *NullableInputInfo) Set(val *InputInfo) { + v.value = val + v.isSet = true +} + +func (v NullableInputInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableInputInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputInfo(val *InputInfo) *NullableInputInfo { + return &NullableInputInfo{value: val, isSet: true} +} + +func (v NullableInputInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_input_settings.go b/model_input_settings.go index d4ddd89..1bd9278 100644 --- a/model_input_settings.go +++ b/model_input_settings.go @@ -1,27 +1,448 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -// An array of objects that each describe an input file to be used to create the asset. As a shortcut, `input` can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. +import ( + "encoding/json" +) + +// InputSettings An array of objects that each describe an input file to be used to create the asset. As a shortcut, `input` can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. type InputSettings struct { - // The web address of the file that Mux should download and use. * For subtitles text tracks, the url is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the url is the location of the watermark image. * When creating clips from existing Mux assets, the url is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. - Url string `json:"url,omitempty"` - OverlaySettings InputSettingsOverlaySettings `json:"overlay_settings,omitempty"` - // The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. - StartTime float64 `json:"start_time,omitempty"` - // The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. - EndTime float64 `json:"end_time,omitempty"` + // The web address of the file that Mux should download and use. * For subtitles text tracks, the url is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the url is the location of the watermark image. * When creating clips from existing Mux assets, the url is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. + Url *string `json:"url,omitempty"` + OverlaySettings *InputSettingsOverlaySettings `json:"overlay_settings,omitempty"` + // The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. + StartTime *float64 `json:"start_time,omitempty"` + // The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. + EndTime *float64 `json:"end_time,omitempty"` // This parameter is required for the `text` track type. - Type string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` // Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` track type. - TextType string `json:"text_type,omitempty"` + TextType *string `json:"text_type,omitempty"` // The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track. - LanguageCode string `json:"language_code,omitempty"` + LanguageCode *string `json:"language_code,omitempty"` // The name of the track containing a human-readable description. This value must be unique across all text type and subtitles `text` type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for subtitles text track with language_code as en. This optional parameter should be used only for `text` type and subtitles `text` type track. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value. - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` // Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text` type and subtitles `text` type tracks. - ClosedCaptions bool `json:"closed_captions,omitempty"` + ClosedCaptions *bool `json:"closed_captions,omitempty"` // This optional parameter should be used for `text` type and subtitles `text` type tracks. - Passthrough string `json:"passthrough,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` +} + +// NewInputSettings instantiates a new InputSettings 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 NewInputSettings() *InputSettings { + this := InputSettings{} + return &this +} + +// NewInputSettingsWithDefaults instantiates a new InputSettings 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 NewInputSettingsWithDefaults() *InputSettings { + this := InputSettings{} + return &this +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *InputSettings) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *InputSettings) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *InputSettings) SetUrl(v string) { + o.Url = &v +} + +// GetOverlaySettings returns the OverlaySettings field value if set, zero value otherwise. +func (o *InputSettings) GetOverlaySettings() InputSettingsOverlaySettings { + if o == nil || o.OverlaySettings == nil { + var ret InputSettingsOverlaySettings + return ret + } + return *o.OverlaySettings +} + +// GetOverlaySettingsOk returns a tuple with the OverlaySettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetOverlaySettingsOk() (*InputSettingsOverlaySettings, bool) { + if o == nil || o.OverlaySettings == nil { + return nil, false + } + return o.OverlaySettings, true +} + +// HasOverlaySettings returns a boolean if a field has been set. +func (o *InputSettings) HasOverlaySettings() bool { + if o != nil && o.OverlaySettings != nil { + return true + } + + return false +} + +// SetOverlaySettings gets a reference to the given InputSettingsOverlaySettings and assigns it to the OverlaySettings field. +func (o *InputSettings) SetOverlaySettings(v InputSettingsOverlaySettings) { + o.OverlaySettings = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *InputSettings) GetStartTime() float64 { + if o == nil || o.StartTime == nil { + var ret float64 + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetStartTimeOk() (*float64, bool) { + if o == nil || o.StartTime == nil { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *InputSettings) HasStartTime() bool { + if o != nil && o.StartTime != nil { + return true + } + + return false +} + +// SetStartTime gets a reference to the given float64 and assigns it to the StartTime field. +func (o *InputSettings) SetStartTime(v float64) { + o.StartTime = &v +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *InputSettings) GetEndTime() float64 { + if o == nil || o.EndTime == nil { + var ret float64 + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetEndTimeOk() (*float64, bool) { + if o == nil || o.EndTime == nil { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *InputSettings) HasEndTime() bool { + if o != nil && o.EndTime != nil { + return true + } + + return false +} + +// SetEndTime gets a reference to the given float64 and assigns it to the EndTime field. +func (o *InputSettings) SetEndTime(v float64) { + o.EndTime = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InputSettings) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *InputSettings) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *InputSettings) SetType(v string) { + o.Type = &v +} + +// GetTextType returns the TextType field value if set, zero value otherwise. +func (o *InputSettings) GetTextType() string { + if o == nil || o.TextType == nil { + var ret string + return ret + } + return *o.TextType +} + +// GetTextTypeOk returns a tuple with the TextType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetTextTypeOk() (*string, bool) { + if o == nil || o.TextType == nil { + return nil, false + } + return o.TextType, true +} + +// HasTextType returns a boolean if a field has been set. +func (o *InputSettings) HasTextType() bool { + if o != nil && o.TextType != nil { + return true + } + + return false } + +// SetTextType gets a reference to the given string and assigns it to the TextType field. +func (o *InputSettings) SetTextType(v string) { + o.TextType = &v +} + +// GetLanguageCode returns the LanguageCode field value if set, zero value otherwise. +func (o *InputSettings) GetLanguageCode() string { + if o == nil || o.LanguageCode == nil { + var ret string + return ret + } + return *o.LanguageCode +} + +// GetLanguageCodeOk returns a tuple with the LanguageCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetLanguageCodeOk() (*string, bool) { + if o == nil || o.LanguageCode == nil { + return nil, false + } + return o.LanguageCode, true +} + +// HasLanguageCode returns a boolean if a field has been set. +func (o *InputSettings) HasLanguageCode() bool { + if o != nil && o.LanguageCode != nil { + return true + } + + return false +} + +// SetLanguageCode gets a reference to the given string and assigns it to the LanguageCode field. +func (o *InputSettings) SetLanguageCode(v string) { + o.LanguageCode = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InputSettings) GetName() string { + if o == nil || o.Name == nil { + 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 *InputSettings) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InputSettings) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InputSettings) SetName(v string) { + o.Name = &v +} + +// GetClosedCaptions returns the ClosedCaptions field value if set, zero value otherwise. +func (o *InputSettings) GetClosedCaptions() bool { + if o == nil || o.ClosedCaptions == nil { + var ret bool + return ret + } + return *o.ClosedCaptions +} + +// GetClosedCaptionsOk returns a tuple with the ClosedCaptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetClosedCaptionsOk() (*bool, bool) { + if o == nil || o.ClosedCaptions == nil { + return nil, false + } + return o.ClosedCaptions, true +} + +// HasClosedCaptions returns a boolean if a field has been set. +func (o *InputSettings) HasClosedCaptions() bool { + if o != nil && o.ClosedCaptions != nil { + return true + } + + return false +} + +// SetClosedCaptions gets a reference to the given bool and assigns it to the ClosedCaptions field. +func (o *InputSettings) SetClosedCaptions(v bool) { + o.ClosedCaptions = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *InputSettings) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettings) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *InputSettings) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *InputSettings) SetPassthrough(v string) { + o.Passthrough = &v +} + +func (o InputSettings) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Url != nil { + toSerialize["url"] = o.Url + } + if o.OverlaySettings != nil { + toSerialize["overlay_settings"] = o.OverlaySettings + } + if o.StartTime != nil { + toSerialize["start_time"] = o.StartTime + } + if o.EndTime != nil { + toSerialize["end_time"] = o.EndTime + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.TextType != nil { + toSerialize["text_type"] = o.TextType + } + if o.LanguageCode != nil { + toSerialize["language_code"] = o.LanguageCode + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.ClosedCaptions != nil { + toSerialize["closed_captions"] = o.ClosedCaptions + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + return json.Marshal(toSerialize) +} + +type NullableInputSettings struct { + value *InputSettings + isSet bool +} + +func (v NullableInputSettings) Get() *InputSettings { + return v.value +} + +func (v *NullableInputSettings) Set(val *InputSettings) { + v.value = val + v.isSet = true +} + +func (v NullableInputSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableInputSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputSettings(val *InputSettings) *NullableInputSettings { + return &NullableInputSettings{value: val, isSet: true} +} + +func (v NullableInputSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_input_settings_overlay_settings.go b/model_input_settings_overlay_settings.go index de9d26d..a2c5a78 100644 --- a/model_input_settings_overlay_settings.go +++ b/model_input_settings_overlay_settings.go @@ -1,22 +1,338 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -// An object that describes how the image file referenced in url should be placed over the video (i.e. watermarking). +import ( + "encoding/json" +) + +// InputSettingsOverlaySettings An object that describes how the image file referenced in url should be placed over the video (i.e. watermarking). type InputSettingsOverlaySettings struct { // Where the vertical positioning of the overlay/watermark should begin from. Defaults to `\"top\"` - VerticalAlign string `json:"vertical_align,omitempty"` + VerticalAlign *string `json:"vertical_align,omitempty"` // The distance from the vertical_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'middle', a positive value will shift the overlay towards the bottom and and a negative value will shift it towards the top. - VerticalMargin string `json:"vertical_margin,omitempty"` + VerticalMargin *string `json:"vertical_margin,omitempty"` // Where the horizontal positioning of the overlay/watermark should begin from. - HorizontalAlign string `json:"horizontal_align,omitempty"` + HorizontalAlign *string `json:"horizontal_align,omitempty"` // The distance from the horizontal_align starting point and the image's closest edge. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). Negative values will move the overlay offscreen. In the case of 'center', a positive value will shift the image towards the right and and a negative value will shift it towards the left. - HorizontalMargin string `json:"horizontal_margin,omitempty"` + HorizontalMargin *string `json:"horizontal_margin,omitempty"` // How wide the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the width will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If height is supplied with no width, the width will scale proportionally to the height. - Width string `json:"width,omitempty"` + Width *string `json:"width,omitempty"` // How tall the overlay should appear. Can be expressed as a percent (\"10%\") or as a pixel value (\"100px\"). If both width and height are left blank the height will be the true pixels of the image, applied as if the video has been scaled to fit a 1920x1080 frame. If width is supplied with no height, the height will scale proportionally to the width. - Height string `json:"height,omitempty"` + Height *string `json:"height,omitempty"` // How opaque the overlay should appear, expressed as a percent. (Default 100%) - Opacity string `json:"opacity,omitempty"` + Opacity *string `json:"opacity,omitempty"` +} + +// NewInputSettingsOverlaySettings instantiates a new InputSettingsOverlaySettings 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 NewInputSettingsOverlaySettings() *InputSettingsOverlaySettings { + this := InputSettingsOverlaySettings{} + return &this +} + +// NewInputSettingsOverlaySettingsWithDefaults instantiates a new InputSettingsOverlaySettings 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 NewInputSettingsOverlaySettingsWithDefaults() *InputSettingsOverlaySettings { + this := InputSettingsOverlaySettings{} + return &this } + +// GetVerticalAlign returns the VerticalAlign field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetVerticalAlign() string { + if o == nil || o.VerticalAlign == nil { + var ret string + return ret + } + return *o.VerticalAlign +} + +// GetVerticalAlignOk returns a tuple with the VerticalAlign field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetVerticalAlignOk() (*string, bool) { + if o == nil || o.VerticalAlign == nil { + return nil, false + } + return o.VerticalAlign, true +} + +// HasVerticalAlign returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasVerticalAlign() bool { + if o != nil && o.VerticalAlign != nil { + return true + } + + return false +} + +// SetVerticalAlign gets a reference to the given string and assigns it to the VerticalAlign field. +func (o *InputSettingsOverlaySettings) SetVerticalAlign(v string) { + o.VerticalAlign = &v +} + +// GetVerticalMargin returns the VerticalMargin field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetVerticalMargin() string { + if o == nil || o.VerticalMargin == nil { + var ret string + return ret + } + return *o.VerticalMargin +} + +// GetVerticalMarginOk returns a tuple with the VerticalMargin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetVerticalMarginOk() (*string, bool) { + if o == nil || o.VerticalMargin == nil { + return nil, false + } + return o.VerticalMargin, true +} + +// HasVerticalMargin returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasVerticalMargin() bool { + if o != nil && o.VerticalMargin != nil { + return true + } + + return false +} + +// SetVerticalMargin gets a reference to the given string and assigns it to the VerticalMargin field. +func (o *InputSettingsOverlaySettings) SetVerticalMargin(v string) { + o.VerticalMargin = &v +} + +// GetHorizontalAlign returns the HorizontalAlign field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetHorizontalAlign() string { + if o == nil || o.HorizontalAlign == nil { + var ret string + return ret + } + return *o.HorizontalAlign +} + +// GetHorizontalAlignOk returns a tuple with the HorizontalAlign field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetHorizontalAlignOk() (*string, bool) { + if o == nil || o.HorizontalAlign == nil { + return nil, false + } + return o.HorizontalAlign, true +} + +// HasHorizontalAlign returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasHorizontalAlign() bool { + if o != nil && o.HorizontalAlign != nil { + return true + } + + return false +} + +// SetHorizontalAlign gets a reference to the given string and assigns it to the HorizontalAlign field. +func (o *InputSettingsOverlaySettings) SetHorizontalAlign(v string) { + o.HorizontalAlign = &v +} + +// GetHorizontalMargin returns the HorizontalMargin field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetHorizontalMargin() string { + if o == nil || o.HorizontalMargin == nil { + var ret string + return ret + } + return *o.HorizontalMargin +} + +// GetHorizontalMarginOk returns a tuple with the HorizontalMargin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetHorizontalMarginOk() (*string, bool) { + if o == nil || o.HorizontalMargin == nil { + return nil, false + } + return o.HorizontalMargin, true +} + +// HasHorizontalMargin returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasHorizontalMargin() bool { + if o != nil && o.HorizontalMargin != nil { + return true + } + + return false +} + +// SetHorizontalMargin gets a reference to the given string and assigns it to the HorizontalMargin field. +func (o *InputSettingsOverlaySettings) SetHorizontalMargin(v string) { + o.HorizontalMargin = &v +} + +// GetWidth returns the Width field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetWidth() string { + if o == nil || o.Width == nil { + var ret string + return ret + } + return *o.Width +} + +// GetWidthOk returns a tuple with the Width field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetWidthOk() (*string, bool) { + if o == nil || o.Width == nil { + return nil, false + } + return o.Width, true +} + +// HasWidth returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasWidth() bool { + if o != nil && o.Width != nil { + return true + } + + return false +} + +// SetWidth gets a reference to the given string and assigns it to the Width field. +func (o *InputSettingsOverlaySettings) SetWidth(v string) { + o.Width = &v +} + +// GetHeight returns the Height field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetHeight() string { + if o == nil || o.Height == nil { + var ret string + return ret + } + return *o.Height +} + +// GetHeightOk returns a tuple with the Height field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetHeightOk() (*string, bool) { + if o == nil || o.Height == nil { + return nil, false + } + return o.Height, true +} + +// HasHeight returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasHeight() bool { + if o != nil && o.Height != nil { + return true + } + + return false +} + +// SetHeight gets a reference to the given string and assigns it to the Height field. +func (o *InputSettingsOverlaySettings) SetHeight(v string) { + o.Height = &v +} + +// GetOpacity returns the Opacity field value if set, zero value otherwise. +func (o *InputSettingsOverlaySettings) GetOpacity() string { + if o == nil || o.Opacity == nil { + var ret string + return ret + } + return *o.Opacity +} + +// GetOpacityOk returns a tuple with the Opacity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputSettingsOverlaySettings) GetOpacityOk() (*string, bool) { + if o == nil || o.Opacity == nil { + return nil, false + } + return o.Opacity, true +} + +// HasOpacity returns a boolean if a field has been set. +func (o *InputSettingsOverlaySettings) HasOpacity() bool { + if o != nil && o.Opacity != nil { + return true + } + + return false +} + +// SetOpacity gets a reference to the given string and assigns it to the Opacity field. +func (o *InputSettingsOverlaySettings) SetOpacity(v string) { + o.Opacity = &v +} + +func (o InputSettingsOverlaySettings) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.VerticalAlign != nil { + toSerialize["vertical_align"] = o.VerticalAlign + } + if o.VerticalMargin != nil { + toSerialize["vertical_margin"] = o.VerticalMargin + } + if o.HorizontalAlign != nil { + toSerialize["horizontal_align"] = o.HorizontalAlign + } + if o.HorizontalMargin != nil { + toSerialize["horizontal_margin"] = o.HorizontalMargin + } + if o.Width != nil { + toSerialize["width"] = o.Width + } + if o.Height != nil { + toSerialize["height"] = o.Height + } + if o.Opacity != nil { + toSerialize["opacity"] = o.Opacity + } + return json.Marshal(toSerialize) +} + +type NullableInputSettingsOverlaySettings struct { + value *InputSettingsOverlaySettings + isSet bool +} + +func (v NullableInputSettingsOverlaySettings) Get() *InputSettingsOverlaySettings { + return v.value +} + +func (v *NullableInputSettingsOverlaySettings) Set(val *InputSettingsOverlaySettings) { + v.value = val + v.isSet = true +} + +func (v NullableInputSettingsOverlaySettings) IsSet() bool { + return v.isSet +} + +func (v *NullableInputSettingsOverlaySettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputSettingsOverlaySettings(val *InputSettingsOverlaySettings) *NullableInputSettingsOverlaySettings { + return &NullableInputSettingsOverlaySettings{value: val, isSet: true} +} + +func (v NullableInputSettingsOverlaySettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputSettingsOverlaySettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_input_track.go b/model_input_track.go index 1f8f273..4fb450e 100644 --- a/model_input_track.go +++ b/model_input_track.go @@ -1,16 +1,403 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// InputTrack struct for InputTrack type InputTrack struct { - Type string `json:"type,omitempty"` - Duration float64 `json:"duration,omitempty"` - Encoding string `json:"encoding,omitempty"` - Width int64 `json:"width,omitempty"` - Height int64 `json:"height,omitempty"` - FrameRate float64 `json:"frame_rate,omitempty"` - SampleRate int64 `json:"sample_rate,omitempty"` - SampleSize int64 `json:"sample_size,omitempty"` - Channels int64 `json:"channels,omitempty"` + Type *string `json:"type,omitempty"` + Duration *float64 `json:"duration,omitempty"` + Encoding *string `json:"encoding,omitempty"` + Width *int64 `json:"width,omitempty"` + Height *int64 `json:"height,omitempty"` + FrameRate *float64 `json:"frame_rate,omitempty"` + SampleRate *int64 `json:"sample_rate,omitempty"` + SampleSize *int64 `json:"sample_size,omitempty"` + Channels *int64 `json:"channels,omitempty"` +} + +// NewInputTrack instantiates a new InputTrack 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 NewInputTrack() *InputTrack { + this := InputTrack{} + return &this +} + +// NewInputTrackWithDefaults instantiates a new InputTrack 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 NewInputTrackWithDefaults() *InputTrack { + this := InputTrack{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InputTrack) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *InputTrack) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *InputTrack) SetType(v string) { + o.Type = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *InputTrack) GetDuration() float64 { + if o == nil || o.Duration == nil { + var ret float64 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetDurationOk() (*float64, bool) { + if o == nil || o.Duration == nil { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *InputTrack) HasDuration() bool { + if o != nil && o.Duration != nil { + return true + } + + return false +} + +// SetDuration gets a reference to the given float64 and assigns it to the Duration field. +func (o *InputTrack) SetDuration(v float64) { + o.Duration = &v +} + +// GetEncoding returns the Encoding field value if set, zero value otherwise. +func (o *InputTrack) GetEncoding() string { + if o == nil || o.Encoding == nil { + var ret string + return ret + } + return *o.Encoding +} + +// GetEncodingOk returns a tuple with the Encoding field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetEncodingOk() (*string, bool) { + if o == nil || o.Encoding == nil { + return nil, false + } + return o.Encoding, true +} + +// HasEncoding returns a boolean if a field has been set. +func (o *InputTrack) HasEncoding() bool { + if o != nil && o.Encoding != nil { + return true + } + + return false +} + +// SetEncoding gets a reference to the given string and assigns it to the Encoding field. +func (o *InputTrack) SetEncoding(v string) { + o.Encoding = &v +} + +// GetWidth returns the Width field value if set, zero value otherwise. +func (o *InputTrack) GetWidth() int64 { + if o == nil || o.Width == nil { + var ret int64 + return ret + } + return *o.Width +} + +// GetWidthOk returns a tuple with the Width field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetWidthOk() (*int64, bool) { + if o == nil || o.Width == nil { + return nil, false + } + return o.Width, true } + +// HasWidth returns a boolean if a field has been set. +func (o *InputTrack) HasWidth() bool { + if o != nil && o.Width != nil { + return true + } + + return false +} + +// SetWidth gets a reference to the given int64 and assigns it to the Width field. +func (o *InputTrack) SetWidth(v int64) { + o.Width = &v +} + +// GetHeight returns the Height field value if set, zero value otherwise. +func (o *InputTrack) GetHeight() int64 { + if o == nil || o.Height == nil { + var ret int64 + return ret + } + return *o.Height +} + +// GetHeightOk returns a tuple with the Height field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetHeightOk() (*int64, bool) { + if o == nil || o.Height == nil { + return nil, false + } + return o.Height, true +} + +// HasHeight returns a boolean if a field has been set. +func (o *InputTrack) HasHeight() bool { + if o != nil && o.Height != nil { + return true + } + + return false +} + +// SetHeight gets a reference to the given int64 and assigns it to the Height field. +func (o *InputTrack) SetHeight(v int64) { + o.Height = &v +} + +// GetFrameRate returns the FrameRate field value if set, zero value otherwise. +func (o *InputTrack) GetFrameRate() float64 { + if o == nil || o.FrameRate == nil { + var ret float64 + return ret + } + return *o.FrameRate +} + +// GetFrameRateOk returns a tuple with the FrameRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetFrameRateOk() (*float64, bool) { + if o == nil || o.FrameRate == nil { + return nil, false + } + return o.FrameRate, true +} + +// HasFrameRate returns a boolean if a field has been set. +func (o *InputTrack) HasFrameRate() bool { + if o != nil && o.FrameRate != nil { + return true + } + + return false +} + +// SetFrameRate gets a reference to the given float64 and assigns it to the FrameRate field. +func (o *InputTrack) SetFrameRate(v float64) { + o.FrameRate = &v +} + +// GetSampleRate returns the SampleRate field value if set, zero value otherwise. +func (o *InputTrack) GetSampleRate() int64 { + if o == nil || o.SampleRate == nil { + var ret int64 + return ret + } + return *o.SampleRate +} + +// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetSampleRateOk() (*int64, bool) { + if o == nil || o.SampleRate == nil { + return nil, false + } + return o.SampleRate, true +} + +// HasSampleRate returns a boolean if a field has been set. +func (o *InputTrack) HasSampleRate() bool { + if o != nil && o.SampleRate != nil { + return true + } + + return false +} + +// SetSampleRate gets a reference to the given int64 and assigns it to the SampleRate field. +func (o *InputTrack) SetSampleRate(v int64) { + o.SampleRate = &v +} + +// GetSampleSize returns the SampleSize field value if set, zero value otherwise. +func (o *InputTrack) GetSampleSize() int64 { + if o == nil || o.SampleSize == nil { + var ret int64 + return ret + } + return *o.SampleSize +} + +// GetSampleSizeOk returns a tuple with the SampleSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetSampleSizeOk() (*int64, bool) { + if o == nil || o.SampleSize == nil { + return nil, false + } + return o.SampleSize, true +} + +// HasSampleSize returns a boolean if a field has been set. +func (o *InputTrack) HasSampleSize() bool { + if o != nil && o.SampleSize != nil { + return true + } + + return false +} + +// SetSampleSize gets a reference to the given int64 and assigns it to the SampleSize field. +func (o *InputTrack) SetSampleSize(v int64) { + o.SampleSize = &v +} + +// GetChannels returns the Channels field value if set, zero value otherwise. +func (o *InputTrack) GetChannels() int64 { + if o == nil || o.Channels == nil { + var ret int64 + return ret + } + return *o.Channels +} + +// GetChannelsOk returns a tuple with the Channels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InputTrack) GetChannelsOk() (*int64, bool) { + if o == nil || o.Channels == nil { + return nil, false + } + return o.Channels, true +} + +// HasChannels returns a boolean if a field has been set. +func (o *InputTrack) HasChannels() bool { + if o != nil && o.Channels != nil { + return true + } + + return false +} + +// SetChannels gets a reference to the given int64 and assigns it to the Channels field. +func (o *InputTrack) SetChannels(v int64) { + o.Channels = &v +} + +func (o InputTrack) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if o.Encoding != nil { + toSerialize["encoding"] = o.Encoding + } + if o.Width != nil { + toSerialize["width"] = o.Width + } + if o.Height != nil { + toSerialize["height"] = o.Height + } + if o.FrameRate != nil { + toSerialize["frame_rate"] = o.FrameRate + } + if o.SampleRate != nil { + toSerialize["sample_rate"] = o.SampleRate + } + if o.SampleSize != nil { + toSerialize["sample_size"] = o.SampleSize + } + if o.Channels != nil { + toSerialize["channels"] = o.Channels + } + return json.Marshal(toSerialize) +} + +type NullableInputTrack struct { + value *InputTrack + isSet bool +} + +func (v NullableInputTrack) Get() *InputTrack { + return v.value +} + +func (v *NullableInputTrack) Set(val *InputTrack) { + v.value = val + v.isSet = true +} + +func (v NullableInputTrack) IsSet() bool { + return v.isSet +} + +func (v *NullableInputTrack) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputTrack(val *InputTrack) *NullableInputTrack { + return &NullableInputTrack{value: val, isSet: true} +} + +func (v NullableInputTrack) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputTrack) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_insight.go b/model_insight.go index 67ef6ff..50a5aae 100644 --- a/model_insight.go +++ b/model_insight.go @@ -1,13 +1,295 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Insight struct for Insight type Insight struct { - TotalWatchTime int64 `json:"total_watch_time,omitempty"` - TotalViews int64 `json:"total_views,omitempty"` - NegativeImpactScore float32 `json:"negative_impact_score,omitempty"` - Metric float64 `json:"metric,omitempty"` - FilterValue string `json:"filter_value,omitempty"` - FilterColumn string `json:"filter_column,omitempty"` + TotalWatchTime *int64 `json:"total_watch_time,omitempty"` + TotalViews *int64 `json:"total_views,omitempty"` + NegativeImpactScore *float32 `json:"negative_impact_score,omitempty"` + Metric *float64 `json:"metric,omitempty"` + FilterValue *string `json:"filter_value,omitempty"` + FilterColumn *string `json:"filter_column,omitempty"` +} + +// NewInsight instantiates a new Insight 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 NewInsight() *Insight { + this := Insight{} + return &this +} + +// NewInsightWithDefaults instantiates a new Insight 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 NewInsightWithDefaults() *Insight { + this := Insight{} + return &this +} + +// GetTotalWatchTime returns the TotalWatchTime field value if set, zero value otherwise. +func (o *Insight) GetTotalWatchTime() int64 { + if o == nil || o.TotalWatchTime == nil { + var ret int64 + return ret + } + return *o.TotalWatchTime +} + +// GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insight) GetTotalWatchTimeOk() (*int64, bool) { + if o == nil || o.TotalWatchTime == nil { + return nil, false + } + return o.TotalWatchTime, true +} + +// HasTotalWatchTime returns a boolean if a field has been set. +func (o *Insight) HasTotalWatchTime() bool { + if o != nil && o.TotalWatchTime != nil { + return true + } + + return false +} + +// SetTotalWatchTime gets a reference to the given int64 and assigns it to the TotalWatchTime field. +func (o *Insight) SetTotalWatchTime(v int64) { + o.TotalWatchTime = &v +} + +// GetTotalViews returns the TotalViews field value if set, zero value otherwise. +func (o *Insight) GetTotalViews() int64 { + if o == nil || o.TotalViews == nil { + var ret int64 + return ret + } + return *o.TotalViews +} + +// GetTotalViewsOk returns a tuple with the TotalViews field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insight) GetTotalViewsOk() (*int64, bool) { + if o == nil || o.TotalViews == nil { + return nil, false + } + return o.TotalViews, true +} + +// HasTotalViews returns a boolean if a field has been set. +func (o *Insight) HasTotalViews() bool { + if o != nil && o.TotalViews != nil { + return true + } + + return false +} + +// SetTotalViews gets a reference to the given int64 and assigns it to the TotalViews field. +func (o *Insight) SetTotalViews(v int64) { + o.TotalViews = &v +} + +// GetNegativeImpactScore returns the NegativeImpactScore field value if set, zero value otherwise. +func (o *Insight) GetNegativeImpactScore() float32 { + if o == nil || o.NegativeImpactScore == nil { + var ret float32 + return ret + } + return *o.NegativeImpactScore +} + +// GetNegativeImpactScoreOk returns a tuple with the NegativeImpactScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insight) GetNegativeImpactScoreOk() (*float32, bool) { + if o == nil || o.NegativeImpactScore == nil { + return nil, false + } + return o.NegativeImpactScore, true +} + +// HasNegativeImpactScore returns a boolean if a field has been set. +func (o *Insight) HasNegativeImpactScore() bool { + if o != nil && o.NegativeImpactScore != nil { + return true + } + + return false +} + +// SetNegativeImpactScore gets a reference to the given float32 and assigns it to the NegativeImpactScore field. +func (o *Insight) SetNegativeImpactScore(v float32) { + o.NegativeImpactScore = &v +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *Insight) GetMetric() float64 { + if o == nil || o.Metric == nil { + var ret float64 + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insight) GetMetricOk() (*float64, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *Insight) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false } + +// SetMetric gets a reference to the given float64 and assigns it to the Metric field. +func (o *Insight) SetMetric(v float64) { + o.Metric = &v +} + +// GetFilterValue returns the FilterValue field value if set, zero value otherwise. +func (o *Insight) GetFilterValue() string { + if o == nil || o.FilterValue == nil { + var ret string + return ret + } + return *o.FilterValue +} + +// GetFilterValueOk returns a tuple with the FilterValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insight) GetFilterValueOk() (*string, bool) { + if o == nil || o.FilterValue == nil { + return nil, false + } + return o.FilterValue, true +} + +// HasFilterValue returns a boolean if a field has been set. +func (o *Insight) HasFilterValue() bool { + if o != nil && o.FilterValue != nil { + return true + } + + return false +} + +// SetFilterValue gets a reference to the given string and assigns it to the FilterValue field. +func (o *Insight) SetFilterValue(v string) { + o.FilterValue = &v +} + +// GetFilterColumn returns the FilterColumn field value if set, zero value otherwise. +func (o *Insight) GetFilterColumn() string { + if o == nil || o.FilterColumn == nil { + var ret string + return ret + } + return *o.FilterColumn +} + +// GetFilterColumnOk returns a tuple with the FilterColumn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insight) GetFilterColumnOk() (*string, bool) { + if o == nil || o.FilterColumn == nil { + return nil, false + } + return o.FilterColumn, true +} + +// HasFilterColumn returns a boolean if a field has been set. +func (o *Insight) HasFilterColumn() bool { + if o != nil && o.FilterColumn != nil { + return true + } + + return false +} + +// SetFilterColumn gets a reference to the given string and assigns it to the FilterColumn field. +func (o *Insight) SetFilterColumn(v string) { + o.FilterColumn = &v +} + +func (o Insight) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.TotalWatchTime != nil { + toSerialize["total_watch_time"] = o.TotalWatchTime + } + if o.TotalViews != nil { + toSerialize["total_views"] = o.TotalViews + } + if o.NegativeImpactScore != nil { + toSerialize["negative_impact_score"] = o.NegativeImpactScore + } + if o.Metric != nil { + toSerialize["metric"] = o.Metric + } + if o.FilterValue != nil { + toSerialize["filter_value"] = o.FilterValue + } + if o.FilterColumn != nil { + toSerialize["filter_column"] = o.FilterColumn + } + return json.Marshal(toSerialize) +} + +type NullableInsight struct { + value *Insight + isSet bool +} + +func (v NullableInsight) Get() *Insight { + return v.value +} + +func (v *NullableInsight) Set(val *Insight) { + v.value = val + v.isSet = true +} + +func (v NullableInsight) IsSet() bool { + return v.isSet +} + +func (v *NullableInsight) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInsight(val *Insight) *NullableInsight { + return &NullableInsight{value: val, isSet: true} +} + +func (v NullableInsight) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInsight) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_all_metric_values_response.go b/model_list_all_metric_values_response.go index d980671..aa3e8ce 100644 --- a/model_list_all_metric_values_response.go +++ b/model_list_all_metric_values_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListAllMetricValuesResponse struct for ListAllMetricValuesResponse type ListAllMetricValuesResponse struct { - Data []Score `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]Score `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListAllMetricValuesResponse instantiates a new ListAllMetricValuesResponse 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 NewListAllMetricValuesResponse() *ListAllMetricValuesResponse { + this := ListAllMetricValuesResponse{} + return &this +} + +// NewListAllMetricValuesResponseWithDefaults instantiates a new ListAllMetricValuesResponse 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 NewListAllMetricValuesResponseWithDefaults() *ListAllMetricValuesResponse { + this := ListAllMetricValuesResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListAllMetricValuesResponse) GetData() []Score { + if o == nil || o.Data == nil { + var ret []Score + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAllMetricValuesResponse) GetDataOk() (*[]Score, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListAllMetricValuesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Score and assigns it to the Data field. +func (o *ListAllMetricValuesResponse) SetData(v []Score) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListAllMetricValuesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAllMetricValuesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListAllMetricValuesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListAllMetricValuesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListAllMetricValuesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAllMetricValuesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListAllMetricValuesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListAllMetricValuesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListAllMetricValuesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListAllMetricValuesResponse struct { + value *ListAllMetricValuesResponse + isSet bool +} + +func (v NullableListAllMetricValuesResponse) Get() *ListAllMetricValuesResponse { + return v.value +} + +func (v *NullableListAllMetricValuesResponse) Set(val *ListAllMetricValuesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListAllMetricValuesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListAllMetricValuesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAllMetricValuesResponse(val *ListAllMetricValuesResponse) *NullableListAllMetricValuesResponse { + return &NullableListAllMetricValuesResponse{value: val, isSet: true} +} + +func (v NullableListAllMetricValuesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAllMetricValuesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_assets_response.go b/model_list_assets_response.go index 32a7679..fe82483 100644 --- a/model_list_assets_response.go +++ b/model_list_assets_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListAssetsResponse struct for ListAssetsResponse type ListAssetsResponse struct { - Data []Asset `json:"data,omitempty"` + Data *[]Asset `json:"data,omitempty"` +} + +// NewListAssetsResponse instantiates a new ListAssetsResponse 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 NewListAssetsResponse() *ListAssetsResponse { + this := ListAssetsResponse{} + return &this +} + +// NewListAssetsResponseWithDefaults instantiates a new ListAssetsResponse 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 NewListAssetsResponseWithDefaults() *ListAssetsResponse { + this := ListAssetsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListAssetsResponse) GetData() []Asset { + if o == nil || o.Data == nil { + var ret []Asset + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAssetsResponse) GetDataOk() (*[]Asset, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListAssetsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Asset and assigns it to the Data field. +func (o *ListAssetsResponse) SetData(v []Asset) { + o.Data = &v +} + +func (o ListAssetsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableListAssetsResponse struct { + value *ListAssetsResponse + isSet bool +} + +func (v NullableListAssetsResponse) Get() *ListAssetsResponse { + return v.value +} + +func (v *NullableListAssetsResponse) Set(val *ListAssetsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListAssetsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListAssetsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAssetsResponse(val *ListAssetsResponse) *NullableListAssetsResponse { + return &NullableListAssetsResponse{value: val, isSet: true} +} + +func (v NullableListAssetsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAssetsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_breakdown_values_response.go b/model_list_breakdown_values_response.go index 96e371a..a1dc5eb 100644 --- a/model_list_breakdown_values_response.go +++ b/model_list_breakdown_values_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListBreakdownValuesResponse struct for ListBreakdownValuesResponse type ListBreakdownValuesResponse struct { - Data []BreakdownValue `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]BreakdownValue `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListBreakdownValuesResponse instantiates a new ListBreakdownValuesResponse 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 NewListBreakdownValuesResponse() *ListBreakdownValuesResponse { + this := ListBreakdownValuesResponse{} + return &this +} + +// NewListBreakdownValuesResponseWithDefaults instantiates a new ListBreakdownValuesResponse 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 NewListBreakdownValuesResponseWithDefaults() *ListBreakdownValuesResponse { + this := ListBreakdownValuesResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListBreakdownValuesResponse) GetData() []BreakdownValue { + if o == nil || o.Data == nil { + var ret []BreakdownValue + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBreakdownValuesResponse) GetDataOk() (*[]BreakdownValue, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListBreakdownValuesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []BreakdownValue and assigns it to the Data field. +func (o *ListBreakdownValuesResponse) SetData(v []BreakdownValue) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListBreakdownValuesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBreakdownValuesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListBreakdownValuesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListBreakdownValuesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListBreakdownValuesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBreakdownValuesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListBreakdownValuesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListBreakdownValuesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListBreakdownValuesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListBreakdownValuesResponse struct { + value *ListBreakdownValuesResponse + isSet bool +} + +func (v NullableListBreakdownValuesResponse) Get() *ListBreakdownValuesResponse { + return v.value +} + +func (v *NullableListBreakdownValuesResponse) Set(val *ListBreakdownValuesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBreakdownValuesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBreakdownValuesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBreakdownValuesResponse(val *ListBreakdownValuesResponse) *NullableListBreakdownValuesResponse { + return &NullableListBreakdownValuesResponse{value: val, isSet: true} +} + +func (v NullableListBreakdownValuesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBreakdownValuesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_delivery_usage_response.go b/model_list_delivery_usage_response.go index af4de00..c177ace 100644 --- a/model_list_delivery_usage_response.go +++ b/model_list_delivery_usage_response.go @@ -1,12 +1,224 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListDeliveryUsageResponse struct for ListDeliveryUsageResponse type ListDeliveryUsageResponse struct { - Data []DeliveryReport `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]DeliveryReport `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` // Number of assets returned in this response. Default value is 100. - Limit int64 `json:"limit,omitempty"` + Limit *int64 `json:"limit,omitempty"` +} + +// NewListDeliveryUsageResponse instantiates a new ListDeliveryUsageResponse 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 NewListDeliveryUsageResponse() *ListDeliveryUsageResponse { + this := ListDeliveryUsageResponse{} + return &this +} + +// NewListDeliveryUsageResponseWithDefaults instantiates a new ListDeliveryUsageResponse 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 NewListDeliveryUsageResponseWithDefaults() *ListDeliveryUsageResponse { + this := ListDeliveryUsageResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListDeliveryUsageResponse) GetData() []DeliveryReport { + if o == nil || o.Data == nil { + var ret []DeliveryReport + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDeliveryUsageResponse) GetDataOk() (*[]DeliveryReport, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ListDeliveryUsageResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []DeliveryReport and assigns it to the Data field. +func (o *ListDeliveryUsageResponse) SetData(v []DeliveryReport) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListDeliveryUsageResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDeliveryUsageResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListDeliveryUsageResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListDeliveryUsageResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListDeliveryUsageResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDeliveryUsageResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListDeliveryUsageResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false } + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListDeliveryUsageResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *ListDeliveryUsageResponse) GetLimit() int64 { + if o == nil || o.Limit == nil { + var ret int64 + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDeliveryUsageResponse) GetLimitOk() (*int64, bool) { + if o == nil || o.Limit == nil { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *ListDeliveryUsageResponse) HasLimit() bool { + if o != nil && o.Limit != nil { + return true + } + + return false +} + +// SetLimit gets a reference to the given int64 and assigns it to the Limit field. +func (o *ListDeliveryUsageResponse) SetLimit(v int64) { + o.Limit = &v +} + +func (o ListDeliveryUsageResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + if o.Limit != nil { + toSerialize["limit"] = o.Limit + } + return json.Marshal(toSerialize) +} + +type NullableListDeliveryUsageResponse struct { + value *ListDeliveryUsageResponse + isSet bool +} + +func (v NullableListDeliveryUsageResponse) Get() *ListDeliveryUsageResponse { + return v.value +} + +func (v *NullableListDeliveryUsageResponse) Set(val *ListDeliveryUsageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListDeliveryUsageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListDeliveryUsageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDeliveryUsageResponse(val *ListDeliveryUsageResponse) *NullableListDeliveryUsageResponse { + return &NullableListDeliveryUsageResponse{value: val, isSet: true} +} + +func (v NullableListDeliveryUsageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDeliveryUsageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_dimension_values_response.go b/model_list_dimension_values_response.go index 5549ee5..5ef535f 100644 --- a/model_list_dimension_values_response.go +++ b/model_list_dimension_values_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListDimensionValuesResponse struct for ListDimensionValuesResponse type ListDimensionValuesResponse struct { - Data []DimensionValue `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]DimensionValue `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListDimensionValuesResponse instantiates a new ListDimensionValuesResponse 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 NewListDimensionValuesResponse() *ListDimensionValuesResponse { + this := ListDimensionValuesResponse{} + return &this +} + +// NewListDimensionValuesResponseWithDefaults instantiates a new ListDimensionValuesResponse 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 NewListDimensionValuesResponseWithDefaults() *ListDimensionValuesResponse { + this := ListDimensionValuesResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListDimensionValuesResponse) GetData() []DimensionValue { + if o == nil || o.Data == nil { + var ret []DimensionValue + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDimensionValuesResponse) GetDataOk() (*[]DimensionValue, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListDimensionValuesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []DimensionValue and assigns it to the Data field. +func (o *ListDimensionValuesResponse) SetData(v []DimensionValue) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListDimensionValuesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDimensionValuesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListDimensionValuesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListDimensionValuesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListDimensionValuesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDimensionValuesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListDimensionValuesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListDimensionValuesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListDimensionValuesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListDimensionValuesResponse struct { + value *ListDimensionValuesResponse + isSet bool +} + +func (v NullableListDimensionValuesResponse) Get() *ListDimensionValuesResponse { + return v.value +} + +func (v *NullableListDimensionValuesResponse) Set(val *ListDimensionValuesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListDimensionValuesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListDimensionValuesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDimensionValuesResponse(val *ListDimensionValuesResponse) *NullableListDimensionValuesResponse { + return &NullableListDimensionValuesResponse{value: val, isSet: true} +} + +func (v NullableListDimensionValuesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDimensionValuesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_dimensions_response.go b/model_list_dimensions_response.go index 1bfc2e1..5c12da7 100644 --- a/model_list_dimensions_response.go +++ b/model_list_dimensions_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListDimensionsResponse struct for ListDimensionsResponse type ListDimensionsResponse struct { - Data ListFiltersResponseData `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *ListFiltersResponseData `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListDimensionsResponse instantiates a new ListDimensionsResponse 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 NewListDimensionsResponse() *ListDimensionsResponse { + this := ListDimensionsResponse{} + return &this +} + +// NewListDimensionsResponseWithDefaults instantiates a new ListDimensionsResponse 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 NewListDimensionsResponseWithDefaults() *ListDimensionsResponse { + this := ListDimensionsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListDimensionsResponse) GetData() ListFiltersResponseData { + if o == nil || o.Data == nil { + var ret ListFiltersResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDimensionsResponse) GetDataOk() (*ListFiltersResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListDimensionsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given ListFiltersResponseData and assigns it to the Data field. +func (o *ListDimensionsResponse) SetData(v ListFiltersResponseData) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListDimensionsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDimensionsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListDimensionsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListDimensionsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListDimensionsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDimensionsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListDimensionsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListDimensionsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListDimensionsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListDimensionsResponse struct { + value *ListDimensionsResponse + isSet bool +} + +func (v NullableListDimensionsResponse) Get() *ListDimensionsResponse { + return v.value +} + +func (v *NullableListDimensionsResponse) Set(val *ListDimensionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListDimensionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListDimensionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDimensionsResponse(val *ListDimensionsResponse) *NullableListDimensionsResponse { + return &NullableListDimensionsResponse{value: val, isSet: true} +} + +func (v NullableListDimensionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDimensionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_errors_response.go b/model_list_errors_response.go index 88b10fb..7883f66 100644 --- a/model_list_errors_response.go +++ b/model_list_errors_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListErrorsResponse struct for ListErrorsResponse type ListErrorsResponse struct { - Data []Error `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]Error `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListErrorsResponse instantiates a new ListErrorsResponse 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 NewListErrorsResponse() *ListErrorsResponse { + this := ListErrorsResponse{} + return &this +} + +// NewListErrorsResponseWithDefaults instantiates a new ListErrorsResponse 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 NewListErrorsResponseWithDefaults() *ListErrorsResponse { + this := ListErrorsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListErrorsResponse) GetData() []Error { + if o == nil || o.Data == nil { + var ret []Error + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListErrorsResponse) GetDataOk() (*[]Error, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListErrorsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Error and assigns it to the Data field. +func (o *ListErrorsResponse) SetData(v []Error) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListErrorsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListErrorsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListErrorsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListErrorsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListErrorsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListErrorsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListErrorsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListErrorsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListErrorsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListErrorsResponse struct { + value *ListErrorsResponse + isSet bool +} + +func (v NullableListErrorsResponse) Get() *ListErrorsResponse { + return v.value +} + +func (v *NullableListErrorsResponse) Set(val *ListErrorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListErrorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListErrorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListErrorsResponse(val *ListErrorsResponse) *NullableListErrorsResponse { + return &NullableListErrorsResponse{value: val, isSet: true} +} + +func (v NullableListErrorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListErrorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_exports_response.go b/model_list_exports_response.go index 71484e5..fae800e 100644 --- a/model_list_exports_response.go +++ b/model_list_exports_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListExportsResponse struct for ListExportsResponse type ListExportsResponse struct { - Data []string `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]string `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListExportsResponse instantiates a new ListExportsResponse 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 NewListExportsResponse() *ListExportsResponse { + this := ListExportsResponse{} + return &this +} + +// NewListExportsResponseWithDefaults instantiates a new ListExportsResponse 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 NewListExportsResponseWithDefaults() *ListExportsResponse { + this := ListExportsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListExportsResponse) GetData() []string { + if o == nil || o.Data == nil { + var ret []string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListExportsResponse) GetDataOk() (*[]string, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListExportsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []string and assigns it to the Data field. +func (o *ListExportsResponse) SetData(v []string) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListExportsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListExportsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListExportsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListExportsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListExportsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListExportsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListExportsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListExportsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListExportsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListExportsResponse struct { + value *ListExportsResponse + isSet bool +} + +func (v NullableListExportsResponse) Get() *ListExportsResponse { + return v.value +} + +func (v *NullableListExportsResponse) Set(val *ListExportsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListExportsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListExportsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListExportsResponse(val *ListExportsResponse) *NullableListExportsResponse { + return &NullableListExportsResponse{value: val, isSet: true} +} + +func (v NullableListExportsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListExportsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_filter_values_response.go b/model_list_filter_values_response.go index afd9a19..6a9342d 100644 --- a/model_list_filter_values_response.go +++ b/model_list_filter_values_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListFilterValuesResponse struct for ListFilterValuesResponse type ListFilterValuesResponse struct { - Data []FilterValue `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]FilterValue `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListFilterValuesResponse instantiates a new ListFilterValuesResponse 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 NewListFilterValuesResponse() *ListFilterValuesResponse { + this := ListFilterValuesResponse{} + return &this +} + +// NewListFilterValuesResponseWithDefaults instantiates a new ListFilterValuesResponse 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 NewListFilterValuesResponseWithDefaults() *ListFilterValuesResponse { + this := ListFilterValuesResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListFilterValuesResponse) GetData() []FilterValue { + if o == nil || o.Data == nil { + var ret []FilterValue + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFilterValuesResponse) GetDataOk() (*[]FilterValue, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListFilterValuesResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []FilterValue and assigns it to the Data field. +func (o *ListFilterValuesResponse) SetData(v []FilterValue) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListFilterValuesResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFilterValuesResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListFilterValuesResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListFilterValuesResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListFilterValuesResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFilterValuesResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListFilterValuesResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListFilterValuesResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListFilterValuesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListFilterValuesResponse struct { + value *ListFilterValuesResponse + isSet bool +} + +func (v NullableListFilterValuesResponse) Get() *ListFilterValuesResponse { + return v.value +} + +func (v *NullableListFilterValuesResponse) Set(val *ListFilterValuesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFilterValuesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFilterValuesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFilterValuesResponse(val *ListFilterValuesResponse) *NullableListFilterValuesResponse { + return &NullableListFilterValuesResponse{value: val, isSet: true} +} + +func (v NullableListFilterValuesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFilterValuesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_filters_response.go b/model_list_filters_response.go index 07a62dc..98bd79a 100644 --- a/model_list_filters_response.go +++ b/model_list_filters_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListFiltersResponse struct for ListFiltersResponse type ListFiltersResponse struct { - Data ListFiltersResponseData `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *ListFiltersResponseData `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListFiltersResponse instantiates a new ListFiltersResponse 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 NewListFiltersResponse() *ListFiltersResponse { + this := ListFiltersResponse{} + return &this +} + +// NewListFiltersResponseWithDefaults instantiates a new ListFiltersResponse 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 NewListFiltersResponseWithDefaults() *ListFiltersResponse { + this := ListFiltersResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListFiltersResponse) GetData() ListFiltersResponseData { + if o == nil || o.Data == nil { + var ret ListFiltersResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFiltersResponse) GetDataOk() (*ListFiltersResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListFiltersResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given ListFiltersResponseData and assigns it to the Data field. +func (o *ListFiltersResponse) SetData(v ListFiltersResponseData) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListFiltersResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFiltersResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListFiltersResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListFiltersResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListFiltersResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFiltersResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListFiltersResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListFiltersResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListFiltersResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListFiltersResponse struct { + value *ListFiltersResponse + isSet bool +} + +func (v NullableListFiltersResponse) Get() *ListFiltersResponse { + return v.value +} + +func (v *NullableListFiltersResponse) Set(val *ListFiltersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFiltersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFiltersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFiltersResponse(val *ListFiltersResponse) *NullableListFiltersResponse { + return &NullableListFiltersResponse{value: val, isSet: true} +} + +func (v NullableListFiltersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFiltersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_filters_response_data.go b/model_list_filters_response_data.go index 8eb5c20..4650491 100644 --- a/model_list_filters_response_data.go +++ b/model_list_filters_response_data.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListFiltersResponseData struct for ListFiltersResponseData type ListFiltersResponseData struct { - Basic []string `json:"basic,omitempty"` - Advanced []string `json:"advanced,omitempty"` + Basic *[]string `json:"basic,omitempty"` + Advanced *[]string `json:"advanced,omitempty"` +} + +// NewListFiltersResponseData instantiates a new ListFiltersResponseData 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 NewListFiltersResponseData() *ListFiltersResponseData { + this := ListFiltersResponseData{} + return &this +} + +// NewListFiltersResponseDataWithDefaults instantiates a new ListFiltersResponseData 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 NewListFiltersResponseDataWithDefaults() *ListFiltersResponseData { + this := ListFiltersResponseData{} + return &this +} + +// GetBasic returns the Basic field value if set, zero value otherwise. +func (o *ListFiltersResponseData) GetBasic() []string { + if o == nil || o.Basic == nil { + var ret []string + return ret + } + return *o.Basic +} + +// GetBasicOk returns a tuple with the Basic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFiltersResponseData) GetBasicOk() (*[]string, bool) { + if o == nil || o.Basic == nil { + return nil, false + } + return o.Basic, true +} + +// HasBasic returns a boolean if a field has been set. +func (o *ListFiltersResponseData) HasBasic() bool { + if o != nil && o.Basic != nil { + return true + } + + return false +} + +// SetBasic gets a reference to the given []string and assigns it to the Basic field. +func (o *ListFiltersResponseData) SetBasic(v []string) { + o.Basic = &v +} + +// GetAdvanced returns the Advanced field value if set, zero value otherwise. +func (o *ListFiltersResponseData) GetAdvanced() []string { + if o == nil || o.Advanced == nil { + var ret []string + return ret + } + return *o.Advanced +} + +// GetAdvancedOk returns a tuple with the Advanced field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFiltersResponseData) GetAdvancedOk() (*[]string, bool) { + if o == nil || o.Advanced == nil { + return nil, false + } + return o.Advanced, true +} + +// HasAdvanced returns a boolean if a field has been set. +func (o *ListFiltersResponseData) HasAdvanced() bool { + if o != nil && o.Advanced != nil { + return true + } + + return false } + +// SetAdvanced gets a reference to the given []string and assigns it to the Advanced field. +func (o *ListFiltersResponseData) SetAdvanced(v []string) { + o.Advanced = &v +} + +func (o ListFiltersResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Basic != nil { + toSerialize["basic"] = o.Basic + } + if o.Advanced != nil { + toSerialize["advanced"] = o.Advanced + } + return json.Marshal(toSerialize) +} + +type NullableListFiltersResponseData struct { + value *ListFiltersResponseData + isSet bool +} + +func (v NullableListFiltersResponseData) Get() *ListFiltersResponseData { + return v.value +} + +func (v *NullableListFiltersResponseData) Set(val *ListFiltersResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableListFiltersResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableListFiltersResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFiltersResponseData(val *ListFiltersResponseData) *NullableListFiltersResponseData { + return &NullableListFiltersResponseData{value: val, isSet: true} +} + +func (v NullableListFiltersResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFiltersResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_incidents_response.go b/model_list_incidents_response.go index f584447..3939360 100644 --- a/model_list_incidents_response.go +++ b/model_list_incidents_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListIncidentsResponse struct for ListIncidentsResponse type ListIncidentsResponse struct { - Data []Incident `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]Incident `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListIncidentsResponse instantiates a new ListIncidentsResponse 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 NewListIncidentsResponse() *ListIncidentsResponse { + this := ListIncidentsResponse{} + return &this +} + +// NewListIncidentsResponseWithDefaults instantiates a new ListIncidentsResponse 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 NewListIncidentsResponseWithDefaults() *ListIncidentsResponse { + this := ListIncidentsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListIncidentsResponse) GetData() []Incident { + if o == nil || o.Data == nil { + var ret []Incident + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListIncidentsResponse) GetDataOk() (*[]Incident, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListIncidentsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Incident and assigns it to the Data field. +func (o *ListIncidentsResponse) SetData(v []Incident) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListIncidentsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListIncidentsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListIncidentsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListIncidentsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListIncidentsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListIncidentsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListIncidentsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListIncidentsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListIncidentsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListIncidentsResponse struct { + value *ListIncidentsResponse + isSet bool +} + +func (v NullableListIncidentsResponse) Get() *ListIncidentsResponse { + return v.value +} + +func (v *NullableListIncidentsResponse) Set(val *ListIncidentsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListIncidentsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListIncidentsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListIncidentsResponse(val *ListIncidentsResponse) *NullableListIncidentsResponse { + return &NullableListIncidentsResponse{value: val, isSet: true} +} + +func (v NullableListIncidentsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListIncidentsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_insights_response.go b/model_list_insights_response.go index c35bce5..5b055e9 100644 --- a/model_list_insights_response.go +++ b/model_list_insights_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListInsightsResponse struct for ListInsightsResponse type ListInsightsResponse struct { - Data []Insight `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]Insight `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListInsightsResponse instantiates a new ListInsightsResponse 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 NewListInsightsResponse() *ListInsightsResponse { + this := ListInsightsResponse{} + return &this +} + +// NewListInsightsResponseWithDefaults instantiates a new ListInsightsResponse 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 NewListInsightsResponseWithDefaults() *ListInsightsResponse { + this := ListInsightsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListInsightsResponse) GetData() []Insight { + if o == nil || o.Data == nil { + var ret []Insight + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInsightsResponse) GetDataOk() (*[]Insight, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListInsightsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Insight and assigns it to the Data field. +func (o *ListInsightsResponse) SetData(v []Insight) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListInsightsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInsightsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListInsightsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListInsightsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListInsightsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInsightsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListInsightsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListInsightsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListInsightsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListInsightsResponse struct { + value *ListInsightsResponse + isSet bool +} + +func (v NullableListInsightsResponse) Get() *ListInsightsResponse { + return v.value +} + +func (v *NullableListInsightsResponse) Set(val *ListInsightsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInsightsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInsightsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInsightsResponse(val *ListInsightsResponse) *NullableListInsightsResponse { + return &NullableListInsightsResponse{value: val, isSet: true} +} + +func (v NullableListInsightsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInsightsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_live_streams_response.go b/model_list_live_streams_response.go index b07e139..7b3f880 100644 --- a/model_list_live_streams_response.go +++ b/model_list_live_streams_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListLiveStreamsResponse struct for ListLiveStreamsResponse type ListLiveStreamsResponse struct { - Data []LiveStream `json:"data,omitempty"` + Data *[]LiveStream `json:"data,omitempty"` +} + +// NewListLiveStreamsResponse instantiates a new ListLiveStreamsResponse 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 NewListLiveStreamsResponse() *ListLiveStreamsResponse { + this := ListLiveStreamsResponse{} + return &this +} + +// NewListLiveStreamsResponseWithDefaults instantiates a new ListLiveStreamsResponse 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 NewListLiveStreamsResponseWithDefaults() *ListLiveStreamsResponse { + this := ListLiveStreamsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListLiveStreamsResponse) GetData() []LiveStream { + if o == nil || o.Data == nil { + var ret []LiveStream + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListLiveStreamsResponse) GetDataOk() (*[]LiveStream, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListLiveStreamsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []LiveStream and assigns it to the Data field. +func (o *ListLiveStreamsResponse) SetData(v []LiveStream) { + o.Data = &v +} + +func (o ListLiveStreamsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableListLiveStreamsResponse struct { + value *ListLiveStreamsResponse + isSet bool +} + +func (v NullableListLiveStreamsResponse) Get() *ListLiveStreamsResponse { + return v.value +} + +func (v *NullableListLiveStreamsResponse) Set(val *ListLiveStreamsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListLiveStreamsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListLiveStreamsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListLiveStreamsResponse(val *ListLiveStreamsResponse) *NullableListLiveStreamsResponse { + return &NullableListLiveStreamsResponse{value: val, isSet: true} +} + +func (v NullableListLiveStreamsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListLiveStreamsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_real_time_dimensions_response.go b/model_list_real_time_dimensions_response.go index 5e811ee..8de46e3 100644 --- a/model_list_real_time_dimensions_response.go +++ b/model_list_real_time_dimensions_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListRealTimeDimensionsResponse struct for ListRealTimeDimensionsResponse type ListRealTimeDimensionsResponse struct { - Data []ListRealTimeDimensionsResponseData `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]ListRealTimeDimensionsResponseData `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListRealTimeDimensionsResponse instantiates a new ListRealTimeDimensionsResponse 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 NewListRealTimeDimensionsResponse() *ListRealTimeDimensionsResponse { + this := ListRealTimeDimensionsResponse{} + return &this +} + +// NewListRealTimeDimensionsResponseWithDefaults instantiates a new ListRealTimeDimensionsResponse 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 NewListRealTimeDimensionsResponseWithDefaults() *ListRealTimeDimensionsResponse { + this := ListRealTimeDimensionsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListRealTimeDimensionsResponse) GetData() []ListRealTimeDimensionsResponseData { + if o == nil || o.Data == nil { + var ret []ListRealTimeDimensionsResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeDimensionsResponse) GetDataOk() (*[]ListRealTimeDimensionsResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListRealTimeDimensionsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []ListRealTimeDimensionsResponseData and assigns it to the Data field. +func (o *ListRealTimeDimensionsResponse) SetData(v []ListRealTimeDimensionsResponseData) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListRealTimeDimensionsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeDimensionsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListRealTimeDimensionsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListRealTimeDimensionsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListRealTimeDimensionsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeDimensionsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListRealTimeDimensionsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListRealTimeDimensionsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListRealTimeDimensionsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListRealTimeDimensionsResponse struct { + value *ListRealTimeDimensionsResponse + isSet bool +} + +func (v NullableListRealTimeDimensionsResponse) Get() *ListRealTimeDimensionsResponse { + return v.value +} + +func (v *NullableListRealTimeDimensionsResponse) Set(val *ListRealTimeDimensionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRealTimeDimensionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRealTimeDimensionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRealTimeDimensionsResponse(val *ListRealTimeDimensionsResponse) *NullableListRealTimeDimensionsResponse { + return &NullableListRealTimeDimensionsResponse{value: val, isSet: true} +} + +func (v NullableListRealTimeDimensionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRealTimeDimensionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_real_time_dimensions_response_data.go b/model_list_real_time_dimensions_response_data.go index 5a951a8..8705198 100644 --- a/model_list_real_time_dimensions_response_data.go +++ b/model_list_real_time_dimensions_response_data.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListRealTimeDimensionsResponseData struct for ListRealTimeDimensionsResponseData type ListRealTimeDimensionsResponseData struct { - Name string `json:"name,omitempty"` - DisplayName string `json:"display_name,omitempty"` + Name *string `json:"name,omitempty"` + DisplayName *string `json:"display_name,omitempty"` +} + +// NewListRealTimeDimensionsResponseData instantiates a new ListRealTimeDimensionsResponseData 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 NewListRealTimeDimensionsResponseData() *ListRealTimeDimensionsResponseData { + this := ListRealTimeDimensionsResponseData{} + return &this +} + +// NewListRealTimeDimensionsResponseDataWithDefaults instantiates a new ListRealTimeDimensionsResponseData 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 NewListRealTimeDimensionsResponseDataWithDefaults() *ListRealTimeDimensionsResponseData { + this := ListRealTimeDimensionsResponseData{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListRealTimeDimensionsResponseData) GetName() string { + if o == nil || o.Name == nil { + 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 *ListRealTimeDimensionsResponseData) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListRealTimeDimensionsResponseData) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListRealTimeDimensionsResponseData) SetName(v string) { + o.Name = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *ListRealTimeDimensionsResponseData) GetDisplayName() string { + if o == nil || o.DisplayName == nil { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeDimensionsResponseData) GetDisplayNameOk() (*string, bool) { + if o == nil || o.DisplayName == nil { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *ListRealTimeDimensionsResponseData) HasDisplayName() bool { + if o != nil && o.DisplayName != nil { + return true + } + + return false } + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *ListRealTimeDimensionsResponseData) SetDisplayName(v string) { + o.DisplayName = &v +} + +func (o ListRealTimeDimensionsResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.DisplayName != nil { + toSerialize["display_name"] = o.DisplayName + } + return json.Marshal(toSerialize) +} + +type NullableListRealTimeDimensionsResponseData struct { + value *ListRealTimeDimensionsResponseData + isSet bool +} + +func (v NullableListRealTimeDimensionsResponseData) Get() *ListRealTimeDimensionsResponseData { + return v.value +} + +func (v *NullableListRealTimeDimensionsResponseData) Set(val *ListRealTimeDimensionsResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableListRealTimeDimensionsResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableListRealTimeDimensionsResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRealTimeDimensionsResponseData(val *ListRealTimeDimensionsResponseData) *NullableListRealTimeDimensionsResponseData { + return &NullableListRealTimeDimensionsResponseData{value: val, isSet: true} +} + +func (v NullableListRealTimeDimensionsResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRealTimeDimensionsResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_real_time_metrics_response.go b/model_list_real_time_metrics_response.go index a534c83..e2f52e9 100644 --- a/model_list_real_time_metrics_response.go +++ b/model_list_real_time_metrics_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListRealTimeMetricsResponse struct for ListRealTimeMetricsResponse type ListRealTimeMetricsResponse struct { - Data []ListRealTimeDimensionsResponseData `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]ListRealTimeDimensionsResponseData `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListRealTimeMetricsResponse instantiates a new ListRealTimeMetricsResponse 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 NewListRealTimeMetricsResponse() *ListRealTimeMetricsResponse { + this := ListRealTimeMetricsResponse{} + return &this +} + +// NewListRealTimeMetricsResponseWithDefaults instantiates a new ListRealTimeMetricsResponse 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 NewListRealTimeMetricsResponseWithDefaults() *ListRealTimeMetricsResponse { + this := ListRealTimeMetricsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListRealTimeMetricsResponse) GetData() []ListRealTimeDimensionsResponseData { + if o == nil || o.Data == nil { + var ret []ListRealTimeDimensionsResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeMetricsResponse) GetDataOk() (*[]ListRealTimeDimensionsResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListRealTimeMetricsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []ListRealTimeDimensionsResponseData and assigns it to the Data field. +func (o *ListRealTimeMetricsResponse) SetData(v []ListRealTimeDimensionsResponseData) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListRealTimeMetricsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeMetricsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListRealTimeMetricsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListRealTimeMetricsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListRealTimeMetricsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRealTimeMetricsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListRealTimeMetricsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListRealTimeMetricsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListRealTimeMetricsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListRealTimeMetricsResponse struct { + value *ListRealTimeMetricsResponse + isSet bool +} + +func (v NullableListRealTimeMetricsResponse) Get() *ListRealTimeMetricsResponse { + return v.value +} + +func (v *NullableListRealTimeMetricsResponse) Set(val *ListRealTimeMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRealTimeMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRealTimeMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRealTimeMetricsResponse(val *ListRealTimeMetricsResponse) *NullableListRealTimeMetricsResponse { + return &NullableListRealTimeMetricsResponse{value: val, isSet: true} +} + +func (v NullableListRealTimeMetricsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRealTimeMetricsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_related_incidents_response.go b/model_list_related_incidents_response.go index a5ce0c1..fe21c93 100644 --- a/model_list_related_incidents_response.go +++ b/model_list_related_incidents_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListRelatedIncidentsResponse struct for ListRelatedIncidentsResponse type ListRelatedIncidentsResponse struct { - Data []Incident `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]Incident `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListRelatedIncidentsResponse instantiates a new ListRelatedIncidentsResponse 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 NewListRelatedIncidentsResponse() *ListRelatedIncidentsResponse { + this := ListRelatedIncidentsResponse{} + return &this +} + +// NewListRelatedIncidentsResponseWithDefaults instantiates a new ListRelatedIncidentsResponse 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 NewListRelatedIncidentsResponseWithDefaults() *ListRelatedIncidentsResponse { + this := ListRelatedIncidentsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListRelatedIncidentsResponse) GetData() []Incident { + if o == nil || o.Data == nil { + var ret []Incident + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRelatedIncidentsResponse) GetDataOk() (*[]Incident, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListRelatedIncidentsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Incident and assigns it to the Data field. +func (o *ListRelatedIncidentsResponse) SetData(v []Incident) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListRelatedIncidentsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRelatedIncidentsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListRelatedIncidentsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListRelatedIncidentsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListRelatedIncidentsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRelatedIncidentsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListRelatedIncidentsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListRelatedIncidentsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListRelatedIncidentsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListRelatedIncidentsResponse struct { + value *ListRelatedIncidentsResponse + isSet bool +} + +func (v NullableListRelatedIncidentsResponse) Get() *ListRelatedIncidentsResponse { + return v.value +} + +func (v *NullableListRelatedIncidentsResponse) Set(val *ListRelatedIncidentsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRelatedIncidentsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRelatedIncidentsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRelatedIncidentsResponse(val *ListRelatedIncidentsResponse) *NullableListRelatedIncidentsResponse { + return &NullableListRelatedIncidentsResponse{value: val, isSet: true} +} + +func (v NullableListRelatedIncidentsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRelatedIncidentsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_signing_keys_response.go b/model_list_signing_keys_response.go index bdd9ff7..8d5af0d 100644 --- a/model_list_signing_keys_response.go +++ b/model_list_signing_keys_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListSigningKeysResponse struct for ListSigningKeysResponse type ListSigningKeysResponse struct { - Data []SigningKey `json:"data,omitempty"` + Data *[]SigningKey `json:"data,omitempty"` +} + +// NewListSigningKeysResponse instantiates a new ListSigningKeysResponse 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 NewListSigningKeysResponse() *ListSigningKeysResponse { + this := ListSigningKeysResponse{} + return &this +} + +// NewListSigningKeysResponseWithDefaults instantiates a new ListSigningKeysResponse 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 NewListSigningKeysResponseWithDefaults() *ListSigningKeysResponse { + this := ListSigningKeysResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListSigningKeysResponse) GetData() []SigningKey { + if o == nil || o.Data == nil { + var ret []SigningKey + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListSigningKeysResponse) GetDataOk() (*[]SigningKey, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListSigningKeysResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []SigningKey and assigns it to the Data field. +func (o *ListSigningKeysResponse) SetData(v []SigningKey) { + o.Data = &v +} + +func (o ListSigningKeysResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableListSigningKeysResponse struct { + value *ListSigningKeysResponse + isSet bool +} + +func (v NullableListSigningKeysResponse) Get() *ListSigningKeysResponse { + return v.value +} + +func (v *NullableListSigningKeysResponse) Set(val *ListSigningKeysResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListSigningKeysResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListSigningKeysResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListSigningKeysResponse(val *ListSigningKeysResponse) *NullableListSigningKeysResponse { + return &NullableListSigningKeysResponse{value: val, isSet: true} +} + +func (v NullableListSigningKeysResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListSigningKeysResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_uploads_response.go b/model_list_uploads_response.go index f7a9727..4fd6094 100644 --- a/model_list_uploads_response.go +++ b/model_list_uploads_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListUploadsResponse struct for ListUploadsResponse type ListUploadsResponse struct { - Data []Upload `json:"data,omitempty"` + Data *[]Upload `json:"data,omitempty"` +} + +// NewListUploadsResponse instantiates a new ListUploadsResponse 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 NewListUploadsResponse() *ListUploadsResponse { + this := ListUploadsResponse{} + return &this +} + +// NewListUploadsResponseWithDefaults instantiates a new ListUploadsResponse 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 NewListUploadsResponseWithDefaults() *ListUploadsResponse { + this := ListUploadsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListUploadsResponse) GetData() []Upload { + if o == nil || o.Data == nil { + var ret []Upload + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUploadsResponse) GetDataOk() (*[]Upload, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListUploadsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Upload and assigns it to the Data field. +func (o *ListUploadsResponse) SetData(v []Upload) { + o.Data = &v +} + +func (o ListUploadsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableListUploadsResponse struct { + value *ListUploadsResponse + isSet bool +} + +func (v NullableListUploadsResponse) Get() *ListUploadsResponse { + return v.value +} + +func (v *NullableListUploadsResponse) Set(val *ListUploadsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUploadsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUploadsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUploadsResponse(val *ListUploadsResponse) *NullableListUploadsResponse { + return &NullableListUploadsResponse{value: val, isSet: true} +} + +func (v NullableListUploadsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUploadsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_video_views_response.go b/model_list_video_views_response.go index 0fc09f2..84db950 100644 --- a/model_list_video_views_response.go +++ b/model_list_video_views_response.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// ListVideoViewsResponse struct for ListVideoViewsResponse type ListVideoViewsResponse struct { - Data []AbridgedVideoView `json:"data,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *[]AbridgedVideoView `json:"data,omitempty"` + TotalRowCount *int64 `json:"total_row_count,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewListVideoViewsResponse instantiates a new ListVideoViewsResponse 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 NewListVideoViewsResponse() *ListVideoViewsResponse { + this := ListVideoViewsResponse{} + return &this +} + +// NewListVideoViewsResponseWithDefaults instantiates a new ListVideoViewsResponse 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 NewListVideoViewsResponseWithDefaults() *ListVideoViewsResponse { + this := ListVideoViewsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListVideoViewsResponse) GetData() []AbridgedVideoView { + if o == nil || o.Data == nil { + var ret []AbridgedVideoView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVideoViewsResponse) GetDataOk() (*[]AbridgedVideoView, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *ListVideoViewsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []AbridgedVideoView and assigns it to the Data field. +func (o *ListVideoViewsResponse) SetData(v []AbridgedVideoView) { + o.Data = &v +} + +// GetTotalRowCount returns the TotalRowCount field value if set, zero value otherwise. +func (o *ListVideoViewsResponse) GetTotalRowCount() int64 { + if o == nil || o.TotalRowCount == nil { + var ret int64 + return ret + } + return *o.TotalRowCount +} + +// GetTotalRowCountOk returns a tuple with the TotalRowCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVideoViewsResponse) GetTotalRowCountOk() (*int64, bool) { + if o == nil || o.TotalRowCount == nil { + return nil, false + } + return o.TotalRowCount, true +} + +// HasTotalRowCount returns a boolean if a field has been set. +func (o *ListVideoViewsResponse) HasTotalRowCount() bool { + if o != nil && o.TotalRowCount != nil { + return true + } + + return false +} + +// SetTotalRowCount gets a reference to the given int64 and assigns it to the TotalRowCount field. +func (o *ListVideoViewsResponse) SetTotalRowCount(v int64) { + o.TotalRowCount = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *ListVideoViewsResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVideoViewsResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *ListVideoViewsResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false +} + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *ListVideoViewsResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o ListVideoViewsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.TotalRowCount != nil { + toSerialize["total_row_count"] = o.TotalRowCount + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableListVideoViewsResponse struct { + value *ListVideoViewsResponse + isSet bool +} + +func (v NullableListVideoViewsResponse) Get() *ListVideoViewsResponse { + return v.value +} + +func (v *NullableListVideoViewsResponse) Set(val *ListVideoViewsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListVideoViewsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListVideoViewsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListVideoViewsResponse(val *ListVideoViewsResponse) *NullableListVideoViewsResponse { + return &NullableListVideoViewsResponse{value: val, isSet: true} +} + +func (v NullableListVideoViewsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListVideoViewsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_live_stream.go b/model_live_stream.go index c796c5e..2c80707 100644 --- a/model_live_stream.go +++ b/model_live_stream.go @@ -1,20 +1,563 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// LiveStream struct for LiveStream type LiveStream struct { - Id string `json:"id,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - StreamKey string `json:"stream_key,omitempty"` - ActiveAssetId string `json:"active_asset_id,omitempty"` - RecentAssetIds []string `json:"recent_asset_ids,omitempty"` - Status string `json:"status,omitempty"` - PlaybackIds []PlaybackId `json:"playback_ids,omitempty"` - NewAssetSettings CreateAssetRequest `json:"new_asset_settings,omitempty"` - Passthrough string `json:"passthrough,omitempty"` - ReconnectWindow float32 `json:"reconnect_window,omitempty"` - ReducedLatency bool `json:"reduced_latency,omitempty"` - SimulcastTargets []SimulcastTarget `json:"simulcast_targets,omitempty"` - Test bool `json:"test,omitempty"` + // Unique identifier for the Live Stream. Max 255 characters. + Id *string `json:"id,omitempty"` + // Time the Live Stream was created, defined as a Unix timestamp (seconds since epoch). + CreatedAt *string `json:"created_at,omitempty"` + // Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. + StreamKey *string `json:"stream_key,omitempty"` + // The Asset that is currently being created if there is an active broadcast. + ActiveAssetId *string `json:"active_asset_id,omitempty"` + // An array of strings with the most recent Assets that were created from this live stream. + RecentAssetIds *[]string `json:"recent_asset_ids,omitempty"` + // `idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published. + Status *string `json:"status,omitempty"` + // An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/video/play-your-videos) for more details. + PlaybackIds *[]PlaybackID `json:"playback_ids,omitempty"` + NewAssetSettings *CreateAssetRequest `json:"new_asset_settings,omitempty"` + // Arbitrary metadata set for the asset. Max 255 characters. + Passthrough *string `json:"passthrough,omitempty"` + // When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. **Min**: 0.1s. **Max**: 300s (5 minutes). + ReconnectWindow *float32 `json:"reconnect_window,omitempty"` + // Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. + ReducedLatency *bool `json:"reduced_latency,omitempty"` + // Each Simulcast Target contains configuration details to broadcast (or \"restream\") a live stream to a third-party streaming service. [See the Stream live to 3rd party platforms guide](https://docs.mux.com/guides/video/stream-live-to-3rd-party-platforms). + SimulcastTargets *[]SimulcastTarget `json:"simulcast_targets,omitempty"` + // True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. + Test *bool `json:"test,omitempty"` +} + +// NewLiveStream instantiates a new LiveStream 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 NewLiveStream() *LiveStream { + this := LiveStream{} + var reconnectWindow float32 = 60 + this.ReconnectWindow = &reconnectWindow + return &this +} + +// NewLiveStreamWithDefaults instantiates a new LiveStream 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 NewLiveStreamWithDefaults() *LiveStream { + this := LiveStream{} + var reconnectWindow float32 = 60 + this.ReconnectWindow = &reconnectWindow + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LiveStream) GetId() string { + if o == nil || o.Id == nil { + 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 *LiveStream) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LiveStream) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LiveStream) SetId(v string) { + o.Id = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *LiveStream) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *LiveStream) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *LiveStream) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetStreamKey returns the StreamKey field value if set, zero value otherwise. +func (o *LiveStream) GetStreamKey() string { + if o == nil || o.StreamKey == nil { + var ret string + return ret + } + return *o.StreamKey +} + +// GetStreamKeyOk returns a tuple with the StreamKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetStreamKeyOk() (*string, bool) { + if o == nil || o.StreamKey == nil { + return nil, false + } + return o.StreamKey, true +} + +// HasStreamKey returns a boolean if a field has been set. +func (o *LiveStream) HasStreamKey() bool { + if o != nil && o.StreamKey != nil { + return true + } + + return false +} + +// SetStreamKey gets a reference to the given string and assigns it to the StreamKey field. +func (o *LiveStream) SetStreamKey(v string) { + o.StreamKey = &v +} + +// GetActiveAssetId returns the ActiveAssetId field value if set, zero value otherwise. +func (o *LiveStream) GetActiveAssetId() string { + if o == nil || o.ActiveAssetId == nil { + var ret string + return ret + } + return *o.ActiveAssetId +} + +// GetActiveAssetIdOk returns a tuple with the ActiveAssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetActiveAssetIdOk() (*string, bool) { + if o == nil || o.ActiveAssetId == nil { + return nil, false + } + return o.ActiveAssetId, true +} + +// HasActiveAssetId returns a boolean if a field has been set. +func (o *LiveStream) HasActiveAssetId() bool { + if o != nil && o.ActiveAssetId != nil { + return true + } + + return false +} + +// SetActiveAssetId gets a reference to the given string and assigns it to the ActiveAssetId field. +func (o *LiveStream) SetActiveAssetId(v string) { + o.ActiveAssetId = &v +} + +// GetRecentAssetIds returns the RecentAssetIds field value if set, zero value otherwise. +func (o *LiveStream) GetRecentAssetIds() []string { + if o == nil || o.RecentAssetIds == nil { + var ret []string + return ret + } + return *o.RecentAssetIds +} + +// GetRecentAssetIdsOk returns a tuple with the RecentAssetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetRecentAssetIdsOk() (*[]string, bool) { + if o == nil || o.RecentAssetIds == nil { + return nil, false + } + return o.RecentAssetIds, true +} + +// HasRecentAssetIds returns a boolean if a field has been set. +func (o *LiveStream) HasRecentAssetIds() bool { + if o != nil && o.RecentAssetIds != nil { + return true + } + + return false +} + +// SetRecentAssetIds gets a reference to the given []string and assigns it to the RecentAssetIds field. +func (o *LiveStream) SetRecentAssetIds(v []string) { + o.RecentAssetIds = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LiveStream) GetStatus() string { + if o == nil || o.Status == nil { + 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 *LiveStream) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *LiveStream) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *LiveStream) SetStatus(v string) { + o.Status = &v +} + +// GetPlaybackIds returns the PlaybackIds field value if set, zero value otherwise. +func (o *LiveStream) GetPlaybackIds() []PlaybackID { + if o == nil || o.PlaybackIds == nil { + var ret []PlaybackID + return ret + } + return *o.PlaybackIds +} + +// GetPlaybackIdsOk returns a tuple with the PlaybackIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetPlaybackIdsOk() (*[]PlaybackID, bool) { + if o == nil || o.PlaybackIds == nil { + return nil, false + } + return o.PlaybackIds, true } + +// HasPlaybackIds returns a boolean if a field has been set. +func (o *LiveStream) HasPlaybackIds() bool { + if o != nil && o.PlaybackIds != nil { + return true + } + + return false +} + +// SetPlaybackIds gets a reference to the given []PlaybackID and assigns it to the PlaybackIds field. +func (o *LiveStream) SetPlaybackIds(v []PlaybackID) { + o.PlaybackIds = &v +} + +// GetNewAssetSettings returns the NewAssetSettings field value if set, zero value otherwise. +func (o *LiveStream) GetNewAssetSettings() CreateAssetRequest { + if o == nil || o.NewAssetSettings == nil { + var ret CreateAssetRequest + return ret + } + return *o.NewAssetSettings +} + +// GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetNewAssetSettingsOk() (*CreateAssetRequest, bool) { + if o == nil || o.NewAssetSettings == nil { + return nil, false + } + return o.NewAssetSettings, true +} + +// HasNewAssetSettings returns a boolean if a field has been set. +func (o *LiveStream) HasNewAssetSettings() bool { + if o != nil && o.NewAssetSettings != nil { + return true + } + + return false +} + +// SetNewAssetSettings gets a reference to the given CreateAssetRequest and assigns it to the NewAssetSettings field. +func (o *LiveStream) SetNewAssetSettings(v CreateAssetRequest) { + o.NewAssetSettings = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *LiveStream) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *LiveStream) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *LiveStream) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetReconnectWindow returns the ReconnectWindow field value if set, zero value otherwise. +func (o *LiveStream) GetReconnectWindow() float32 { + if o == nil || o.ReconnectWindow == nil { + var ret float32 + return ret + } + return *o.ReconnectWindow +} + +// GetReconnectWindowOk returns a tuple with the ReconnectWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetReconnectWindowOk() (*float32, bool) { + if o == nil || o.ReconnectWindow == nil { + return nil, false + } + return o.ReconnectWindow, true +} + +// HasReconnectWindow returns a boolean if a field has been set. +func (o *LiveStream) HasReconnectWindow() bool { + if o != nil && o.ReconnectWindow != nil { + return true + } + + return false +} + +// SetReconnectWindow gets a reference to the given float32 and assigns it to the ReconnectWindow field. +func (o *LiveStream) SetReconnectWindow(v float32) { + o.ReconnectWindow = &v +} + +// GetReducedLatency returns the ReducedLatency field value if set, zero value otherwise. +func (o *LiveStream) GetReducedLatency() bool { + if o == nil || o.ReducedLatency == nil { + var ret bool + return ret + } + return *o.ReducedLatency +} + +// GetReducedLatencyOk returns a tuple with the ReducedLatency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetReducedLatencyOk() (*bool, bool) { + if o == nil || o.ReducedLatency == nil { + return nil, false + } + return o.ReducedLatency, true +} + +// HasReducedLatency returns a boolean if a field has been set. +func (o *LiveStream) HasReducedLatency() bool { + if o != nil && o.ReducedLatency != nil { + return true + } + + return false +} + +// SetReducedLatency gets a reference to the given bool and assigns it to the ReducedLatency field. +func (o *LiveStream) SetReducedLatency(v bool) { + o.ReducedLatency = &v +} + +// GetSimulcastTargets returns the SimulcastTargets field value if set, zero value otherwise. +func (o *LiveStream) GetSimulcastTargets() []SimulcastTarget { + if o == nil || o.SimulcastTargets == nil { + var ret []SimulcastTarget + return ret + } + return *o.SimulcastTargets +} + +// GetSimulcastTargetsOk returns a tuple with the SimulcastTargets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetSimulcastTargetsOk() (*[]SimulcastTarget, bool) { + if o == nil || o.SimulcastTargets == nil { + return nil, false + } + return o.SimulcastTargets, true +} + +// HasSimulcastTargets returns a boolean if a field has been set. +func (o *LiveStream) HasSimulcastTargets() bool { + if o != nil && o.SimulcastTargets != nil { + return true + } + + return false +} + +// SetSimulcastTargets gets a reference to the given []SimulcastTarget and assigns it to the SimulcastTargets field. +func (o *LiveStream) SetSimulcastTargets(v []SimulcastTarget) { + o.SimulcastTargets = &v +} + +// GetTest returns the Test field value if set, zero value otherwise. +func (o *LiveStream) GetTest() bool { + if o == nil || o.Test == nil { + var ret bool + return ret + } + return *o.Test +} + +// GetTestOk returns a tuple with the Test field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStream) GetTestOk() (*bool, bool) { + if o == nil || o.Test == nil { + return nil, false + } + return o.Test, true +} + +// HasTest returns a boolean if a field has been set. +func (o *LiveStream) HasTest() bool { + if o != nil && o.Test != nil { + return true + } + + return false +} + +// SetTest gets a reference to the given bool and assigns it to the Test field. +func (o *LiveStream) SetTest(v bool) { + o.Test = &v +} + +func (o LiveStream) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.StreamKey != nil { + toSerialize["stream_key"] = o.StreamKey + } + if o.ActiveAssetId != nil { + toSerialize["active_asset_id"] = o.ActiveAssetId + } + if o.RecentAssetIds != nil { + toSerialize["recent_asset_ids"] = o.RecentAssetIds + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.PlaybackIds != nil { + toSerialize["playback_ids"] = o.PlaybackIds + } + if o.NewAssetSettings != nil { + toSerialize["new_asset_settings"] = o.NewAssetSettings + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.ReconnectWindow != nil { + toSerialize["reconnect_window"] = o.ReconnectWindow + } + if o.ReducedLatency != nil { + toSerialize["reduced_latency"] = o.ReducedLatency + } + if o.SimulcastTargets != nil { + toSerialize["simulcast_targets"] = o.SimulcastTargets + } + if o.Test != nil { + toSerialize["test"] = o.Test + } + return json.Marshal(toSerialize) +} + +type NullableLiveStream struct { + value *LiveStream + isSet bool +} + +func (v NullableLiveStream) Get() *LiveStream { + return v.value +} + +func (v *NullableLiveStream) Set(val *LiveStream) { + v.value = val + v.isSet = true +} + +func (v NullableLiveStream) IsSet() bool { + return v.isSet +} + +func (v *NullableLiveStream) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLiveStream(val *LiveStream) *NullableLiveStream { + return &NullableLiveStream{value: val, isSet: true} +} + +func (v NullableLiveStream) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLiveStream) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_live_stream_response.go b/model_live_stream_response.go index 657ea46..3dcc81d 100644 --- a/model_live_stream_response.go +++ b/model_live_stream_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// LiveStreamResponse struct for LiveStreamResponse type LiveStreamResponse struct { - Data LiveStream `json:"data,omitempty"` + Data *LiveStream `json:"data,omitempty"` +} + +// NewLiveStreamResponse instantiates a new LiveStreamResponse 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 NewLiveStreamResponse() *LiveStreamResponse { + this := LiveStreamResponse{} + return &this +} + +// NewLiveStreamResponseWithDefaults instantiates a new LiveStreamResponse 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 NewLiveStreamResponseWithDefaults() *LiveStreamResponse { + this := LiveStreamResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LiveStreamResponse) GetData() LiveStream { + if o == nil || o.Data == nil { + var ret LiveStream + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LiveStreamResponse) GetDataOk() (*LiveStream, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *LiveStreamResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given LiveStream and assigns it to the Data field. +func (o *LiveStreamResponse) SetData(v LiveStream) { + o.Data = &v +} + +func (o LiveStreamResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableLiveStreamResponse struct { + value *LiveStreamResponse + isSet bool +} + +func (v NullableLiveStreamResponse) Get() *LiveStreamResponse { + return v.value +} + +func (v *NullableLiveStreamResponse) Set(val *LiveStreamResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLiveStreamResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLiveStreamResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLiveStreamResponse(val *LiveStreamResponse) *NullableLiveStreamResponse { + return &NullableLiveStreamResponse{value: val, isSet: true} +} + +func (v NullableLiveStreamResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLiveStreamResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_metric.go b/model_metric.go index 7ae2365..1928f97 100644 --- a/model_metric.go +++ b/model_metric.go @@ -1,12 +1,259 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Metric struct for Metric type Metric struct { - Value float64 `json:"value,omitempty"` - Type string `json:"type,omitempty"` - Name string `json:"name,omitempty"` - Metric string `json:"metric,omitempty"` - Measurement string `json:"measurement,omitempty"` + Value *float64 `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Metric *string `json:"metric,omitempty"` + Measurement *string `json:"measurement,omitempty"` +} + +// NewMetric instantiates a new Metric 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 NewMetric() *Metric { + this := Metric{} + return &this +} + +// NewMetricWithDefaults instantiates a new Metric 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 NewMetricWithDefaults() *Metric { + this := Metric{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Metric) GetValue() float64 { + if o == nil || o.Value == nil { + var ret float64 + 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. +func (o *Metric) GetValueOk() (*float64, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Metric) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *Metric) SetValue(v float64) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Metric) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metric) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Metric) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Metric) SetType(v string) { + o.Type = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Metric) GetName() string { + if o == nil || o.Name == nil { + 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 *Metric) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true } + +// HasName returns a boolean if a field has been set. +func (o *Metric) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Metric) SetName(v string) { + o.Name = &v +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *Metric) GetMetric() string { + if o == nil || o.Metric == nil { + var ret string + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metric) GetMetricOk() (*string, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *Metric) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *Metric) SetMetric(v string) { + o.Metric = &v +} + +// GetMeasurement returns the Measurement field value if set, zero value otherwise. +func (o *Metric) GetMeasurement() string { + if o == nil || o.Measurement == nil { + var ret string + return ret + } + return *o.Measurement +} + +// GetMeasurementOk returns a tuple with the Measurement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Metric) GetMeasurementOk() (*string, bool) { + if o == nil || o.Measurement == nil { + return nil, false + } + return o.Measurement, true +} + +// HasMeasurement returns a boolean if a field has been set. +func (o *Metric) HasMeasurement() bool { + if o != nil && o.Measurement != nil { + return true + } + + return false +} + +// SetMeasurement gets a reference to the given string and assigns it to the Measurement field. +func (o *Metric) SetMeasurement(v string) { + o.Measurement = &v +} + +func (o Metric) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Metric != nil { + toSerialize["metric"] = o.Metric + } + if o.Measurement != nil { + toSerialize["measurement"] = o.Measurement + } + return json.Marshal(toSerialize) +} + +type NullableMetric struct { + value *Metric + isSet bool +} + +func (v NullableMetric) Get() *Metric { + return v.value +} + +func (v *NullableMetric) Set(val *Metric) { + v.value = val + v.isSet = true +} + +func (v NullableMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetric(val *Metric) *NullableMetric { + return &NullableMetric{value: val, isSet: true} +} + +func (v NullableMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_notification_rule.go b/model_notification_rule.go index cd986d8..2cd5e05 100644 --- a/model_notification_rule.go +++ b/model_notification_rule.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// NotificationRule struct for NotificationRule type NotificationRule struct { - Value string `json:"value,omitempty"` - Name string `json:"name,omitempty"` - Id string `json:"id,omitempty"` + Value *string `json:"value,omitempty"` + Name *string `json:"name,omitempty"` + Id *string `json:"id,omitempty"` +} + +// NewNotificationRule instantiates a new NotificationRule 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 NewNotificationRule() *NotificationRule { + this := NotificationRule{} + return &this +} + +// NewNotificationRuleWithDefaults instantiates a new NotificationRule 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 NewNotificationRuleWithDefaults() *NotificationRule { + this := NotificationRule{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *NotificationRule) GetValue() string { + if o == nil || o.Value == nil { + var ret string + 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. +func (o *NotificationRule) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true } + +// HasValue returns a boolean if a field has been set. +func (o *NotificationRule) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *NotificationRule) SetValue(v string) { + o.Value = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NotificationRule) GetName() string { + if o == nil || o.Name == nil { + 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 *NotificationRule) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NotificationRule) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NotificationRule) SetName(v string) { + o.Name = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NotificationRule) GetId() string { + if o == nil || o.Id == nil { + 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 *NotificationRule) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NotificationRule) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *NotificationRule) SetId(v string) { + o.Id = &v +} + +func (o NotificationRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableNotificationRule struct { + value *NotificationRule + isSet bool +} + +func (v NullableNotificationRule) Get() *NotificationRule { + return v.value +} + +func (v *NullableNotificationRule) Set(val *NotificationRule) { + v.value = val + v.isSet = true +} + +func (v NullableNotificationRule) IsSet() bool { + return v.isSet +} + +func (v *NullableNotificationRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotificationRule(val *NotificationRule) *NullableNotificationRule { + return &NullableNotificationRule{value: val, isSet: true} +} + +func (v NullableNotificationRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotificationRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_overall_values.go b/model_overall_values.go index 8299d08..779a7ff 100644 --- a/model_overall_values.go +++ b/model_overall_values.go @@ -1,11 +1,223 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// OverallValues struct for OverallValues type OverallValues struct { - Value float64 `json:"value,omitempty"` - TotalWatchTime int64 `json:"total_watch_time,omitempty"` - TotalViews int64 `json:"total_views,omitempty"` - GlobalValue float64 `json:"global_value,omitempty"` + Value *float64 `json:"value,omitempty"` + TotalWatchTime *int64 `json:"total_watch_time,omitempty"` + TotalViews *int64 `json:"total_views,omitempty"` + GlobalValue *float64 `json:"global_value,omitempty"` +} + +// NewOverallValues instantiates a new OverallValues 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 NewOverallValues() *OverallValues { + this := OverallValues{} + return &this +} + +// NewOverallValuesWithDefaults instantiates a new OverallValues 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 NewOverallValuesWithDefaults() *OverallValues { + this := OverallValues{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *OverallValues) GetValue() float64 { + if o == nil || o.Value == nil { + var ret float64 + 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. +func (o *OverallValues) GetValueOk() (*float64, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *OverallValues) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *OverallValues) SetValue(v float64) { + o.Value = &v +} + +// GetTotalWatchTime returns the TotalWatchTime field value if set, zero value otherwise. +func (o *OverallValues) GetTotalWatchTime() int64 { + if o == nil || o.TotalWatchTime == nil { + var ret int64 + return ret + } + return *o.TotalWatchTime +} + +// GetTotalWatchTimeOk returns a tuple with the TotalWatchTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverallValues) GetTotalWatchTimeOk() (*int64, bool) { + if o == nil || o.TotalWatchTime == nil { + return nil, false + } + return o.TotalWatchTime, true +} + +// HasTotalWatchTime returns a boolean if a field has been set. +func (o *OverallValues) HasTotalWatchTime() bool { + if o != nil && o.TotalWatchTime != nil { + return true + } + + return false +} + +// SetTotalWatchTime gets a reference to the given int64 and assigns it to the TotalWatchTime field. +func (o *OverallValues) SetTotalWatchTime(v int64) { + o.TotalWatchTime = &v +} + +// GetTotalViews returns the TotalViews field value if set, zero value otherwise. +func (o *OverallValues) GetTotalViews() int64 { + if o == nil || o.TotalViews == nil { + var ret int64 + return ret + } + return *o.TotalViews +} + +// GetTotalViewsOk returns a tuple with the TotalViews field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverallValues) GetTotalViewsOk() (*int64, bool) { + if o == nil || o.TotalViews == nil { + return nil, false + } + return o.TotalViews, true +} + +// HasTotalViews returns a boolean if a field has been set. +func (o *OverallValues) HasTotalViews() bool { + if o != nil && o.TotalViews != nil { + return true + } + + return false } + +// SetTotalViews gets a reference to the given int64 and assigns it to the TotalViews field. +func (o *OverallValues) SetTotalViews(v int64) { + o.TotalViews = &v +} + +// GetGlobalValue returns the GlobalValue field value if set, zero value otherwise. +func (o *OverallValues) GetGlobalValue() float64 { + if o == nil || o.GlobalValue == nil { + var ret float64 + return ret + } + return *o.GlobalValue +} + +// GetGlobalValueOk returns a tuple with the GlobalValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OverallValues) GetGlobalValueOk() (*float64, bool) { + if o == nil || o.GlobalValue == nil { + return nil, false + } + return o.GlobalValue, true +} + +// HasGlobalValue returns a boolean if a field has been set. +func (o *OverallValues) HasGlobalValue() bool { + if o != nil && o.GlobalValue != nil { + return true + } + + return false +} + +// SetGlobalValue gets a reference to the given float64 and assigns it to the GlobalValue field. +func (o *OverallValues) SetGlobalValue(v float64) { + o.GlobalValue = &v +} + +func (o OverallValues) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.TotalWatchTime != nil { + toSerialize["total_watch_time"] = o.TotalWatchTime + } + if o.TotalViews != nil { + toSerialize["total_views"] = o.TotalViews + } + if o.GlobalValue != nil { + toSerialize["global_value"] = o.GlobalValue + } + return json.Marshal(toSerialize) +} + +type NullableOverallValues struct { + value *OverallValues + isSet bool +} + +func (v NullableOverallValues) Get() *OverallValues { + return v.value +} + +func (v *NullableOverallValues) Set(val *OverallValues) { + v.value = val + v.isSet = true +} + +func (v NullableOverallValues) IsSet() bool { + return v.isSet +} + +func (v *NullableOverallValues) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOverallValues(val *OverallValues) *NullableOverallValues { + return &NullableOverallValues{value: val, isSet: true} +} + +func (v NullableOverallValues) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOverallValues) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_playback_id.go b/model_playback_id.go index 8799ac1..31a48fa 100644 --- a/model_playback_id.go +++ b/model_playback_id.go @@ -1,10 +1,152 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -type PlaybackId struct { +import ( + "encoding/json" +) + +// PlaybackID struct for PlaybackID +type PlaybackID struct { // Unique identifier for the PlaybackID - Id string `json:"id,omitempty"` - Policy PlaybackPolicy `json:"policy,omitempty"` + Id *string `json:"id,omitempty"` + Policy *PlaybackPolicy `json:"policy,omitempty"` +} + +// NewPlaybackID instantiates a new PlaybackID 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 NewPlaybackID() *PlaybackID { + this := PlaybackID{} + return &this +} + +// NewPlaybackIDWithDefaults instantiates a new PlaybackID 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 NewPlaybackIDWithDefaults() *PlaybackID { + this := PlaybackID{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PlaybackID) GetId() string { + if o == nil || o.Id == nil { + 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 *PlaybackID) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PlaybackID) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PlaybackID) SetId(v string) { + o.Id = &v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PlaybackID) GetPolicy() PlaybackPolicy { + if o == nil || o.Policy == nil { + var ret PlaybackPolicy + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlaybackID) GetPolicyOk() (*PlaybackPolicy, bool) { + if o == nil || o.Policy == nil { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PlaybackID) HasPolicy() bool { + if o != nil && o.Policy != nil { + return true + } + + return false } + +// SetPolicy gets a reference to the given PlaybackPolicy and assigns it to the Policy field. +func (o *PlaybackID) SetPolicy(v PlaybackPolicy) { + o.Policy = &v +} + +func (o PlaybackID) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Policy != nil { + toSerialize["policy"] = o.Policy + } + return json.Marshal(toSerialize) +} + +type NullablePlaybackID struct { + value *PlaybackID + isSet bool +} + +func (v NullablePlaybackID) Get() *PlaybackID { + return v.value +} + +func (v *NullablePlaybackID) Set(val *PlaybackID) { + v.value = val + v.isSet = true +} + +func (v NullablePlaybackID) IsSet() bool { + return v.isSet +} + +func (v *NullablePlaybackID) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlaybackID(val *PlaybackID) *NullablePlaybackID { + return &NullablePlaybackID{value: val, isSet: true} +} + +func (v NullablePlaybackID) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlaybackID) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_playback_policy.go b/model_playback_policy.go index 1b0804c..4e89545 100644 --- a/model_playback_policy.go +++ b/model_playback_policy.go @@ -1,8 +1,21 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" + "fmt" +) + +// PlaybackPolicy * `public` playback IDs are accessible by constructing an HLS url like `https://stream.mux.com/${PLAYBACK_ID}` * `signed` playback IDS should be used with tokens `https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}`. See [Secure video playback](https://docs.mux.com/guides/video/secure-video-playback) for details about creating tokens. type PlaybackPolicy string // List of PlaybackPolicy @@ -10,3 +23,62 @@ const ( PUBLIC PlaybackPolicy = "public" SIGNED PlaybackPolicy = "signed" ) + +func (v *PlaybackPolicy) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := PlaybackPolicy(value) + for _, existing := range []PlaybackPolicy{ "public", "signed", } { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PlaybackPolicy", value) +} + +// Ptr returns reference to PlaybackPolicy value +func (v PlaybackPolicy) Ptr() *PlaybackPolicy { + return &v +} + +type NullablePlaybackPolicy struct { + value *PlaybackPolicy + isSet bool +} + +func (v NullablePlaybackPolicy) Get() *PlaybackPolicy { + return v.value +} + +func (v *NullablePlaybackPolicy) Set(val *PlaybackPolicy) { + v.value = val + v.isSet = true +} + +func (v NullablePlaybackPolicy) IsSet() bool { + return v.isSet +} + +func (v *NullablePlaybackPolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlaybackPolicy(val *PlaybackPolicy) *NullablePlaybackPolicy { + return &NullablePlaybackPolicy{value: val, isSet: true} +} + +func (v NullablePlaybackPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlaybackPolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_real_time_breakdown_value.go b/model_real_time_breakdown_value.go index 51885cc..99728be 100644 --- a/model_real_time_breakdown_value.go +++ b/model_real_time_breakdown_value.go @@ -1,12 +1,259 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// RealTimeBreakdownValue struct for RealTimeBreakdownValue type RealTimeBreakdownValue struct { - Value string `json:"value,omitempty"` - NegativeImpact int64 `json:"negative_impact,omitempty"` - MetricValue float64 `json:"metric_value,omitempty"` - DisplayValue string `json:"display_value,omitempty"` - ConcurentViewers int64 `json:"concurent_viewers,omitempty"` + Value *string `json:"value,omitempty"` + NegativeImpact *int64 `json:"negative_impact,omitempty"` + MetricValue *float64 `json:"metric_value,omitempty"` + DisplayValue *string `json:"display_value,omitempty"` + ConcurentViewers *int64 `json:"concurent_viewers,omitempty"` +} + +// NewRealTimeBreakdownValue instantiates a new RealTimeBreakdownValue 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 NewRealTimeBreakdownValue() *RealTimeBreakdownValue { + this := RealTimeBreakdownValue{} + return &this +} + +// NewRealTimeBreakdownValueWithDefaults instantiates a new RealTimeBreakdownValue 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 NewRealTimeBreakdownValueWithDefaults() *RealTimeBreakdownValue { + this := RealTimeBreakdownValue{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *RealTimeBreakdownValue) GetValue() string { + if o == nil || o.Value == nil { + var ret string + 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. +func (o *RealTimeBreakdownValue) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *RealTimeBreakdownValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *RealTimeBreakdownValue) SetValue(v string) { + o.Value = &v +} + +// GetNegativeImpact returns the NegativeImpact field value if set, zero value otherwise. +func (o *RealTimeBreakdownValue) GetNegativeImpact() int64 { + if o == nil || o.NegativeImpact == nil { + var ret int64 + return ret + } + return *o.NegativeImpact +} + +// GetNegativeImpactOk returns a tuple with the NegativeImpact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeBreakdownValue) GetNegativeImpactOk() (*int64, bool) { + if o == nil || o.NegativeImpact == nil { + return nil, false + } + return o.NegativeImpact, true +} + +// HasNegativeImpact returns a boolean if a field has been set. +func (o *RealTimeBreakdownValue) HasNegativeImpact() bool { + if o != nil && o.NegativeImpact != nil { + return true + } + + return false +} + +// SetNegativeImpact gets a reference to the given int64 and assigns it to the NegativeImpact field. +func (o *RealTimeBreakdownValue) SetNegativeImpact(v int64) { + o.NegativeImpact = &v +} + +// GetMetricValue returns the MetricValue field value if set, zero value otherwise. +func (o *RealTimeBreakdownValue) GetMetricValue() float64 { + if o == nil || o.MetricValue == nil { + var ret float64 + return ret + } + return *o.MetricValue +} + +// GetMetricValueOk returns a tuple with the MetricValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeBreakdownValue) GetMetricValueOk() (*float64, bool) { + if o == nil || o.MetricValue == nil { + return nil, false + } + return o.MetricValue, true } + +// HasMetricValue returns a boolean if a field has been set. +func (o *RealTimeBreakdownValue) HasMetricValue() bool { + if o != nil && o.MetricValue != nil { + return true + } + + return false +} + +// SetMetricValue gets a reference to the given float64 and assigns it to the MetricValue field. +func (o *RealTimeBreakdownValue) SetMetricValue(v float64) { + o.MetricValue = &v +} + +// GetDisplayValue returns the DisplayValue field value if set, zero value otherwise. +func (o *RealTimeBreakdownValue) GetDisplayValue() string { + if o == nil || o.DisplayValue == nil { + var ret string + return ret + } + return *o.DisplayValue +} + +// GetDisplayValueOk returns a tuple with the DisplayValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeBreakdownValue) GetDisplayValueOk() (*string, bool) { + if o == nil || o.DisplayValue == nil { + return nil, false + } + return o.DisplayValue, true +} + +// HasDisplayValue returns a boolean if a field has been set. +func (o *RealTimeBreakdownValue) HasDisplayValue() bool { + if o != nil && o.DisplayValue != nil { + return true + } + + return false +} + +// SetDisplayValue gets a reference to the given string and assigns it to the DisplayValue field. +func (o *RealTimeBreakdownValue) SetDisplayValue(v string) { + o.DisplayValue = &v +} + +// GetConcurentViewers returns the ConcurentViewers field value if set, zero value otherwise. +func (o *RealTimeBreakdownValue) GetConcurentViewers() int64 { + if o == nil || o.ConcurentViewers == nil { + var ret int64 + return ret + } + return *o.ConcurentViewers +} + +// GetConcurentViewersOk returns a tuple with the ConcurentViewers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeBreakdownValue) GetConcurentViewersOk() (*int64, bool) { + if o == nil || o.ConcurentViewers == nil { + return nil, false + } + return o.ConcurentViewers, true +} + +// HasConcurentViewers returns a boolean if a field has been set. +func (o *RealTimeBreakdownValue) HasConcurentViewers() bool { + if o != nil && o.ConcurentViewers != nil { + return true + } + + return false +} + +// SetConcurentViewers gets a reference to the given int64 and assigns it to the ConcurentViewers field. +func (o *RealTimeBreakdownValue) SetConcurentViewers(v int64) { + o.ConcurentViewers = &v +} + +func (o RealTimeBreakdownValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.NegativeImpact != nil { + toSerialize["negative_impact"] = o.NegativeImpact + } + if o.MetricValue != nil { + toSerialize["metric_value"] = o.MetricValue + } + if o.DisplayValue != nil { + toSerialize["display_value"] = o.DisplayValue + } + if o.ConcurentViewers != nil { + toSerialize["concurent_viewers"] = o.ConcurentViewers + } + return json.Marshal(toSerialize) +} + +type NullableRealTimeBreakdownValue struct { + value *RealTimeBreakdownValue + isSet bool +} + +func (v NullableRealTimeBreakdownValue) Get() *RealTimeBreakdownValue { + return v.value +} + +func (v *NullableRealTimeBreakdownValue) Set(val *RealTimeBreakdownValue) { + v.value = val + v.isSet = true +} + +func (v NullableRealTimeBreakdownValue) IsSet() bool { + return v.isSet +} + +func (v *NullableRealTimeBreakdownValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRealTimeBreakdownValue(val *RealTimeBreakdownValue) *NullableRealTimeBreakdownValue { + return &NullableRealTimeBreakdownValue{value: val, isSet: true} +} + +func (v NullableRealTimeBreakdownValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRealTimeBreakdownValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_real_time_histogram_timeseries_bucket.go b/model_real_time_histogram_timeseries_bucket.go index f3354c3..0af37d0 100644 --- a/model_real_time_histogram_timeseries_bucket.go +++ b/model_real_time_histogram_timeseries_bucket.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// RealTimeHistogramTimeseriesBucket struct for RealTimeHistogramTimeseriesBucket type RealTimeHistogramTimeseriesBucket struct { - Start int64 `json:"start,omitempty"` - End int64 `json:"end,omitempty"` + Start *int64 `json:"start,omitempty"` + End *int64 `json:"end,omitempty"` +} + +// NewRealTimeHistogramTimeseriesBucket instantiates a new RealTimeHistogramTimeseriesBucket 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 NewRealTimeHistogramTimeseriesBucket() *RealTimeHistogramTimeseriesBucket { + this := RealTimeHistogramTimeseriesBucket{} + return &this +} + +// NewRealTimeHistogramTimeseriesBucketWithDefaults instantiates a new RealTimeHistogramTimeseriesBucket 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 NewRealTimeHistogramTimeseriesBucketWithDefaults() *RealTimeHistogramTimeseriesBucket { + this := RealTimeHistogramTimeseriesBucket{} + return &this +} + +// GetStart returns the Start field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesBucket) GetStart() int64 { + if o == nil || o.Start == nil { + var ret int64 + return ret + } + return *o.Start +} + +// GetStartOk returns a tuple with the Start field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesBucket) GetStartOk() (*int64, bool) { + if o == nil || o.Start == nil { + return nil, false + } + return o.Start, true +} + +// HasStart returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesBucket) HasStart() bool { + if o != nil && o.Start != nil { + return true + } + + return false +} + +// SetStart gets a reference to the given int64 and assigns it to the Start field. +func (o *RealTimeHistogramTimeseriesBucket) SetStart(v int64) { + o.Start = &v +} + +// GetEnd returns the End field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesBucket) GetEnd() int64 { + if o == nil || o.End == nil { + var ret int64 + return ret + } + return *o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesBucket) GetEndOk() (*int64, bool) { + if o == nil || o.End == nil { + return nil, false + } + return o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesBucket) HasEnd() bool { + if o != nil && o.End != nil { + return true + } + + return false } + +// SetEnd gets a reference to the given int64 and assigns it to the End field. +func (o *RealTimeHistogramTimeseriesBucket) SetEnd(v int64) { + o.End = &v +} + +func (o RealTimeHistogramTimeseriesBucket) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Start != nil { + toSerialize["start"] = o.Start + } + if o.End != nil { + toSerialize["end"] = o.End + } + return json.Marshal(toSerialize) +} + +type NullableRealTimeHistogramTimeseriesBucket struct { + value *RealTimeHistogramTimeseriesBucket + isSet bool +} + +func (v NullableRealTimeHistogramTimeseriesBucket) Get() *RealTimeHistogramTimeseriesBucket { + return v.value +} + +func (v *NullableRealTimeHistogramTimeseriesBucket) Set(val *RealTimeHistogramTimeseriesBucket) { + v.value = val + v.isSet = true +} + +func (v NullableRealTimeHistogramTimeseriesBucket) IsSet() bool { + return v.isSet +} + +func (v *NullableRealTimeHistogramTimeseriesBucket) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRealTimeHistogramTimeseriesBucket(val *RealTimeHistogramTimeseriesBucket) *NullableRealTimeHistogramTimeseriesBucket { + return &NullableRealTimeHistogramTimeseriesBucket{value: val, isSet: true} +} + +func (v NullableRealTimeHistogramTimeseriesBucket) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRealTimeHistogramTimeseriesBucket) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_real_time_histogram_timeseries_bucket_values.go b/model_real_time_histogram_timeseries_bucket_values.go index 735ee68..df03ae0 100644 --- a/model_real_time_histogram_timeseries_bucket_values.go +++ b/model_real_time_histogram_timeseries_bucket_values.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// RealTimeHistogramTimeseriesBucketValues struct for RealTimeHistogramTimeseriesBucketValues type RealTimeHistogramTimeseriesBucketValues struct { - Percentage float64 `json:"percentage,omitempty"` - Count int64 `json:"count,omitempty"` + Percentage *float64 `json:"percentage,omitempty"` + Count *int64 `json:"count,omitempty"` +} + +// NewRealTimeHistogramTimeseriesBucketValues instantiates a new RealTimeHistogramTimeseriesBucketValues 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 NewRealTimeHistogramTimeseriesBucketValues() *RealTimeHistogramTimeseriesBucketValues { + this := RealTimeHistogramTimeseriesBucketValues{} + return &this +} + +// NewRealTimeHistogramTimeseriesBucketValuesWithDefaults instantiates a new RealTimeHistogramTimeseriesBucketValues 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 NewRealTimeHistogramTimeseriesBucketValuesWithDefaults() *RealTimeHistogramTimeseriesBucketValues { + this := RealTimeHistogramTimeseriesBucketValues{} + return &this +} + +// GetPercentage returns the Percentage field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesBucketValues) GetPercentage() float64 { + if o == nil || o.Percentage == nil { + var ret float64 + return ret + } + return *o.Percentage +} + +// GetPercentageOk returns a tuple with the Percentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesBucketValues) GetPercentageOk() (*float64, bool) { + if o == nil || o.Percentage == nil { + return nil, false + } + return o.Percentage, true +} + +// HasPercentage returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesBucketValues) HasPercentage() bool { + if o != nil && o.Percentage != nil { + return true + } + + return false +} + +// SetPercentage gets a reference to the given float64 and assigns it to the Percentage field. +func (o *RealTimeHistogramTimeseriesBucketValues) SetPercentage(v float64) { + o.Percentage = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesBucketValues) GetCount() int64 { + if o == nil || o.Count == nil { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesBucketValues) GetCountOk() (*int64, bool) { + if o == nil || o.Count == nil { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesBucketValues) HasCount() bool { + if o != nil && o.Count != nil { + return true + } + + return false } + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *RealTimeHistogramTimeseriesBucketValues) SetCount(v int64) { + o.Count = &v +} + +func (o RealTimeHistogramTimeseriesBucketValues) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Percentage != nil { + toSerialize["percentage"] = o.Percentage + } + if o.Count != nil { + toSerialize["count"] = o.Count + } + return json.Marshal(toSerialize) +} + +type NullableRealTimeHistogramTimeseriesBucketValues struct { + value *RealTimeHistogramTimeseriesBucketValues + isSet bool +} + +func (v NullableRealTimeHistogramTimeseriesBucketValues) Get() *RealTimeHistogramTimeseriesBucketValues { + return v.value +} + +func (v *NullableRealTimeHistogramTimeseriesBucketValues) Set(val *RealTimeHistogramTimeseriesBucketValues) { + v.value = val + v.isSet = true +} + +func (v NullableRealTimeHistogramTimeseriesBucketValues) IsSet() bool { + return v.isSet +} + +func (v *NullableRealTimeHistogramTimeseriesBucketValues) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRealTimeHistogramTimeseriesBucketValues(val *RealTimeHistogramTimeseriesBucketValues) *NullableRealTimeHistogramTimeseriesBucketValues { + return &NullableRealTimeHistogramTimeseriesBucketValues{value: val, isSet: true} +} + +func (v NullableRealTimeHistogramTimeseriesBucketValues) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRealTimeHistogramTimeseriesBucketValues) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_real_time_histogram_timeseries_datapoint.go b/model_real_time_histogram_timeseries_datapoint.go index 9ebc405..8c6d04f 100644 --- a/model_real_time_histogram_timeseries_datapoint.go +++ b/model_real_time_histogram_timeseries_datapoint.go @@ -1,14 +1,331 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// RealTimeHistogramTimeseriesDatapoint struct for RealTimeHistogramTimeseriesDatapoint type RealTimeHistogramTimeseriesDatapoint struct { - Timestamp string `json:"timestamp,omitempty"` - Sum int64 `json:"sum,omitempty"` - P95 float64 `json:"p95,omitempty"` - Median float64 `json:"median,omitempty"` - MaxPercentage float64 `json:"max_percentage,omitempty"` - BucketValues []RealTimeHistogramTimeseriesBucketValues `json:"bucket_values,omitempty"` - Average float64 `json:"average,omitempty"` + Timestamp *string `json:"timestamp,omitempty"` + Sum *int64 `json:"sum,omitempty"` + P95 *float64 `json:"p95,omitempty"` + Median *float64 `json:"median,omitempty"` + MaxPercentage *float64 `json:"max_percentage,omitempty"` + BucketValues *[]RealTimeHistogramTimeseriesBucketValues `json:"bucket_values,omitempty"` + Average *float64 `json:"average,omitempty"` +} + +// NewRealTimeHistogramTimeseriesDatapoint instantiates a new RealTimeHistogramTimeseriesDatapoint 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 NewRealTimeHistogramTimeseriesDatapoint() *RealTimeHistogramTimeseriesDatapoint { + this := RealTimeHistogramTimeseriesDatapoint{} + return &this +} + +// NewRealTimeHistogramTimeseriesDatapointWithDefaults instantiates a new RealTimeHistogramTimeseriesDatapoint 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 NewRealTimeHistogramTimeseriesDatapointWithDefaults() *RealTimeHistogramTimeseriesDatapoint { + this := RealTimeHistogramTimeseriesDatapoint{} + return &this } + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetTimestamp() string { + if o == nil || o.Timestamp == nil { + var ret string + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetTimestampOk() (*string, bool) { + if o == nil || o.Timestamp == nil { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasTimestamp() bool { + if o != nil && o.Timestamp != nil { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetTimestamp(v string) { + o.Timestamp = &v +} + +// GetSum returns the Sum field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetSum() int64 { + if o == nil || o.Sum == nil { + var ret int64 + return ret + } + return *o.Sum +} + +// GetSumOk returns a tuple with the Sum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetSumOk() (*int64, bool) { + if o == nil || o.Sum == nil { + return nil, false + } + return o.Sum, true +} + +// HasSum returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasSum() bool { + if o != nil && o.Sum != nil { + return true + } + + return false +} + +// SetSum gets a reference to the given int64 and assigns it to the Sum field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetSum(v int64) { + o.Sum = &v +} + +// GetP95 returns the P95 field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetP95() float64 { + if o == nil || o.P95 == nil { + var ret float64 + return ret + } + return *o.P95 +} + +// GetP95Ok returns a tuple with the P95 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetP95Ok() (*float64, bool) { + if o == nil || o.P95 == nil { + return nil, false + } + return o.P95, true +} + +// HasP95 returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasP95() bool { + if o != nil && o.P95 != nil { + return true + } + + return false +} + +// SetP95 gets a reference to the given float64 and assigns it to the P95 field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetP95(v float64) { + o.P95 = &v +} + +// GetMedian returns the Median field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetMedian() float64 { + if o == nil || o.Median == nil { + var ret float64 + return ret + } + return *o.Median +} + +// GetMedianOk returns a tuple with the Median field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetMedianOk() (*float64, bool) { + if o == nil || o.Median == nil { + return nil, false + } + return o.Median, true +} + +// HasMedian returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasMedian() bool { + if o != nil && o.Median != nil { + return true + } + + return false +} + +// SetMedian gets a reference to the given float64 and assigns it to the Median field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetMedian(v float64) { + o.Median = &v +} + +// GetMaxPercentage returns the MaxPercentage field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetMaxPercentage() float64 { + if o == nil || o.MaxPercentage == nil { + var ret float64 + return ret + } + return *o.MaxPercentage +} + +// GetMaxPercentageOk returns a tuple with the MaxPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetMaxPercentageOk() (*float64, bool) { + if o == nil || o.MaxPercentage == nil { + return nil, false + } + return o.MaxPercentage, true +} + +// HasMaxPercentage returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasMaxPercentage() bool { + if o != nil && o.MaxPercentage != nil { + return true + } + + return false +} + +// SetMaxPercentage gets a reference to the given float64 and assigns it to the MaxPercentage field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetMaxPercentage(v float64) { + o.MaxPercentage = &v +} + +// GetBucketValues returns the BucketValues field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetBucketValues() []RealTimeHistogramTimeseriesBucketValues { + if o == nil || o.BucketValues == nil { + var ret []RealTimeHistogramTimeseriesBucketValues + return ret + } + return *o.BucketValues +} + +// GetBucketValuesOk returns a tuple with the BucketValues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetBucketValuesOk() (*[]RealTimeHistogramTimeseriesBucketValues, bool) { + if o == nil || o.BucketValues == nil { + return nil, false + } + return o.BucketValues, true +} + +// HasBucketValues returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasBucketValues() bool { + if o != nil && o.BucketValues != nil { + return true + } + + return false +} + +// SetBucketValues gets a reference to the given []RealTimeHistogramTimeseriesBucketValues and assigns it to the BucketValues field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetBucketValues(v []RealTimeHistogramTimeseriesBucketValues) { + o.BucketValues = &v +} + +// GetAverage returns the Average field value if set, zero value otherwise. +func (o *RealTimeHistogramTimeseriesDatapoint) GetAverage() float64 { + if o == nil || o.Average == nil { + var ret float64 + return ret + } + return *o.Average +} + +// GetAverageOk returns a tuple with the Average field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) GetAverageOk() (*float64, bool) { + if o == nil || o.Average == nil { + return nil, false + } + return o.Average, true +} + +// HasAverage returns a boolean if a field has been set. +func (o *RealTimeHistogramTimeseriesDatapoint) HasAverage() bool { + if o != nil && o.Average != nil { + return true + } + + return false +} + +// SetAverage gets a reference to the given float64 and assigns it to the Average field. +func (o *RealTimeHistogramTimeseriesDatapoint) SetAverage(v float64) { + o.Average = &v +} + +func (o RealTimeHistogramTimeseriesDatapoint) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Timestamp != nil { + toSerialize["timestamp"] = o.Timestamp + } + if o.Sum != nil { + toSerialize["sum"] = o.Sum + } + if o.P95 != nil { + toSerialize["p95"] = o.P95 + } + if o.Median != nil { + toSerialize["median"] = o.Median + } + if o.MaxPercentage != nil { + toSerialize["max_percentage"] = o.MaxPercentage + } + if o.BucketValues != nil { + toSerialize["bucket_values"] = o.BucketValues + } + if o.Average != nil { + toSerialize["average"] = o.Average + } + return json.Marshal(toSerialize) +} + +type NullableRealTimeHistogramTimeseriesDatapoint struct { + value *RealTimeHistogramTimeseriesDatapoint + isSet bool +} + +func (v NullableRealTimeHistogramTimeseriesDatapoint) Get() *RealTimeHistogramTimeseriesDatapoint { + return v.value +} + +func (v *NullableRealTimeHistogramTimeseriesDatapoint) Set(val *RealTimeHistogramTimeseriesDatapoint) { + v.value = val + v.isSet = true +} + +func (v NullableRealTimeHistogramTimeseriesDatapoint) IsSet() bool { + return v.isSet +} + +func (v *NullableRealTimeHistogramTimeseriesDatapoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRealTimeHistogramTimeseriesDatapoint(val *RealTimeHistogramTimeseriesDatapoint) *NullableRealTimeHistogramTimeseriesDatapoint { + return &NullableRealTimeHistogramTimeseriesDatapoint{value: val, isSet: true} +} + +func (v NullableRealTimeHistogramTimeseriesDatapoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRealTimeHistogramTimeseriesDatapoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_real_time_timeseries_datapoint.go b/model_real_time_timeseries_datapoint.go index e594621..07b9067 100644 --- a/model_real_time_timeseries_datapoint.go +++ b/model_real_time_timeseries_datapoint.go @@ -1,10 +1,187 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// RealTimeTimeseriesDatapoint struct for RealTimeTimeseriesDatapoint type RealTimeTimeseriesDatapoint struct { - Value float64 `json:"value,omitempty"` - Date string `json:"date,omitempty"` - ConcurentViewers int64 `json:"concurent_viewers,omitempty"` + Value *float64 `json:"value,omitempty"` + Date *string `json:"date,omitempty"` + ConcurentViewers *int64 `json:"concurent_viewers,omitempty"` +} + +// NewRealTimeTimeseriesDatapoint instantiates a new RealTimeTimeseriesDatapoint 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 NewRealTimeTimeseriesDatapoint() *RealTimeTimeseriesDatapoint { + this := RealTimeTimeseriesDatapoint{} + return &this +} + +// NewRealTimeTimeseriesDatapointWithDefaults instantiates a new RealTimeTimeseriesDatapoint 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 NewRealTimeTimeseriesDatapointWithDefaults() *RealTimeTimeseriesDatapoint { + this := RealTimeTimeseriesDatapoint{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *RealTimeTimeseriesDatapoint) GetValue() float64 { + if o == nil || o.Value == nil { + var ret float64 + 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. +func (o *RealTimeTimeseriesDatapoint) GetValueOk() (*float64, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true } + +// HasValue returns a boolean if a field has been set. +func (o *RealTimeTimeseriesDatapoint) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *RealTimeTimeseriesDatapoint) SetValue(v float64) { + o.Value = &v +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *RealTimeTimeseriesDatapoint) GetDate() string { + if o == nil || o.Date == nil { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeTimeseriesDatapoint) GetDateOk() (*string, bool) { + if o == nil || o.Date == nil { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *RealTimeTimeseriesDatapoint) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *RealTimeTimeseriesDatapoint) SetDate(v string) { + o.Date = &v +} + +// GetConcurentViewers returns the ConcurentViewers field value if set, zero value otherwise. +func (o *RealTimeTimeseriesDatapoint) GetConcurentViewers() int64 { + if o == nil || o.ConcurentViewers == nil { + var ret int64 + return ret + } + return *o.ConcurentViewers +} + +// GetConcurentViewersOk returns a tuple with the ConcurentViewers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealTimeTimeseriesDatapoint) GetConcurentViewersOk() (*int64, bool) { + if o == nil || o.ConcurentViewers == nil { + return nil, false + } + return o.ConcurentViewers, true +} + +// HasConcurentViewers returns a boolean if a field has been set. +func (o *RealTimeTimeseriesDatapoint) HasConcurentViewers() bool { + if o != nil && o.ConcurentViewers != nil { + return true + } + + return false +} + +// SetConcurentViewers gets a reference to the given int64 and assigns it to the ConcurentViewers field. +func (o *RealTimeTimeseriesDatapoint) SetConcurentViewers(v int64) { + o.ConcurentViewers = &v +} + +func (o RealTimeTimeseriesDatapoint) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Date != nil { + toSerialize["date"] = o.Date + } + if o.ConcurentViewers != nil { + toSerialize["concurent_viewers"] = o.ConcurentViewers + } + return json.Marshal(toSerialize) +} + +type NullableRealTimeTimeseriesDatapoint struct { + value *RealTimeTimeseriesDatapoint + isSet bool +} + +func (v NullableRealTimeTimeseriesDatapoint) Get() *RealTimeTimeseriesDatapoint { + return v.value +} + +func (v *NullableRealTimeTimeseriesDatapoint) Set(val *RealTimeTimeseriesDatapoint) { + v.value = val + v.isSet = true +} + +func (v NullableRealTimeTimeseriesDatapoint) IsSet() bool { + return v.isSet +} + +func (v *NullableRealTimeTimeseriesDatapoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRealTimeTimeseriesDatapoint(val *RealTimeTimeseriesDatapoint) *NullableRealTimeTimeseriesDatapoint { + return &NullableRealTimeTimeseriesDatapoint{value: val, isSet: true} +} + +func (v NullableRealTimeTimeseriesDatapoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRealTimeTimeseriesDatapoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_score.go b/model_score.go index a489c13..4cebbde 100644 --- a/model_score.go +++ b/model_score.go @@ -1,13 +1,295 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Score struct for Score type Score struct { - WatchTime int64 `json:"watch_time,omitempty"` - ViewCount int64 `json:"view_count,omitempty"` - Name string `json:"name,omitempty"` - Value float64 `json:"value,omitempty"` - Metric string `json:"metric,omitempty"` - Items []Metric `json:"items,omitempty"` + WatchTime *int64 `json:"watch_time,omitempty"` + ViewCount *int64 `json:"view_count,omitempty"` + Name *string `json:"name,omitempty"` + Value *float64 `json:"value,omitempty"` + Metric *string `json:"metric,omitempty"` + Items *[]Metric `json:"items,omitempty"` +} + +// NewScore instantiates a new Score 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 NewScore() *Score { + this := Score{} + return &this +} + +// NewScoreWithDefaults instantiates a new Score 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 NewScoreWithDefaults() *Score { + this := Score{} + return &this +} + +// GetWatchTime returns the WatchTime field value if set, zero value otherwise. +func (o *Score) GetWatchTime() int64 { + if o == nil || o.WatchTime == nil { + var ret int64 + return ret + } + return *o.WatchTime +} + +// GetWatchTimeOk returns a tuple with the WatchTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetWatchTimeOk() (*int64, bool) { + if o == nil || o.WatchTime == nil { + return nil, false + } + return o.WatchTime, true +} + +// HasWatchTime returns a boolean if a field has been set. +func (o *Score) HasWatchTime() bool { + if o != nil && o.WatchTime != nil { + return true + } + + return false +} + +// SetWatchTime gets a reference to the given int64 and assigns it to the WatchTime field. +func (o *Score) SetWatchTime(v int64) { + o.WatchTime = &v +} + +// GetViewCount returns the ViewCount field value if set, zero value otherwise. +func (o *Score) GetViewCount() int64 { + if o == nil || o.ViewCount == nil { + var ret int64 + return ret + } + return *o.ViewCount +} + +// GetViewCountOk returns a tuple with the ViewCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetViewCountOk() (*int64, bool) { + if o == nil || o.ViewCount == nil { + return nil, false + } + return o.ViewCount, true +} + +// HasViewCount returns a boolean if a field has been set. +func (o *Score) HasViewCount() bool { + if o != nil && o.ViewCount != nil { + return true + } + + return false +} + +// SetViewCount gets a reference to the given int64 and assigns it to the ViewCount field. +func (o *Score) SetViewCount(v int64) { + o.ViewCount = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Score) GetName() string { + if o == nil || o.Name == nil { + 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 *Score) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Score) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Score) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Score) GetValue() float64 { + if o == nil || o.Value == nil { + var ret float64 + 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. +func (o *Score) GetValueOk() (*float64, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Score) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false } + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *Score) SetValue(v float64) { + o.Value = &v +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *Score) GetMetric() string { + if o == nil || o.Metric == nil { + var ret string + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetMetricOk() (*string, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *Score) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *Score) SetMetric(v string) { + o.Metric = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *Score) GetItems() []Metric { + if o == nil || o.Items == nil { + var ret []Metric + return ret + } + return *o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Score) GetItemsOk() (*[]Metric, bool) { + if o == nil || o.Items == nil { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *Score) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// SetItems gets a reference to the given []Metric and assigns it to the Items field. +func (o *Score) SetItems(v []Metric) { + o.Items = &v +} + +func (o Score) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.WatchTime != nil { + toSerialize["watch_time"] = o.WatchTime + } + if o.ViewCount != nil { + toSerialize["view_count"] = o.ViewCount + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Metric != nil { + toSerialize["metric"] = o.Metric + } + if o.Items != nil { + toSerialize["items"] = o.Items + } + return json.Marshal(toSerialize) +} + +type NullableScore struct { + value *Score + isSet bool +} + +func (v NullableScore) Get() *Score { + return v.value +} + +func (v *NullableScore) Set(val *Score) { + v.value = val + v.isSet = true +} + +func (v NullableScore) IsSet() bool { + return v.isSet +} + +func (v *NullableScore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScore(val *Score) *NullableScore { + return &NullableScore{value: val, isSet: true} +} + +func (v NullableScore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_signal_live_stream_complete_response.go b/model_signal_live_stream_complete_response.go index 6f4c758..ad30c43 100644 --- a/model_signal_live_stream_complete_response.go +++ b/model_signal_live_stream_complete_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// SignalLiveStreamCompleteResponse struct for SignalLiveStreamCompleteResponse type SignalLiveStreamCompleteResponse struct { - Data map[string]interface{} `json:"data,omitempty"` + Data *map[string]interface{} `json:"data,omitempty"` +} + +// NewSignalLiveStreamCompleteResponse instantiates a new SignalLiveStreamCompleteResponse 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 NewSignalLiveStreamCompleteResponse() *SignalLiveStreamCompleteResponse { + this := SignalLiveStreamCompleteResponse{} + return &this +} + +// NewSignalLiveStreamCompleteResponseWithDefaults instantiates a new SignalLiveStreamCompleteResponse 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 NewSignalLiveStreamCompleteResponseWithDefaults() *SignalLiveStreamCompleteResponse { + this := SignalLiveStreamCompleteResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SignalLiveStreamCompleteResponse) GetData() map[string]interface{} { + if o == nil || o.Data == nil { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SignalLiveStreamCompleteResponse) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *SignalLiveStreamCompleteResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *SignalLiveStreamCompleteResponse) SetData(v map[string]interface{}) { + o.Data = &v +} + +func (o SignalLiveStreamCompleteResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableSignalLiveStreamCompleteResponse struct { + value *SignalLiveStreamCompleteResponse + isSet bool +} + +func (v NullableSignalLiveStreamCompleteResponse) Get() *SignalLiveStreamCompleteResponse { + return v.value +} + +func (v *NullableSignalLiveStreamCompleteResponse) Set(val *SignalLiveStreamCompleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSignalLiveStreamCompleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSignalLiveStreamCompleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSignalLiveStreamCompleteResponse(val *SignalLiveStreamCompleteResponse) *NullableSignalLiveStreamCompleteResponse { + return &NullableSignalLiveStreamCompleteResponse{value: val, isSet: true} +} + +func (v NullableSignalLiveStreamCompleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSignalLiveStreamCompleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_signing_key.go b/model_signing_key.go index 46e036c..a4af0ba 100644 --- a/model_signing_key.go +++ b/model_signing_key.go @@ -1,10 +1,190 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// SigningKey struct for SigningKey type SigningKey struct { - Id string `json:"id,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - PrivateKey string `json:"private_key,omitempty"` + // Unique identifier for the Signing Key. + Id *string `json:"id,omitempty"` + // Time at which the object was created. Measured in seconds since the Unix epoch. + CreatedAt *string `json:"created_at,omitempty"` + // A Base64 encoded private key that can be used with the RS256 algorithm when creating a [JWT](https://jwt.io/). **Note that this value is only returned once when creating a URL signing key.** + PrivateKey *string `json:"private_key,omitempty"` +} + +// NewSigningKey instantiates a new SigningKey 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 NewSigningKey() *SigningKey { + this := SigningKey{} + return &this +} + +// NewSigningKeyWithDefaults instantiates a new SigningKey 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 NewSigningKeyWithDefaults() *SigningKey { + this := SigningKey{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SigningKey) GetId() string { + if o == nil || o.Id == nil { + 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 *SigningKey) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true } + +// HasId returns a boolean if a field has been set. +func (o *SigningKey) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SigningKey) SetId(v string) { + o.Id = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SigningKey) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigningKey) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SigningKey) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *SigningKey) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. +func (o *SigningKey) GetPrivateKey() string { + if o == nil || o.PrivateKey == nil { + var ret string + return ret + } + return *o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigningKey) GetPrivateKeyOk() (*string, bool) { + if o == nil || o.PrivateKey == nil { + return nil, false + } + return o.PrivateKey, true +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *SigningKey) HasPrivateKey() bool { + if o != nil && o.PrivateKey != nil { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. +func (o *SigningKey) SetPrivateKey(v string) { + o.PrivateKey = &v +} + +func (o SigningKey) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.PrivateKey != nil { + toSerialize["private_key"] = o.PrivateKey + } + return json.Marshal(toSerialize) +} + +type NullableSigningKey struct { + value *SigningKey + isSet bool +} + +func (v NullableSigningKey) Get() *SigningKey { + return v.value +} + +func (v *NullableSigningKey) Set(val *SigningKey) { + v.value = val + v.isSet = true +} + +func (v NullableSigningKey) IsSet() bool { + return v.isSet +} + +func (v *NullableSigningKey) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSigningKey(val *SigningKey) *NullableSigningKey { + return &NullableSigningKey{value: val, isSet: true} +} + +func (v NullableSigningKey) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSigningKey) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_signing_key_response.go b/model_signing_key_response.go index 4d9d4bb..7700940 100644 --- a/model_signing_key_response.go +++ b/model_signing_key_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// SigningKeyResponse struct for SigningKeyResponse type SigningKeyResponse struct { - Data SigningKey `json:"data,omitempty"` + Data *SigningKey `json:"data,omitempty"` +} + +// NewSigningKeyResponse instantiates a new SigningKeyResponse 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 NewSigningKeyResponse() *SigningKeyResponse { + this := SigningKeyResponse{} + return &this +} + +// NewSigningKeyResponseWithDefaults instantiates a new SigningKeyResponse 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 NewSigningKeyResponseWithDefaults() *SigningKeyResponse { + this := SigningKeyResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SigningKeyResponse) GetData() SigningKey { + if o == nil || o.Data == nil { + var ret SigningKey + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigningKeyResponse) GetDataOk() (*SigningKey, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *SigningKeyResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given SigningKey and assigns it to the Data field. +func (o *SigningKeyResponse) SetData(v SigningKey) { + o.Data = &v +} + +func (o SigningKeyResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableSigningKeyResponse struct { + value *SigningKeyResponse + isSet bool +} + +func (v NullableSigningKeyResponse) Get() *SigningKeyResponse { + return v.value +} + +func (v *NullableSigningKeyResponse) Set(val *SigningKeyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSigningKeyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSigningKeyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSigningKeyResponse(val *SigningKeyResponse) *NullableSigningKeyResponse { + return &NullableSigningKeyResponse{value: val, isSet: true} +} + +func (v NullableSigningKeyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSigningKeyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_simulcast_target.go b/model_simulcast_target.go index 3ad3574..6d78698 100644 --- a/model_simulcast_target.go +++ b/model_simulcast_target.go @@ -1,17 +1,264 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// SimulcastTarget struct for SimulcastTarget type SimulcastTarget struct { // ID of the Simulcast Target - Id string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` // Arbitrary Metadata set when creating a simulcast target. - Passthrough string `json:"passthrough,omitempty"` - // The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. - Status string `json:"status,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` + // The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. + Status *string `json:"status,omitempty"` // Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. - StreamKey string `json:"stream_key,omitempty"` + StreamKey *string `json:"stream_key,omitempty"` // RTMP hostname including the application name for the third party live streaming service. - Url string `json:"url,omitempty"` + Url *string `json:"url,omitempty"` +} + +// NewSimulcastTarget instantiates a new SimulcastTarget 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 NewSimulcastTarget() *SimulcastTarget { + this := SimulcastTarget{} + return &this +} + +// NewSimulcastTargetWithDefaults instantiates a new SimulcastTarget 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 NewSimulcastTargetWithDefaults() *SimulcastTarget { + this := SimulcastTarget{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SimulcastTarget) GetId() string { + if o == nil || o.Id == nil { + 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 *SimulcastTarget) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SimulcastTarget) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SimulcastTarget) SetId(v string) { + o.Id = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *SimulcastTarget) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulcastTarget) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *SimulcastTarget) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *SimulcastTarget) SetPassthrough(v string) { + o.Passthrough = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SimulcastTarget) GetStatus() string { + if o == nil || o.Status == nil { + 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 *SimulcastTarget) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true } + +// HasStatus returns a boolean if a field has been set. +func (o *SimulcastTarget) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *SimulcastTarget) SetStatus(v string) { + o.Status = &v +} + +// GetStreamKey returns the StreamKey field value if set, zero value otherwise. +func (o *SimulcastTarget) GetStreamKey() string { + if o == nil || o.StreamKey == nil { + var ret string + return ret + } + return *o.StreamKey +} + +// GetStreamKeyOk returns a tuple with the StreamKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulcastTarget) GetStreamKeyOk() (*string, bool) { + if o == nil || o.StreamKey == nil { + return nil, false + } + return o.StreamKey, true +} + +// HasStreamKey returns a boolean if a field has been set. +func (o *SimulcastTarget) HasStreamKey() bool { + if o != nil && o.StreamKey != nil { + return true + } + + return false +} + +// SetStreamKey gets a reference to the given string and assigns it to the StreamKey field. +func (o *SimulcastTarget) SetStreamKey(v string) { + o.StreamKey = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *SimulcastTarget) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulcastTarget) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *SimulcastTarget) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *SimulcastTarget) SetUrl(v string) { + o.Url = &v +} + +func (o SimulcastTarget) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.StreamKey != nil { + toSerialize["stream_key"] = o.StreamKey + } + if o.Url != nil { + toSerialize["url"] = o.Url + } + return json.Marshal(toSerialize) +} + +type NullableSimulcastTarget struct { + value *SimulcastTarget + isSet bool +} + +func (v NullableSimulcastTarget) Get() *SimulcastTarget { + return v.value +} + +func (v *NullableSimulcastTarget) Set(val *SimulcastTarget) { + v.value = val + v.isSet = true +} + +func (v NullableSimulcastTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulcastTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulcastTarget(val *SimulcastTarget) *NullableSimulcastTarget { + return &NullableSimulcastTarget{value: val, isSet: true} +} + +func (v NullableSimulcastTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulcastTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_simulcast_target_response.go b/model_simulcast_target_response.go index a174b7a..b3ee93a 100644 --- a/model_simulcast_target_response.go +++ b/model_simulcast_target_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// SimulcastTargetResponse struct for SimulcastTargetResponse type SimulcastTargetResponse struct { - Data SimulcastTarget `json:"data,omitempty"` + Data *SimulcastTarget `json:"data,omitempty"` +} + +// NewSimulcastTargetResponse instantiates a new SimulcastTargetResponse 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 NewSimulcastTargetResponse() *SimulcastTargetResponse { + this := SimulcastTargetResponse{} + return &this +} + +// NewSimulcastTargetResponseWithDefaults instantiates a new SimulcastTargetResponse 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 NewSimulcastTargetResponseWithDefaults() *SimulcastTargetResponse { + this := SimulcastTargetResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SimulcastTargetResponse) GetData() SimulcastTarget { + if o == nil || o.Data == nil { + var ret SimulcastTarget + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SimulcastTargetResponse) GetDataOk() (*SimulcastTarget, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *SimulcastTargetResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given SimulcastTarget and assigns it to the Data field. +func (o *SimulcastTargetResponse) SetData(v SimulcastTarget) { + o.Data = &v +} + +func (o SimulcastTargetResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableSimulcastTargetResponse struct { + value *SimulcastTargetResponse + isSet bool +} + +func (v NullableSimulcastTargetResponse) Get() *SimulcastTargetResponse { + return v.value +} + +func (v *NullableSimulcastTargetResponse) Set(val *SimulcastTargetResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSimulcastTargetResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSimulcastTargetResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSimulcastTargetResponse(val *SimulcastTargetResponse) *NullableSimulcastTargetResponse { + return &NullableSimulcastTargetResponse{value: val, isSet: true} +} + +func (v NullableSimulcastTargetResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSimulcastTargetResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_track.go b/model_track.go index 0e30d9f..095f1c1 100644 --- a/model_track.go +++ b/model_track.go @@ -1,33 +1,560 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Track struct for Track type Track struct { // Unique identifier for the Track - Id string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` // The type of track - Type string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` // The duration in seconds of the track media. This parameter is not set for the `text` type track. This field is optional and may not be set. The top level `duration` field of an asset will always be set. - Duration float64 `json:"duration,omitempty"` + Duration *float64 `json:"duration,omitempty"` // The maximum width in pixels available for the track. Only set for the `video` type track. - MaxWidth int64 `json:"max_width,omitempty"` + MaxWidth *int64 `json:"max_width,omitempty"` // The maximum height in pixels available for the track. Only set for the `video` type track. - MaxHeight int64 `json:"max_height,omitempty"` + MaxHeight *int64 `json:"max_height,omitempty"` // The maximum frame rate available for the track. Only set for the `video` type track. This field may return `-1` if the frame rate of the input cannot be reliably determined. - MaxFrameRate float64 `json:"max_frame_rate,omitempty"` + MaxFrameRate *float64 `json:"max_frame_rate,omitempty"` // The maximum number of audio channels the track supports. Only set for the `audio` type track. - MaxChannels int64 `json:"max_channels,omitempty"` + MaxChannels *int64 `json:"max_channels,omitempty"` // Only set for the `audio` type track. - MaxChannelLayout string `json:"max_channel_layout,omitempty"` + MaxChannelLayout *string `json:"max_channel_layout,omitempty"` // This parameter is set only for the `text` type track. - TextType string `json:"text_type,omitempty"` + TextType *string `json:"text_type,omitempty"` // The language code value represents [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is set for `text` type and `subtitles` text type track. - LanguageCode string `json:"language_code,omitempty"` + LanguageCode *string `json:"language_code,omitempty"` // The name of the track containing a human-readable description. The hls manifest will associate a subtitle text track with this value. For example, the value is \"English\" for subtitles text track for the `language_code` value of `en-US`. This parameter is set for the `text` type and `subtitles` text type track. - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` // Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is set for the `text` type and `subtitles` text type track. - ClosedCaptions bool `json:"closed_captions,omitempty"` + ClosedCaptions *bool `json:"closed_captions,omitempty"` // Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. - Passthrough string `json:"passthrough,omitempty"` + Passthrough *string `json:"passthrough,omitempty"` +} + +// NewTrack instantiates a new Track 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 NewTrack() *Track { + this := Track{} + return &this +} + +// NewTrackWithDefaults instantiates a new Track 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 NewTrackWithDefaults() *Track { + this := Track{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Track) GetId() string { + if o == nil || o.Id == nil { + 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 *Track) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Track) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Track) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Track) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Track) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Track) SetType(v string) { + o.Type = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *Track) GetDuration() float64 { + if o == nil || o.Duration == nil { + var ret float64 + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetDurationOk() (*float64, bool) { + if o == nil || o.Duration == nil { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *Track) HasDuration() bool { + if o != nil && o.Duration != nil { + return true + } + + return false +} + +// SetDuration gets a reference to the given float64 and assigns it to the Duration field. +func (o *Track) SetDuration(v float64) { + o.Duration = &v +} + +// GetMaxWidth returns the MaxWidth field value if set, zero value otherwise. +func (o *Track) GetMaxWidth() int64 { + if o == nil || o.MaxWidth == nil { + var ret int64 + return ret + } + return *o.MaxWidth +} + +// GetMaxWidthOk returns a tuple with the MaxWidth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetMaxWidthOk() (*int64, bool) { + if o == nil || o.MaxWidth == nil { + return nil, false + } + return o.MaxWidth, true +} + +// HasMaxWidth returns a boolean if a field has been set. +func (o *Track) HasMaxWidth() bool { + if o != nil && o.MaxWidth != nil { + return true + } + + return false +} + +// SetMaxWidth gets a reference to the given int64 and assigns it to the MaxWidth field. +func (o *Track) SetMaxWidth(v int64) { + o.MaxWidth = &v +} + +// GetMaxHeight returns the MaxHeight field value if set, zero value otherwise. +func (o *Track) GetMaxHeight() int64 { + if o == nil || o.MaxHeight == nil { + var ret int64 + return ret + } + return *o.MaxHeight +} + +// GetMaxHeightOk returns a tuple with the MaxHeight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetMaxHeightOk() (*int64, bool) { + if o == nil || o.MaxHeight == nil { + return nil, false + } + return o.MaxHeight, true +} + +// HasMaxHeight returns a boolean if a field has been set. +func (o *Track) HasMaxHeight() bool { + if o != nil && o.MaxHeight != nil { + return true + } + + return false +} + +// SetMaxHeight gets a reference to the given int64 and assigns it to the MaxHeight field. +func (o *Track) SetMaxHeight(v int64) { + o.MaxHeight = &v +} + +// GetMaxFrameRate returns the MaxFrameRate field value if set, zero value otherwise. +func (o *Track) GetMaxFrameRate() float64 { + if o == nil || o.MaxFrameRate == nil { + var ret float64 + return ret + } + return *o.MaxFrameRate +} + +// GetMaxFrameRateOk returns a tuple with the MaxFrameRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetMaxFrameRateOk() (*float64, bool) { + if o == nil || o.MaxFrameRate == nil { + return nil, false + } + return o.MaxFrameRate, true +} + +// HasMaxFrameRate returns a boolean if a field has been set. +func (o *Track) HasMaxFrameRate() bool { + if o != nil && o.MaxFrameRate != nil { + return true + } + + return false +} + +// SetMaxFrameRate gets a reference to the given float64 and assigns it to the MaxFrameRate field. +func (o *Track) SetMaxFrameRate(v float64) { + o.MaxFrameRate = &v +} + +// GetMaxChannels returns the MaxChannels field value if set, zero value otherwise. +func (o *Track) GetMaxChannels() int64 { + if o == nil || o.MaxChannels == nil { + var ret int64 + return ret + } + return *o.MaxChannels +} + +// GetMaxChannelsOk returns a tuple with the MaxChannels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetMaxChannelsOk() (*int64, bool) { + if o == nil || o.MaxChannels == nil { + return nil, false + } + return o.MaxChannels, true } + +// HasMaxChannels returns a boolean if a field has been set. +func (o *Track) HasMaxChannels() bool { + if o != nil && o.MaxChannels != nil { + return true + } + + return false +} + +// SetMaxChannels gets a reference to the given int64 and assigns it to the MaxChannels field. +func (o *Track) SetMaxChannels(v int64) { + o.MaxChannels = &v +} + +// GetMaxChannelLayout returns the MaxChannelLayout field value if set, zero value otherwise. +func (o *Track) GetMaxChannelLayout() string { + if o == nil || o.MaxChannelLayout == nil { + var ret string + return ret + } + return *o.MaxChannelLayout +} + +// GetMaxChannelLayoutOk returns a tuple with the MaxChannelLayout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetMaxChannelLayoutOk() (*string, bool) { + if o == nil || o.MaxChannelLayout == nil { + return nil, false + } + return o.MaxChannelLayout, true +} + +// HasMaxChannelLayout returns a boolean if a field has been set. +func (o *Track) HasMaxChannelLayout() bool { + if o != nil && o.MaxChannelLayout != nil { + return true + } + + return false +} + +// SetMaxChannelLayout gets a reference to the given string and assigns it to the MaxChannelLayout field. +func (o *Track) SetMaxChannelLayout(v string) { + o.MaxChannelLayout = &v +} + +// GetTextType returns the TextType field value if set, zero value otherwise. +func (o *Track) GetTextType() string { + if o == nil || o.TextType == nil { + var ret string + return ret + } + return *o.TextType +} + +// GetTextTypeOk returns a tuple with the TextType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetTextTypeOk() (*string, bool) { + if o == nil || o.TextType == nil { + return nil, false + } + return o.TextType, true +} + +// HasTextType returns a boolean if a field has been set. +func (o *Track) HasTextType() bool { + if o != nil && o.TextType != nil { + return true + } + + return false +} + +// SetTextType gets a reference to the given string and assigns it to the TextType field. +func (o *Track) SetTextType(v string) { + o.TextType = &v +} + +// GetLanguageCode returns the LanguageCode field value if set, zero value otherwise. +func (o *Track) GetLanguageCode() string { + if o == nil || o.LanguageCode == nil { + var ret string + return ret + } + return *o.LanguageCode +} + +// GetLanguageCodeOk returns a tuple with the LanguageCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetLanguageCodeOk() (*string, bool) { + if o == nil || o.LanguageCode == nil { + return nil, false + } + return o.LanguageCode, true +} + +// HasLanguageCode returns a boolean if a field has been set. +func (o *Track) HasLanguageCode() bool { + if o != nil && o.LanguageCode != nil { + return true + } + + return false +} + +// SetLanguageCode gets a reference to the given string and assigns it to the LanguageCode field. +func (o *Track) SetLanguageCode(v string) { + o.LanguageCode = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Track) GetName() string { + if o == nil || o.Name == nil { + 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 *Track) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Track) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Track) SetName(v string) { + o.Name = &v +} + +// GetClosedCaptions returns the ClosedCaptions field value if set, zero value otherwise. +func (o *Track) GetClosedCaptions() bool { + if o == nil || o.ClosedCaptions == nil { + var ret bool + return ret + } + return *o.ClosedCaptions +} + +// GetClosedCaptionsOk returns a tuple with the ClosedCaptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetClosedCaptionsOk() (*bool, bool) { + if o == nil || o.ClosedCaptions == nil { + return nil, false + } + return o.ClosedCaptions, true +} + +// HasClosedCaptions returns a boolean if a field has been set. +func (o *Track) HasClosedCaptions() bool { + if o != nil && o.ClosedCaptions != nil { + return true + } + + return false +} + +// SetClosedCaptions gets a reference to the given bool and assigns it to the ClosedCaptions field. +func (o *Track) SetClosedCaptions(v bool) { + o.ClosedCaptions = &v +} + +// GetPassthrough returns the Passthrough field value if set, zero value otherwise. +func (o *Track) GetPassthrough() string { + if o == nil || o.Passthrough == nil { + var ret string + return ret + } + return *o.Passthrough +} + +// GetPassthroughOk returns a tuple with the Passthrough field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Track) GetPassthroughOk() (*string, bool) { + if o == nil || o.Passthrough == nil { + return nil, false + } + return o.Passthrough, true +} + +// HasPassthrough returns a boolean if a field has been set. +func (o *Track) HasPassthrough() bool { + if o != nil && o.Passthrough != nil { + return true + } + + return false +} + +// SetPassthrough gets a reference to the given string and assigns it to the Passthrough field. +func (o *Track) SetPassthrough(v string) { + o.Passthrough = &v +} + +func (o Track) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if o.MaxWidth != nil { + toSerialize["max_width"] = o.MaxWidth + } + if o.MaxHeight != nil { + toSerialize["max_height"] = o.MaxHeight + } + if o.MaxFrameRate != nil { + toSerialize["max_frame_rate"] = o.MaxFrameRate + } + if o.MaxChannels != nil { + toSerialize["max_channels"] = o.MaxChannels + } + if o.MaxChannelLayout != nil { + toSerialize["max_channel_layout"] = o.MaxChannelLayout + } + if o.TextType != nil { + toSerialize["text_type"] = o.TextType + } + if o.LanguageCode != nil { + toSerialize["language_code"] = o.LanguageCode + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.ClosedCaptions != nil { + toSerialize["closed_captions"] = o.ClosedCaptions + } + if o.Passthrough != nil { + toSerialize["passthrough"] = o.Passthrough + } + return json.Marshal(toSerialize) +} + +type NullableTrack struct { + value *Track + isSet bool +} + +func (v NullableTrack) Get() *Track { + return v.value +} + +func (v *NullableTrack) Set(val *Track) { + v.value = val + v.isSet = true +} + +func (v NullableTrack) IsSet() bool { + return v.isSet +} + +func (v *NullableTrack) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrack(val *Track) *NullableTrack { + return &NullableTrack{value: val, isSet: true} +} + +func (v NullableTrack) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrack) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_asset_master_access_request.go b/model_update_asset_master_access_request.go index e277bc1..3541b18 100644 --- a/model_update_asset_master_access_request.go +++ b/model_update_asset_master_access_request.go @@ -1,9 +1,116 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// UpdateAssetMasterAccessRequest struct for UpdateAssetMasterAccessRequest type UpdateAssetMasterAccessRequest struct { // Add or remove access to the master version of the video. - MasterAccess string `json:"master_access,omitempty"` + MasterAccess *string `json:"master_access,omitempty"` +} + +// NewUpdateAssetMasterAccessRequest instantiates a new UpdateAssetMasterAccessRequest 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 NewUpdateAssetMasterAccessRequest() *UpdateAssetMasterAccessRequest { + this := UpdateAssetMasterAccessRequest{} + return &this +} + +// NewUpdateAssetMasterAccessRequestWithDefaults instantiates a new UpdateAssetMasterAccessRequest 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 NewUpdateAssetMasterAccessRequestWithDefaults() *UpdateAssetMasterAccessRequest { + this := UpdateAssetMasterAccessRequest{} + return &this +} + +// GetMasterAccess returns the MasterAccess field value if set, zero value otherwise. +func (o *UpdateAssetMasterAccessRequest) GetMasterAccess() string { + if o == nil || o.MasterAccess == nil { + var ret string + return ret + } + return *o.MasterAccess +} + +// GetMasterAccessOk returns a tuple with the MasterAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAssetMasterAccessRequest) GetMasterAccessOk() (*string, bool) { + if o == nil || o.MasterAccess == nil { + return nil, false + } + return o.MasterAccess, true } + +// HasMasterAccess returns a boolean if a field has been set. +func (o *UpdateAssetMasterAccessRequest) HasMasterAccess() bool { + if o != nil && o.MasterAccess != nil { + return true + } + + return false +} + +// SetMasterAccess gets a reference to the given string and assigns it to the MasterAccess field. +func (o *UpdateAssetMasterAccessRequest) SetMasterAccess(v string) { + o.MasterAccess = &v +} + +func (o UpdateAssetMasterAccessRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MasterAccess != nil { + toSerialize["master_access"] = o.MasterAccess + } + return json.Marshal(toSerialize) +} + +type NullableUpdateAssetMasterAccessRequest struct { + value *UpdateAssetMasterAccessRequest + isSet bool +} + +func (v NullableUpdateAssetMasterAccessRequest) Get() *UpdateAssetMasterAccessRequest { + return v.value +} + +func (v *NullableUpdateAssetMasterAccessRequest) Set(val *UpdateAssetMasterAccessRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAssetMasterAccessRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAssetMasterAccessRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAssetMasterAccessRequest(val *UpdateAssetMasterAccessRequest) *NullableUpdateAssetMasterAccessRequest { + return &NullableUpdateAssetMasterAccessRequest{value: val, isSet: true} +} + +func (v NullableUpdateAssetMasterAccessRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAssetMasterAccessRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_asset_mp4_support_request.go b/model_update_asset_mp4_support_request.go index e9713a8..8428cb9 100644 --- a/model_update_asset_mp4_support_request.go +++ b/model_update_asset_mp4_support_request.go @@ -1,9 +1,116 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -type UpdateAssetMp4SupportRequest struct { +import ( + "encoding/json" +) + +// UpdateAssetMP4SupportRequest struct for UpdateAssetMP4SupportRequest +type UpdateAssetMP4SupportRequest struct { // String value for the level of mp4 support - Mp4Support string `json:"mp4_support,omitempty"` + Mp4Support *string `json:"mp4_support,omitempty"` +} + +// NewUpdateAssetMP4SupportRequest instantiates a new UpdateAssetMP4SupportRequest 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 NewUpdateAssetMP4SupportRequest() *UpdateAssetMP4SupportRequest { + this := UpdateAssetMP4SupportRequest{} + return &this +} + +// NewUpdateAssetMP4SupportRequestWithDefaults instantiates a new UpdateAssetMP4SupportRequest 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 NewUpdateAssetMP4SupportRequestWithDefaults() *UpdateAssetMP4SupportRequest { + this := UpdateAssetMP4SupportRequest{} + return &this +} + +// GetMp4Support returns the Mp4Support field value if set, zero value otherwise. +func (o *UpdateAssetMP4SupportRequest) GetMp4Support() string { + if o == nil || o.Mp4Support == nil { + var ret string + return ret + } + return *o.Mp4Support +} + +// GetMp4SupportOk returns a tuple with the Mp4Support field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAssetMP4SupportRequest) GetMp4SupportOk() (*string, bool) { + if o == nil || o.Mp4Support == nil { + return nil, false + } + return o.Mp4Support, true } + +// HasMp4Support returns a boolean if a field has been set. +func (o *UpdateAssetMP4SupportRequest) HasMp4Support() bool { + if o != nil && o.Mp4Support != nil { + return true + } + + return false +} + +// SetMp4Support gets a reference to the given string and assigns it to the Mp4Support field. +func (o *UpdateAssetMP4SupportRequest) SetMp4Support(v string) { + o.Mp4Support = &v +} + +func (o UpdateAssetMP4SupportRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Mp4Support != nil { + toSerialize["mp4_support"] = o.Mp4Support + } + return json.Marshal(toSerialize) +} + +type NullableUpdateAssetMP4SupportRequest struct { + value *UpdateAssetMP4SupportRequest + isSet bool +} + +func (v NullableUpdateAssetMP4SupportRequest) Get() *UpdateAssetMP4SupportRequest { + return v.value +} + +func (v *NullableUpdateAssetMP4SupportRequest) Set(val *UpdateAssetMP4SupportRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAssetMP4SupportRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAssetMP4SupportRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAssetMP4SupportRequest(val *UpdateAssetMP4SupportRequest) *NullableUpdateAssetMP4SupportRequest { + return &NullableUpdateAssetMP4SupportRequest{value: val, isSet: true} +} + +func (v NullableUpdateAssetMP4SupportRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAssetMP4SupportRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_upload.go b/model_upload.go index f125f7d..2c7db15 100644 --- a/model_upload.go +++ b/model_upload.go @@ -1,20 +1,413 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// Upload struct for Upload type Upload struct { - Id string `json:"id,omitempty"` + // Unique identifier for the Direct Upload. + Id *string `json:"id,omitempty"` // Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` - Timeout int32 `json:"timeout,omitempty"` - Status string `json:"status,omitempty"` - NewAssetSettings Asset `json:"new_asset_settings,omitempty"` + Timeout *int32 `json:"timeout,omitempty"` + Status *string `json:"status,omitempty"` + NewAssetSettings *Asset `json:"new_asset_settings,omitempty"` // Only set once the upload is in the `asset_created` state. - AssetId string `json:"asset_id,omitempty"` - Error UploadError `json:"error,omitempty"` + AssetId *string `json:"asset_id,omitempty"` + Error *UploadError `json:"error,omitempty"` // If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. - CorsOrigin string `json:"cors_origin,omitempty"` + CorsOrigin *string `json:"cors_origin,omitempty"` // The URL to upload the associated source media to. - Url string `json:"url,omitempty"` - Test bool `json:"test,omitempty"` + Url *string `json:"url,omitempty"` + // Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a `test` Asset. + Test *bool `json:"test,omitempty"` +} + +// NewUpload instantiates a new Upload 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 NewUpload() *Upload { + this := Upload{} + var timeout int32 = 3600 + this.Timeout = &timeout + return &this +} + +// NewUploadWithDefaults instantiates a new Upload 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 NewUploadWithDefaults() *Upload { + this := Upload{} + var timeout int32 = 3600 + this.Timeout = &timeout + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Upload) GetId() string { + if o == nil || o.Id == nil { + 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 *Upload) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Upload) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Upload) SetId(v string) { + o.Id = &v +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *Upload) GetTimeout() int32 { + if o == nil || o.Timeout == nil { + var ret int32 + return ret + } + return *o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upload) GetTimeoutOk() (*int32, bool) { + if o == nil || o.Timeout == nil { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *Upload) HasTimeout() bool { + if o != nil && o.Timeout != nil { + return true + } + + return false +} + +// SetTimeout gets a reference to the given int32 and assigns it to the Timeout field. +func (o *Upload) SetTimeout(v int32) { + o.Timeout = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Upload) GetStatus() string { + if o == nil || o.Status == nil { + 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 *Upload) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Upload) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Upload) SetStatus(v string) { + o.Status = &v +} + +// GetNewAssetSettings returns the NewAssetSettings field value if set, zero value otherwise. +func (o *Upload) GetNewAssetSettings() Asset { + if o == nil || o.NewAssetSettings == nil { + var ret Asset + return ret + } + return *o.NewAssetSettings +} + +// GetNewAssetSettingsOk returns a tuple with the NewAssetSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upload) GetNewAssetSettingsOk() (*Asset, bool) { + if o == nil || o.NewAssetSettings == nil { + return nil, false + } + return o.NewAssetSettings, true } + +// HasNewAssetSettings returns a boolean if a field has been set. +func (o *Upload) HasNewAssetSettings() bool { + if o != nil && o.NewAssetSettings != nil { + return true + } + + return false +} + +// SetNewAssetSettings gets a reference to the given Asset and assigns it to the NewAssetSettings field. +func (o *Upload) SetNewAssetSettings(v Asset) { + o.NewAssetSettings = &v +} + +// GetAssetId returns the AssetId field value if set, zero value otherwise. +func (o *Upload) GetAssetId() string { + if o == nil || o.AssetId == nil { + var ret string + return ret + } + return *o.AssetId +} + +// GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upload) GetAssetIdOk() (*string, bool) { + if o == nil || o.AssetId == nil { + return nil, false + } + return o.AssetId, true +} + +// HasAssetId returns a boolean if a field has been set. +func (o *Upload) HasAssetId() bool { + if o != nil && o.AssetId != nil { + return true + } + + return false +} + +// SetAssetId gets a reference to the given string and assigns it to the AssetId field. +func (o *Upload) SetAssetId(v string) { + o.AssetId = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Upload) GetError() UploadError { + if o == nil || o.Error == nil { + var ret UploadError + 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 *Upload) GetErrorOk() (*UploadError, bool) { + if o == nil || o.Error == nil { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Upload) HasError() bool { + if o != nil && o.Error != nil { + return true + } + + return false +} + +// SetError gets a reference to the given UploadError and assigns it to the Error field. +func (o *Upload) SetError(v UploadError) { + o.Error = &v +} + +// GetCorsOrigin returns the CorsOrigin field value if set, zero value otherwise. +func (o *Upload) GetCorsOrigin() string { + if o == nil || o.CorsOrigin == nil { + var ret string + return ret + } + return *o.CorsOrigin +} + +// GetCorsOriginOk returns a tuple with the CorsOrigin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upload) GetCorsOriginOk() (*string, bool) { + if o == nil || o.CorsOrigin == nil { + return nil, false + } + return o.CorsOrigin, true +} + +// HasCorsOrigin returns a boolean if a field has been set. +func (o *Upload) HasCorsOrigin() bool { + if o != nil && o.CorsOrigin != nil { + return true + } + + return false +} + +// SetCorsOrigin gets a reference to the given string and assigns it to the CorsOrigin field. +func (o *Upload) SetCorsOrigin(v string) { + o.CorsOrigin = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *Upload) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upload) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *Upload) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *Upload) SetUrl(v string) { + o.Url = &v +} + +// GetTest returns the Test field value if set, zero value otherwise. +func (o *Upload) GetTest() bool { + if o == nil || o.Test == nil { + var ret bool + return ret + } + return *o.Test +} + +// GetTestOk returns a tuple with the Test field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Upload) GetTestOk() (*bool, bool) { + if o == nil || o.Test == nil { + return nil, false + } + return o.Test, true +} + +// HasTest returns a boolean if a field has been set. +func (o *Upload) HasTest() bool { + if o != nil && o.Test != nil { + return true + } + + return false +} + +// SetTest gets a reference to the given bool and assigns it to the Test field. +func (o *Upload) SetTest(v bool) { + o.Test = &v +} + +func (o Upload) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Timeout != nil { + toSerialize["timeout"] = o.Timeout + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.NewAssetSettings != nil { + toSerialize["new_asset_settings"] = o.NewAssetSettings + } + if o.AssetId != nil { + toSerialize["asset_id"] = o.AssetId + } + if o.Error != nil { + toSerialize["error"] = o.Error + } + if o.CorsOrigin != nil { + toSerialize["cors_origin"] = o.CorsOrigin + } + if o.Url != nil { + toSerialize["url"] = o.Url + } + if o.Test != nil { + toSerialize["test"] = o.Test + } + return json.Marshal(toSerialize) +} + +type NullableUpload struct { + value *Upload + isSet bool +} + +func (v NullableUpload) Get() *Upload { + return v.value +} + +func (v *NullableUpload) Set(val *Upload) { + v.value = val + v.isSet = true +} + +func (v NullableUpload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpload(val *Upload) *NullableUpload { + return &NullableUpload{value: val, isSet: true} +} + +func (v NullableUpload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_upload_error.go b/model_upload_error.go index f891f65..d8cb415 100644 --- a/model_upload_error.go +++ b/model_upload_error.go @@ -1,10 +1,153 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo -// Only set if an error occurred during asset creation. +import ( + "encoding/json" +) + +// UploadError Only set if an error occurred during asset creation. type UploadError struct { - Type string `json:"type,omitempty"` - Message string `json:"message,omitempty"` + // Label for the specific error + Type *string `json:"type,omitempty"` + // Human readable error message + Message *string `json:"message,omitempty"` +} + +// NewUploadError instantiates a new UploadError 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 NewUploadError() *UploadError { + this := UploadError{} + return &this +} + +// NewUploadErrorWithDefaults instantiates a new UploadError 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 NewUploadErrorWithDefaults() *UploadError { + this := UploadError{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UploadError) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadError) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *UploadError) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *UploadError) SetType(v string) { + o.Type = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *UploadError) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadError) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *UploadError) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false } + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *UploadError) SetMessage(v string) { + o.Message = &v +} + +func (o UploadError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableUploadError struct { + value *UploadError + isSet bool +} + +func (v NullableUploadError) Get() *UploadError { + return v.value +} + +func (v *NullableUploadError) Set(val *UploadError) { + v.value = val + v.isSet = true +} + +func (v NullableUploadError) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadError(val *UploadError) *NullableUploadError { + return &NullableUploadError{value: val, isSet: true} +} + +func (v NullableUploadError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_upload_response.go b/model_upload_response.go index f70211a..8e8b02e 100644 --- a/model_upload_response.go +++ b/model_upload_response.go @@ -1,8 +1,115 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// UploadResponse struct for UploadResponse type UploadResponse struct { - Data Upload `json:"data,omitempty"` + Data *Upload `json:"data,omitempty"` +} + +// NewUploadResponse instantiates a new UploadResponse 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 NewUploadResponse() *UploadResponse { + this := UploadResponse{} + return &this +} + +// NewUploadResponseWithDefaults instantiates a new UploadResponse 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 NewUploadResponseWithDefaults() *UploadResponse { + this := UploadResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *UploadResponse) GetData() Upload { + if o == nil || o.Data == nil { + var ret Upload + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetDataOk() (*Upload, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true } + +// HasData returns a boolean if a field has been set. +func (o *UploadResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given Upload and assigns it to the Data field. +func (o *UploadResponse) SetData(v Upload) { + o.Data = &v +} + +func (o UploadResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableUploadResponse struct { + value *UploadResponse + isSet bool +} + +func (v NullableUploadResponse) Get() *UploadResponse { + return v.value +} + +func (v *NullableUploadResponse) Set(val *UploadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUploadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadResponse(val *UploadResponse) *NullableUploadResponse { + return &NullableUploadResponse{value: val, isSet: true} +} + +func (v NullableUploadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_video_view.go b/model_video_view.go index eb2595c..8ae9f40 100644 --- a/model_video_view.go +++ b/model_video_view.go @@ -1,119 +1,4111 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// VideoView struct for VideoView type VideoView struct { - ViewTotalUpscaling string `json:"view_total_upscaling,omitempty"` - PrerollAdAssetHostname string `json:"preroll_ad_asset_hostname,omitempty"` - PlayerSourceDomain string `json:"player_source_domain,omitempty"` - Region string `json:"region,omitempty"` - ViewerUserAgent string `json:"viewer_user_agent,omitempty"` - PrerollRequested bool `json:"preroll_requested,omitempty"` - PageType string `json:"page_type,omitempty"` - StartupScore string `json:"startup_score,omitempty"` - ViewSeekDuration int64 `json:"view_seek_duration,omitempty"` - CountryName string `json:"country_name,omitempty"` - PlayerSourceHeight int32 `json:"player_source_height,omitempty"` - Longitude string `json:"longitude,omitempty"` - BufferingCount int64 `json:"buffering_count,omitempty"` - VideoDuration int64 `json:"video_duration,omitempty"` - PlayerSourceType string `json:"player_source_type,omitempty"` - City string `json:"city,omitempty"` - ViewId string `json:"view_id,omitempty"` - PlatformDescription string `json:"platform_description,omitempty"` - VideoStartupPrerollRequestTime int64 `json:"video_startup_preroll_request_time,omitempty"` - ViewerDeviceName string `json:"viewer_device_name,omitempty"` - VideoSeries string `json:"video_series,omitempty"` - ViewerApplicationName string `json:"viewer_application_name,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` - ViewTotalContentPlaybackTime int64 `json:"view_total_content_playback_time,omitempty"` - Cdn string `json:"cdn,omitempty"` - PlayerInstanceId string `json:"player_instance_id,omitempty"` - VideoLanguage string `json:"video_language,omitempty"` - PlayerSourceWidth int32 `json:"player_source_width,omitempty"` - PlayerErrorMessage string `json:"player_error_message,omitempty"` - PlayerMuxPluginVersion string `json:"player_mux_plugin_version,omitempty"` - Watched bool `json:"watched,omitempty"` - PlaybackScore string `json:"playback_score,omitempty"` - PageUrl string `json:"page_url,omitempty"` - Metro string `json:"metro,omitempty"` - ViewMaxRequestLatency int64 `json:"view_max_request_latency,omitempty"` - RequestsForFirstPreroll int64 `json:"requests_for_first_preroll,omitempty"` - ViewTotalDownscaling string `json:"view_total_downscaling,omitempty"` - Latitude string `json:"latitude,omitempty"` - PlayerSourceHostName string `json:"player_source_host_name,omitempty"` - InsertedAt string `json:"inserted_at,omitempty"` - ViewEnd string `json:"view_end,omitempty"` - MuxEmbedVersion string `json:"mux_embed_version,omitempty"` - PlayerLanguage string `json:"player_language,omitempty"` - PageLoadTime int64 `json:"page_load_time,omitempty"` - ViewerDeviceCategory string `json:"viewer_device_category,omitempty"` - VideoStartupPrerollLoadTime int64 `json:"video_startup_preroll_load_time,omitempty"` - PlayerVersion string `json:"player_version,omitempty"` - WatchTime int64 `json:"watch_time,omitempty"` - PlayerSourceStreamType string `json:"player_source_stream_type,omitempty"` - PrerollAdTagHostname string `json:"preroll_ad_tag_hostname,omitempty"` - ViewerDeviceManufacturer string `json:"viewer_device_manufacturer,omitempty"` - RebufferingScore string `json:"rebuffering_score,omitempty"` - ExperimentName string `json:"experiment_name,omitempty"` - ViewerOsVersion string `json:"viewer_os_version,omitempty"` - PlayerPreload bool `json:"player_preload,omitempty"` - BufferingDuration int64 `json:"buffering_duration,omitempty"` - PlayerViewCount int64 `json:"player_view_count,omitempty"` - PlayerSoftware string `json:"player_software,omitempty"` - PlayerLoadTime int64 `json:"player_load_time,omitempty"` - PlatformSummary string `json:"platform_summary,omitempty"` - VideoEncodingVariant string `json:"video_encoding_variant,omitempty"` - PlayerWidth int32 `json:"player_width,omitempty"` - ViewSeekCount int64 `json:"view_seek_count,omitempty"` - ViewerExperienceScore string `json:"viewer_experience_score,omitempty"` - ViewErrorId int32 `json:"view_error_id,omitempty"` - VideoVariantName string `json:"video_variant_name,omitempty"` - PrerollPlayed bool `json:"preroll_played,omitempty"` - ViewerApplicationEngine string `json:"viewer_application_engine,omitempty"` - ViewerOsArchitecture string `json:"viewer_os_architecture,omitempty"` - PlayerErrorCode string `json:"player_error_code,omitempty"` - BufferingRate string `json:"buffering_rate,omitempty"` - Events []VideoViewEvent `json:"events,omitempty"` - PlayerName string `json:"player_name,omitempty"` - ViewStart string `json:"view_start,omitempty"` - ViewAverageRequestThroughput int64 `json:"view_average_request_throughput,omitempty"` - VideoProducer string `json:"video_producer,omitempty"` - ErrorTypeId int32 `json:"error_type_id,omitempty"` - MuxViewerId string `json:"mux_viewer_id,omitempty"` - VideoId string `json:"video_id,omitempty"` - ContinentCode string `json:"continent_code,omitempty"` - SessionId string `json:"session_id,omitempty"` - ExitBeforeVideoStart bool `json:"exit_before_video_start,omitempty"` - VideoContentType string `json:"video_content_type,omitempty"` - ViewerOsFamily string `json:"viewer_os_family,omitempty"` - PlayerPoster string `json:"player_poster,omitempty"` - ViewAverageRequestLatency int64 `json:"view_average_request_latency,omitempty"` - VideoVariantId string `json:"video_variant_id,omitempty"` - PlayerSourceDuration int64 `json:"player_source_duration,omitempty"` - PlayerSourceUrl string `json:"player_source_url,omitempty"` - MuxApiVersion string `json:"mux_api_version,omitempty"` - VideoTitle string `json:"video_title,omitempty"` - Id string `json:"id,omitempty"` - ShortTime string `json:"short_time,omitempty"` - RebufferPercentage string `json:"rebuffer_percentage,omitempty"` - TimeToFirstFrame int64 `json:"time_to_first_frame,omitempty"` - ViewerUserId string `json:"viewer_user_id,omitempty"` - VideoStreamType string `json:"video_stream_type,omitempty"` - PlayerStartupTime int64 `json:"player_startup_time,omitempty"` - ViewerApplicationVersion string `json:"viewer_application_version,omitempty"` - ViewMaxDownscalePercentage string `json:"view_max_downscale_percentage,omitempty"` - ViewMaxUpscalePercentage string `json:"view_max_upscale_percentage,omitempty"` - CountryCode string `json:"country_code,omitempty"` - UsedFullscreen bool `json:"used_fullscreen,omitempty"` - Isp string `json:"isp,omitempty"` - PropertyId int64 `json:"property_id,omitempty"` - PlayerAutoplay bool `json:"player_autoplay,omitempty"` - PlayerHeight int32 `json:"player_height,omitempty"` - Asn int64 `json:"asn,omitempty"` - AsnName string `json:"asn_name,omitempty"` - QualityScore string `json:"quality_score,omitempty"` - PlayerSoftwareVersion string `json:"player_software_version,omitempty"` - PlayerMuxPluginName string `json:"player_mux_plugin_name,omitempty"` + ViewTotalUpscaling *string `json:"view_total_upscaling,omitempty"` + PrerollAdAssetHostname *string `json:"preroll_ad_asset_hostname,omitempty"` + PlayerSourceDomain *string `json:"player_source_domain,omitempty"` + Region *string `json:"region,omitempty"` + ViewerUserAgent *string `json:"viewer_user_agent,omitempty"` + PrerollRequested *bool `json:"preroll_requested,omitempty"` + PageType *string `json:"page_type,omitempty"` + StartupScore *string `json:"startup_score,omitempty"` + ViewSeekDuration *int64 `json:"view_seek_duration,omitempty"` + CountryName *string `json:"country_name,omitempty"` + PlayerSourceHeight *int32 `json:"player_source_height,omitempty"` + Longitude *string `json:"longitude,omitempty"` + BufferingCount *int64 `json:"buffering_count,omitempty"` + VideoDuration *int64 `json:"video_duration,omitempty"` + PlayerSourceType *string `json:"player_source_type,omitempty"` + City *string `json:"city,omitempty"` + ViewId *string `json:"view_id,omitempty"` + PlatformDescription *string `json:"platform_description,omitempty"` + VideoStartupPrerollRequestTime *int64 `json:"video_startup_preroll_request_time,omitempty"` + ViewerDeviceName *string `json:"viewer_device_name,omitempty"` + VideoSeries *string `json:"video_series,omitempty"` + ViewerApplicationName *string `json:"viewer_application_name,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + ViewTotalContentPlaybackTime *int64 `json:"view_total_content_playback_time,omitempty"` + Cdn *string `json:"cdn,omitempty"` + PlayerInstanceId *string `json:"player_instance_id,omitempty"` + VideoLanguage *string `json:"video_language,omitempty"` + PlayerSourceWidth *int32 `json:"player_source_width,omitempty"` + PlayerErrorMessage *string `json:"player_error_message,omitempty"` + PlayerMuxPluginVersion *string `json:"player_mux_plugin_version,omitempty"` + Watched *bool `json:"watched,omitempty"` + PlaybackScore *string `json:"playback_score,omitempty"` + PageUrl *string `json:"page_url,omitempty"` + Metro *string `json:"metro,omitempty"` + ViewMaxRequestLatency *int64 `json:"view_max_request_latency,omitempty"` + RequestsForFirstPreroll *int64 `json:"requests_for_first_preroll,omitempty"` + ViewTotalDownscaling *string `json:"view_total_downscaling,omitempty"` + Latitude *string `json:"latitude,omitempty"` + PlayerSourceHostName *string `json:"player_source_host_name,omitempty"` + InsertedAt *string `json:"inserted_at,omitempty"` + ViewEnd *string `json:"view_end,omitempty"` + MuxEmbedVersion *string `json:"mux_embed_version,omitempty"` + PlayerLanguage *string `json:"player_language,omitempty"` + PageLoadTime *int64 `json:"page_load_time,omitempty"` + ViewerDeviceCategory *string `json:"viewer_device_category,omitempty"` + VideoStartupPrerollLoadTime *int64 `json:"video_startup_preroll_load_time,omitempty"` + PlayerVersion *string `json:"player_version,omitempty"` + WatchTime *int64 `json:"watch_time,omitempty"` + PlayerSourceStreamType *string `json:"player_source_stream_type,omitempty"` + PrerollAdTagHostname *string `json:"preroll_ad_tag_hostname,omitempty"` + ViewerDeviceManufacturer *string `json:"viewer_device_manufacturer,omitempty"` + RebufferingScore *string `json:"rebuffering_score,omitempty"` + ExperimentName *string `json:"experiment_name,omitempty"` + ViewerOsVersion *string `json:"viewer_os_version,omitempty"` + PlayerPreload *bool `json:"player_preload,omitempty"` + BufferingDuration *int64 `json:"buffering_duration,omitempty"` + PlayerViewCount *int64 `json:"player_view_count,omitempty"` + PlayerSoftware *string `json:"player_software,omitempty"` + PlayerLoadTime *int64 `json:"player_load_time,omitempty"` + PlatformSummary *string `json:"platform_summary,omitempty"` + VideoEncodingVariant *string `json:"video_encoding_variant,omitempty"` + PlayerWidth *int32 `json:"player_width,omitempty"` + ViewSeekCount *int64 `json:"view_seek_count,omitempty"` + ViewerExperienceScore *string `json:"viewer_experience_score,omitempty"` + ViewErrorId *int32 `json:"view_error_id,omitempty"` + VideoVariantName *string `json:"video_variant_name,omitempty"` + PrerollPlayed *bool `json:"preroll_played,omitempty"` + ViewerApplicationEngine *string `json:"viewer_application_engine,omitempty"` + ViewerOsArchitecture *string `json:"viewer_os_architecture,omitempty"` + PlayerErrorCode *string `json:"player_error_code,omitempty"` + BufferingRate *string `json:"buffering_rate,omitempty"` + Events *[]VideoViewEvent `json:"events,omitempty"` + PlayerName *string `json:"player_name,omitempty"` + ViewStart *string `json:"view_start,omitempty"` + ViewAverageRequestThroughput *int64 `json:"view_average_request_throughput,omitempty"` + VideoProducer *string `json:"video_producer,omitempty"` + ErrorTypeId *int32 `json:"error_type_id,omitempty"` + MuxViewerId *string `json:"mux_viewer_id,omitempty"` + VideoId *string `json:"video_id,omitempty"` + ContinentCode *string `json:"continent_code,omitempty"` + SessionId *string `json:"session_id,omitempty"` + ExitBeforeVideoStart *bool `json:"exit_before_video_start,omitempty"` + VideoContentType *string `json:"video_content_type,omitempty"` + ViewerOsFamily *string `json:"viewer_os_family,omitempty"` + PlayerPoster *string `json:"player_poster,omitempty"` + ViewAverageRequestLatency *int64 `json:"view_average_request_latency,omitempty"` + VideoVariantId *string `json:"video_variant_id,omitempty"` + PlayerSourceDuration *int64 `json:"player_source_duration,omitempty"` + PlayerSourceUrl *string `json:"player_source_url,omitempty"` + MuxApiVersion *string `json:"mux_api_version,omitempty"` + VideoTitle *string `json:"video_title,omitempty"` + Id *string `json:"id,omitempty"` + ShortTime *string `json:"short_time,omitempty"` + RebufferPercentage *string `json:"rebuffer_percentage,omitempty"` + TimeToFirstFrame *int64 `json:"time_to_first_frame,omitempty"` + ViewerUserId *string `json:"viewer_user_id,omitempty"` + VideoStreamType *string `json:"video_stream_type,omitempty"` + PlayerStartupTime *int64 `json:"player_startup_time,omitempty"` + ViewerApplicationVersion *string `json:"viewer_application_version,omitempty"` + ViewMaxDownscalePercentage *string `json:"view_max_downscale_percentage,omitempty"` + ViewMaxUpscalePercentage *string `json:"view_max_upscale_percentage,omitempty"` + CountryCode *string `json:"country_code,omitempty"` + UsedFullscreen *bool `json:"used_fullscreen,omitempty"` + Isp *string `json:"isp,omitempty"` + PropertyId *int64 `json:"property_id,omitempty"` + PlayerAutoplay *bool `json:"player_autoplay,omitempty"` + PlayerHeight *int32 `json:"player_height,omitempty"` + Asn *int64 `json:"asn,omitempty"` + AsnName *string `json:"asn_name,omitempty"` + QualityScore *string `json:"quality_score,omitempty"` + PlayerSoftwareVersion *string `json:"player_software_version,omitempty"` + PlayerMuxPluginName *string `json:"player_mux_plugin_name,omitempty"` +} + +// NewVideoView instantiates a new VideoView 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 NewVideoView() *VideoView { + this := VideoView{} + return &this +} + +// NewVideoViewWithDefaults instantiates a new VideoView 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 NewVideoViewWithDefaults() *VideoView { + this := VideoView{} + return &this +} + +// GetViewTotalUpscaling returns the ViewTotalUpscaling field value if set, zero value otherwise. +func (o *VideoView) GetViewTotalUpscaling() string { + if o == nil || o.ViewTotalUpscaling == nil { + var ret string + return ret + } + return *o.ViewTotalUpscaling +} + +// GetViewTotalUpscalingOk returns a tuple with the ViewTotalUpscaling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewTotalUpscalingOk() (*string, bool) { + if o == nil || o.ViewTotalUpscaling == nil { + return nil, false + } + return o.ViewTotalUpscaling, true +} + +// HasViewTotalUpscaling returns a boolean if a field has been set. +func (o *VideoView) HasViewTotalUpscaling() bool { + if o != nil && o.ViewTotalUpscaling != nil { + return true + } + + return false +} + +// SetViewTotalUpscaling gets a reference to the given string and assigns it to the ViewTotalUpscaling field. +func (o *VideoView) SetViewTotalUpscaling(v string) { + o.ViewTotalUpscaling = &v +} + +// GetPrerollAdAssetHostname returns the PrerollAdAssetHostname field value if set, zero value otherwise. +func (o *VideoView) GetPrerollAdAssetHostname() string { + if o == nil || o.PrerollAdAssetHostname == nil { + var ret string + return ret + } + return *o.PrerollAdAssetHostname +} + +// GetPrerollAdAssetHostnameOk returns a tuple with the PrerollAdAssetHostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPrerollAdAssetHostnameOk() (*string, bool) { + if o == nil || o.PrerollAdAssetHostname == nil { + return nil, false + } + return o.PrerollAdAssetHostname, true +} + +// HasPrerollAdAssetHostname returns a boolean if a field has been set. +func (o *VideoView) HasPrerollAdAssetHostname() bool { + if o != nil && o.PrerollAdAssetHostname != nil { + return true + } + + return false +} + +// SetPrerollAdAssetHostname gets a reference to the given string and assigns it to the PrerollAdAssetHostname field. +func (o *VideoView) SetPrerollAdAssetHostname(v string) { + o.PrerollAdAssetHostname = &v +} + +// GetPlayerSourceDomain returns the PlayerSourceDomain field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceDomain() string { + if o == nil || o.PlayerSourceDomain == nil { + var ret string + return ret + } + return *o.PlayerSourceDomain +} + +// GetPlayerSourceDomainOk returns a tuple with the PlayerSourceDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceDomainOk() (*string, bool) { + if o == nil || o.PlayerSourceDomain == nil { + return nil, false + } + return o.PlayerSourceDomain, true +} + +// HasPlayerSourceDomain returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceDomain() bool { + if o != nil && o.PlayerSourceDomain != nil { + return true + } + + return false +} + +// SetPlayerSourceDomain gets a reference to the given string and assigns it to the PlayerSourceDomain field. +func (o *VideoView) SetPlayerSourceDomain(v string) { + o.PlayerSourceDomain = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *VideoView) GetRegion() string { + if o == nil || o.Region == nil { + 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 *VideoView) GetRegionOk() (*string, bool) { + if o == nil || o.Region == nil { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *VideoView) HasRegion() bool { + if o != nil && o.Region != nil { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *VideoView) SetRegion(v string) { + o.Region = &v +} + +// GetViewerUserAgent returns the ViewerUserAgent field value if set, zero value otherwise. +func (o *VideoView) GetViewerUserAgent() string { + if o == nil || o.ViewerUserAgent == nil { + var ret string + return ret + } + return *o.ViewerUserAgent +} + +// GetViewerUserAgentOk returns a tuple with the ViewerUserAgent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerUserAgentOk() (*string, bool) { + if o == nil || o.ViewerUserAgent == nil { + return nil, false + } + return o.ViewerUserAgent, true +} + +// HasViewerUserAgent returns a boolean if a field has been set. +func (o *VideoView) HasViewerUserAgent() bool { + if o != nil && o.ViewerUserAgent != nil { + return true + } + + return false +} + +// SetViewerUserAgent gets a reference to the given string and assigns it to the ViewerUserAgent field. +func (o *VideoView) SetViewerUserAgent(v string) { + o.ViewerUserAgent = &v +} + +// GetPrerollRequested returns the PrerollRequested field value if set, zero value otherwise. +func (o *VideoView) GetPrerollRequested() bool { + if o == nil || o.PrerollRequested == nil { + var ret bool + return ret + } + return *o.PrerollRequested +} + +// GetPrerollRequestedOk returns a tuple with the PrerollRequested field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPrerollRequestedOk() (*bool, bool) { + if o == nil || o.PrerollRequested == nil { + return nil, false + } + return o.PrerollRequested, true +} + +// HasPrerollRequested returns a boolean if a field has been set. +func (o *VideoView) HasPrerollRequested() bool { + if o != nil && o.PrerollRequested != nil { + return true + } + + return false +} + +// SetPrerollRequested gets a reference to the given bool and assigns it to the PrerollRequested field. +func (o *VideoView) SetPrerollRequested(v bool) { + o.PrerollRequested = &v +} + +// GetPageType returns the PageType field value if set, zero value otherwise. +func (o *VideoView) GetPageType() string { + if o == nil || o.PageType == nil { + var ret string + return ret + } + return *o.PageType +} + +// GetPageTypeOk returns a tuple with the PageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPageTypeOk() (*string, bool) { + if o == nil || o.PageType == nil { + return nil, false + } + return o.PageType, true +} + +// HasPageType returns a boolean if a field has been set. +func (o *VideoView) HasPageType() bool { + if o != nil && o.PageType != nil { + return true + } + + return false +} + +// SetPageType gets a reference to the given string and assigns it to the PageType field. +func (o *VideoView) SetPageType(v string) { + o.PageType = &v +} + +// GetStartupScore returns the StartupScore field value if set, zero value otherwise. +func (o *VideoView) GetStartupScore() string { + if o == nil || o.StartupScore == nil { + var ret string + return ret + } + return *o.StartupScore +} + +// GetStartupScoreOk returns a tuple with the StartupScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetStartupScoreOk() (*string, bool) { + if o == nil || o.StartupScore == nil { + return nil, false + } + return o.StartupScore, true +} + +// HasStartupScore returns a boolean if a field has been set. +func (o *VideoView) HasStartupScore() bool { + if o != nil && o.StartupScore != nil { + return true + } + + return false +} + +// SetStartupScore gets a reference to the given string and assigns it to the StartupScore field. +func (o *VideoView) SetStartupScore(v string) { + o.StartupScore = &v +} + +// GetViewSeekDuration returns the ViewSeekDuration field value if set, zero value otherwise. +func (o *VideoView) GetViewSeekDuration() int64 { + if o == nil || o.ViewSeekDuration == nil { + var ret int64 + return ret + } + return *o.ViewSeekDuration +} + +// GetViewSeekDurationOk returns a tuple with the ViewSeekDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewSeekDurationOk() (*int64, bool) { + if o == nil || o.ViewSeekDuration == nil { + return nil, false + } + return o.ViewSeekDuration, true +} + +// HasViewSeekDuration returns a boolean if a field has been set. +func (o *VideoView) HasViewSeekDuration() bool { + if o != nil && o.ViewSeekDuration != nil { + return true + } + + return false +} + +// SetViewSeekDuration gets a reference to the given int64 and assigns it to the ViewSeekDuration field. +func (o *VideoView) SetViewSeekDuration(v int64) { + o.ViewSeekDuration = &v +} + +// GetCountryName returns the CountryName field value if set, zero value otherwise. +func (o *VideoView) GetCountryName() string { + if o == nil || o.CountryName == nil { + var ret string + return ret + } + return *o.CountryName +} + +// GetCountryNameOk returns a tuple with the CountryName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetCountryNameOk() (*string, bool) { + if o == nil || o.CountryName == nil { + return nil, false + } + return o.CountryName, true +} + +// HasCountryName returns a boolean if a field has been set. +func (o *VideoView) HasCountryName() bool { + if o != nil && o.CountryName != nil { + return true + } + + return false +} + +// SetCountryName gets a reference to the given string and assigns it to the CountryName field. +func (o *VideoView) SetCountryName(v string) { + o.CountryName = &v +} + +// GetPlayerSourceHeight returns the PlayerSourceHeight field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceHeight() int32 { + if o == nil || o.PlayerSourceHeight == nil { + var ret int32 + return ret + } + return *o.PlayerSourceHeight +} + +// GetPlayerSourceHeightOk returns a tuple with the PlayerSourceHeight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceHeightOk() (*int32, bool) { + if o == nil || o.PlayerSourceHeight == nil { + return nil, false + } + return o.PlayerSourceHeight, true +} + +// HasPlayerSourceHeight returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceHeight() bool { + if o != nil && o.PlayerSourceHeight != nil { + return true + } + + return false +} + +// SetPlayerSourceHeight gets a reference to the given int32 and assigns it to the PlayerSourceHeight field. +func (o *VideoView) SetPlayerSourceHeight(v int32) { + o.PlayerSourceHeight = &v +} + +// GetLongitude returns the Longitude field value if set, zero value otherwise. +func (o *VideoView) GetLongitude() string { + if o == nil || o.Longitude == nil { + var ret string + return ret + } + return *o.Longitude +} + +// GetLongitudeOk returns a tuple with the Longitude field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetLongitudeOk() (*string, bool) { + if o == nil || o.Longitude == nil { + return nil, false + } + return o.Longitude, true +} + +// HasLongitude returns a boolean if a field has been set. +func (o *VideoView) HasLongitude() bool { + if o != nil && o.Longitude != nil { + return true + } + + return false +} + +// SetLongitude gets a reference to the given string and assigns it to the Longitude field. +func (o *VideoView) SetLongitude(v string) { + o.Longitude = &v +} + +// GetBufferingCount returns the BufferingCount field value if set, zero value otherwise. +func (o *VideoView) GetBufferingCount() int64 { + if o == nil || o.BufferingCount == nil { + var ret int64 + return ret + } + return *o.BufferingCount +} + +// GetBufferingCountOk returns a tuple with the BufferingCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetBufferingCountOk() (*int64, bool) { + if o == nil || o.BufferingCount == nil { + return nil, false + } + return o.BufferingCount, true +} + +// HasBufferingCount returns a boolean if a field has been set. +func (o *VideoView) HasBufferingCount() bool { + if o != nil && o.BufferingCount != nil { + return true + } + + return false +} + +// SetBufferingCount gets a reference to the given int64 and assigns it to the BufferingCount field. +func (o *VideoView) SetBufferingCount(v int64) { + o.BufferingCount = &v +} + +// GetVideoDuration returns the VideoDuration field value if set, zero value otherwise. +func (o *VideoView) GetVideoDuration() int64 { + if o == nil || o.VideoDuration == nil { + var ret int64 + return ret + } + return *o.VideoDuration +} + +// GetVideoDurationOk returns a tuple with the VideoDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoDurationOk() (*int64, bool) { + if o == nil || o.VideoDuration == nil { + return nil, false + } + return o.VideoDuration, true +} + +// HasVideoDuration returns a boolean if a field has been set. +func (o *VideoView) HasVideoDuration() bool { + if o != nil && o.VideoDuration != nil { + return true + } + + return false +} + +// SetVideoDuration gets a reference to the given int64 and assigns it to the VideoDuration field. +func (o *VideoView) SetVideoDuration(v int64) { + o.VideoDuration = &v +} + +// GetPlayerSourceType returns the PlayerSourceType field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceType() string { + if o == nil || o.PlayerSourceType == nil { + var ret string + return ret + } + return *o.PlayerSourceType +} + +// GetPlayerSourceTypeOk returns a tuple with the PlayerSourceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceTypeOk() (*string, bool) { + if o == nil || o.PlayerSourceType == nil { + return nil, false + } + return o.PlayerSourceType, true +} + +// HasPlayerSourceType returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceType() bool { + if o != nil && o.PlayerSourceType != nil { + return true + } + + return false +} + +// SetPlayerSourceType gets a reference to the given string and assigns it to the PlayerSourceType field. +func (o *VideoView) SetPlayerSourceType(v string) { + o.PlayerSourceType = &v +} + +// GetCity returns the City field value if set, zero value otherwise. +func (o *VideoView) GetCity() string { + if o == nil || o.City == nil { + var ret string + return ret + } + return *o.City +} + +// GetCityOk returns a tuple with the City field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetCityOk() (*string, bool) { + if o == nil || o.City == nil { + return nil, false + } + return o.City, true +} + +// HasCity returns a boolean if a field has been set. +func (o *VideoView) HasCity() bool { + if o != nil && o.City != nil { + return true + } + + return false +} + +// SetCity gets a reference to the given string and assigns it to the City field. +func (o *VideoView) SetCity(v string) { + o.City = &v +} + +// GetViewId returns the ViewId field value if set, zero value otherwise. +func (o *VideoView) GetViewId() string { + if o == nil || o.ViewId == nil { + var ret string + return ret + } + return *o.ViewId +} + +// GetViewIdOk returns a tuple with the ViewId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewIdOk() (*string, bool) { + if o == nil || o.ViewId == nil { + return nil, false + } + return o.ViewId, true +} + +// HasViewId returns a boolean if a field has been set. +func (o *VideoView) HasViewId() bool { + if o != nil && o.ViewId != nil { + return true + } + + return false +} + +// SetViewId gets a reference to the given string and assigns it to the ViewId field. +func (o *VideoView) SetViewId(v string) { + o.ViewId = &v +} + +// GetPlatformDescription returns the PlatformDescription field value if set, zero value otherwise. +func (o *VideoView) GetPlatformDescription() string { + if o == nil || o.PlatformDescription == nil { + var ret string + return ret + } + return *o.PlatformDescription +} + +// GetPlatformDescriptionOk returns a tuple with the PlatformDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlatformDescriptionOk() (*string, bool) { + if o == nil || o.PlatformDescription == nil { + return nil, false + } + return o.PlatformDescription, true +} + +// HasPlatformDescription returns a boolean if a field has been set. +func (o *VideoView) HasPlatformDescription() bool { + if o != nil && o.PlatformDescription != nil { + return true + } + + return false +} + +// SetPlatformDescription gets a reference to the given string and assigns it to the PlatformDescription field. +func (o *VideoView) SetPlatformDescription(v string) { + o.PlatformDescription = &v +} + +// GetVideoStartupPrerollRequestTime returns the VideoStartupPrerollRequestTime field value if set, zero value otherwise. +func (o *VideoView) GetVideoStartupPrerollRequestTime() int64 { + if o == nil || o.VideoStartupPrerollRequestTime == nil { + var ret int64 + return ret + } + return *o.VideoStartupPrerollRequestTime +} + +// GetVideoStartupPrerollRequestTimeOk returns a tuple with the VideoStartupPrerollRequestTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoStartupPrerollRequestTimeOk() (*int64, bool) { + if o == nil || o.VideoStartupPrerollRequestTime == nil { + return nil, false + } + return o.VideoStartupPrerollRequestTime, true +} + +// HasVideoStartupPrerollRequestTime returns a boolean if a field has been set. +func (o *VideoView) HasVideoStartupPrerollRequestTime() bool { + if o != nil && o.VideoStartupPrerollRequestTime != nil { + return true + } + + return false +} + +// SetVideoStartupPrerollRequestTime gets a reference to the given int64 and assigns it to the VideoStartupPrerollRequestTime field. +func (o *VideoView) SetVideoStartupPrerollRequestTime(v int64) { + o.VideoStartupPrerollRequestTime = &v +} + +// GetViewerDeviceName returns the ViewerDeviceName field value if set, zero value otherwise. +func (o *VideoView) GetViewerDeviceName() string { + if o == nil || o.ViewerDeviceName == nil { + var ret string + return ret + } + return *o.ViewerDeviceName +} + +// GetViewerDeviceNameOk returns a tuple with the ViewerDeviceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerDeviceNameOk() (*string, bool) { + if o == nil || o.ViewerDeviceName == nil { + return nil, false + } + return o.ViewerDeviceName, true +} + +// HasViewerDeviceName returns a boolean if a field has been set. +func (o *VideoView) HasViewerDeviceName() bool { + if o != nil && o.ViewerDeviceName != nil { + return true + } + + return false +} + +// SetViewerDeviceName gets a reference to the given string and assigns it to the ViewerDeviceName field. +func (o *VideoView) SetViewerDeviceName(v string) { + o.ViewerDeviceName = &v +} + +// GetVideoSeries returns the VideoSeries field value if set, zero value otherwise. +func (o *VideoView) GetVideoSeries() string { + if o == nil || o.VideoSeries == nil { + var ret string + return ret + } + return *o.VideoSeries +} + +// GetVideoSeriesOk returns a tuple with the VideoSeries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoSeriesOk() (*string, bool) { + if o == nil || o.VideoSeries == nil { + return nil, false + } + return o.VideoSeries, true +} + +// HasVideoSeries returns a boolean if a field has been set. +func (o *VideoView) HasVideoSeries() bool { + if o != nil && o.VideoSeries != nil { + return true + } + + return false +} + +// SetVideoSeries gets a reference to the given string and assigns it to the VideoSeries field. +func (o *VideoView) SetVideoSeries(v string) { + o.VideoSeries = &v +} + +// GetViewerApplicationName returns the ViewerApplicationName field value if set, zero value otherwise. +func (o *VideoView) GetViewerApplicationName() string { + if o == nil || o.ViewerApplicationName == nil { + var ret string + return ret + } + return *o.ViewerApplicationName +} + +// GetViewerApplicationNameOk returns a tuple with the ViewerApplicationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerApplicationNameOk() (*string, bool) { + if o == nil || o.ViewerApplicationName == nil { + return nil, false + } + return o.ViewerApplicationName, true +} + +// HasViewerApplicationName returns a boolean if a field has been set. +func (o *VideoView) HasViewerApplicationName() bool { + if o != nil && o.ViewerApplicationName != nil { + return true + } + + return false +} + +// SetViewerApplicationName gets a reference to the given string and assigns it to the ViewerApplicationName field. +func (o *VideoView) SetViewerApplicationName(v string) { + o.ViewerApplicationName = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *VideoView) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *VideoView) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *VideoView) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetViewTotalContentPlaybackTime returns the ViewTotalContentPlaybackTime field value if set, zero value otherwise. +func (o *VideoView) GetViewTotalContentPlaybackTime() int64 { + if o == nil || o.ViewTotalContentPlaybackTime == nil { + var ret int64 + return ret + } + return *o.ViewTotalContentPlaybackTime +} + +// GetViewTotalContentPlaybackTimeOk returns a tuple with the ViewTotalContentPlaybackTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewTotalContentPlaybackTimeOk() (*int64, bool) { + if o == nil || o.ViewTotalContentPlaybackTime == nil { + return nil, false + } + return o.ViewTotalContentPlaybackTime, true +} + +// HasViewTotalContentPlaybackTime returns a boolean if a field has been set. +func (o *VideoView) HasViewTotalContentPlaybackTime() bool { + if o != nil && o.ViewTotalContentPlaybackTime != nil { + return true + } + + return false +} + +// SetViewTotalContentPlaybackTime gets a reference to the given int64 and assigns it to the ViewTotalContentPlaybackTime field. +func (o *VideoView) SetViewTotalContentPlaybackTime(v int64) { + o.ViewTotalContentPlaybackTime = &v +} + +// GetCdn returns the Cdn field value if set, zero value otherwise. +func (o *VideoView) GetCdn() string { + if o == nil || o.Cdn == nil { + var ret string + return ret + } + return *o.Cdn +} + +// GetCdnOk returns a tuple with the Cdn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetCdnOk() (*string, bool) { + if o == nil || o.Cdn == nil { + return nil, false + } + return o.Cdn, true +} + +// HasCdn returns a boolean if a field has been set. +func (o *VideoView) HasCdn() bool { + if o != nil && o.Cdn != nil { + return true + } + + return false +} + +// SetCdn gets a reference to the given string and assigns it to the Cdn field. +func (o *VideoView) SetCdn(v string) { + o.Cdn = &v +} + +// GetPlayerInstanceId returns the PlayerInstanceId field value if set, zero value otherwise. +func (o *VideoView) GetPlayerInstanceId() string { + if o == nil || o.PlayerInstanceId == nil { + var ret string + return ret + } + return *o.PlayerInstanceId +} + +// GetPlayerInstanceIdOk returns a tuple with the PlayerInstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerInstanceIdOk() (*string, bool) { + if o == nil || o.PlayerInstanceId == nil { + return nil, false + } + return o.PlayerInstanceId, true +} + +// HasPlayerInstanceId returns a boolean if a field has been set. +func (o *VideoView) HasPlayerInstanceId() bool { + if o != nil && o.PlayerInstanceId != nil { + return true + } + + return false +} + +// SetPlayerInstanceId gets a reference to the given string and assigns it to the PlayerInstanceId field. +func (o *VideoView) SetPlayerInstanceId(v string) { + o.PlayerInstanceId = &v +} + +// GetVideoLanguage returns the VideoLanguage field value if set, zero value otherwise. +func (o *VideoView) GetVideoLanguage() string { + if o == nil || o.VideoLanguage == nil { + var ret string + return ret + } + return *o.VideoLanguage +} + +// GetVideoLanguageOk returns a tuple with the VideoLanguage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoLanguageOk() (*string, bool) { + if o == nil || o.VideoLanguage == nil { + return nil, false + } + return o.VideoLanguage, true +} + +// HasVideoLanguage returns a boolean if a field has been set. +func (o *VideoView) HasVideoLanguage() bool { + if o != nil && o.VideoLanguage != nil { + return true + } + + return false +} + +// SetVideoLanguage gets a reference to the given string and assigns it to the VideoLanguage field. +func (o *VideoView) SetVideoLanguage(v string) { + o.VideoLanguage = &v +} + +// GetPlayerSourceWidth returns the PlayerSourceWidth field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceWidth() int32 { + if o == nil || o.PlayerSourceWidth == nil { + var ret int32 + return ret + } + return *o.PlayerSourceWidth +} + +// GetPlayerSourceWidthOk returns a tuple with the PlayerSourceWidth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceWidthOk() (*int32, bool) { + if o == nil || o.PlayerSourceWidth == nil { + return nil, false + } + return o.PlayerSourceWidth, true +} + +// HasPlayerSourceWidth returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceWidth() bool { + if o != nil && o.PlayerSourceWidth != nil { + return true + } + + return false } + +// SetPlayerSourceWidth gets a reference to the given int32 and assigns it to the PlayerSourceWidth field. +func (o *VideoView) SetPlayerSourceWidth(v int32) { + o.PlayerSourceWidth = &v +} + +// GetPlayerErrorMessage returns the PlayerErrorMessage field value if set, zero value otherwise. +func (o *VideoView) GetPlayerErrorMessage() string { + if o == nil || o.PlayerErrorMessage == nil { + var ret string + return ret + } + return *o.PlayerErrorMessage +} + +// GetPlayerErrorMessageOk returns a tuple with the PlayerErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerErrorMessageOk() (*string, bool) { + if o == nil || o.PlayerErrorMessage == nil { + return nil, false + } + return o.PlayerErrorMessage, true +} + +// HasPlayerErrorMessage returns a boolean if a field has been set. +func (o *VideoView) HasPlayerErrorMessage() bool { + if o != nil && o.PlayerErrorMessage != nil { + return true + } + + return false +} + +// SetPlayerErrorMessage gets a reference to the given string and assigns it to the PlayerErrorMessage field. +func (o *VideoView) SetPlayerErrorMessage(v string) { + o.PlayerErrorMessage = &v +} + +// GetPlayerMuxPluginVersion returns the PlayerMuxPluginVersion field value if set, zero value otherwise. +func (o *VideoView) GetPlayerMuxPluginVersion() string { + if o == nil || o.PlayerMuxPluginVersion == nil { + var ret string + return ret + } + return *o.PlayerMuxPluginVersion +} + +// GetPlayerMuxPluginVersionOk returns a tuple with the PlayerMuxPluginVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerMuxPluginVersionOk() (*string, bool) { + if o == nil || o.PlayerMuxPluginVersion == nil { + return nil, false + } + return o.PlayerMuxPluginVersion, true +} + +// HasPlayerMuxPluginVersion returns a boolean if a field has been set. +func (o *VideoView) HasPlayerMuxPluginVersion() bool { + if o != nil && o.PlayerMuxPluginVersion != nil { + return true + } + + return false +} + +// SetPlayerMuxPluginVersion gets a reference to the given string and assigns it to the PlayerMuxPluginVersion field. +func (o *VideoView) SetPlayerMuxPluginVersion(v string) { + o.PlayerMuxPluginVersion = &v +} + +// GetWatched returns the Watched field value if set, zero value otherwise. +func (o *VideoView) GetWatched() bool { + if o == nil || o.Watched == nil { + var ret bool + return ret + } + return *o.Watched +} + +// GetWatchedOk returns a tuple with the Watched field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetWatchedOk() (*bool, bool) { + if o == nil || o.Watched == nil { + return nil, false + } + return o.Watched, true +} + +// HasWatched returns a boolean if a field has been set. +func (o *VideoView) HasWatched() bool { + if o != nil && o.Watched != nil { + return true + } + + return false +} + +// SetWatched gets a reference to the given bool and assigns it to the Watched field. +func (o *VideoView) SetWatched(v bool) { + o.Watched = &v +} + +// GetPlaybackScore returns the PlaybackScore field value if set, zero value otherwise. +func (o *VideoView) GetPlaybackScore() string { + if o == nil || o.PlaybackScore == nil { + var ret string + return ret + } + return *o.PlaybackScore +} + +// GetPlaybackScoreOk returns a tuple with the PlaybackScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlaybackScoreOk() (*string, bool) { + if o == nil || o.PlaybackScore == nil { + return nil, false + } + return o.PlaybackScore, true +} + +// HasPlaybackScore returns a boolean if a field has been set. +func (o *VideoView) HasPlaybackScore() bool { + if o != nil && o.PlaybackScore != nil { + return true + } + + return false +} + +// SetPlaybackScore gets a reference to the given string and assigns it to the PlaybackScore field. +func (o *VideoView) SetPlaybackScore(v string) { + o.PlaybackScore = &v +} + +// GetPageUrl returns the PageUrl field value if set, zero value otherwise. +func (o *VideoView) GetPageUrl() string { + if o == nil || o.PageUrl == nil { + var ret string + return ret + } + return *o.PageUrl +} + +// GetPageUrlOk returns a tuple with the PageUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPageUrlOk() (*string, bool) { + if o == nil || o.PageUrl == nil { + return nil, false + } + return o.PageUrl, true +} + +// HasPageUrl returns a boolean if a field has been set. +func (o *VideoView) HasPageUrl() bool { + if o != nil && o.PageUrl != nil { + return true + } + + return false +} + +// SetPageUrl gets a reference to the given string and assigns it to the PageUrl field. +func (o *VideoView) SetPageUrl(v string) { + o.PageUrl = &v +} + +// GetMetro returns the Metro field value if set, zero value otherwise. +func (o *VideoView) GetMetro() string { + if o == nil || o.Metro == nil { + var ret string + return ret + } + return *o.Metro +} + +// GetMetroOk returns a tuple with the Metro field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetMetroOk() (*string, bool) { + if o == nil || o.Metro == nil { + return nil, false + } + return o.Metro, true +} + +// HasMetro returns a boolean if a field has been set. +func (o *VideoView) HasMetro() bool { + if o != nil && o.Metro != nil { + return true + } + + return false +} + +// SetMetro gets a reference to the given string and assigns it to the Metro field. +func (o *VideoView) SetMetro(v string) { + o.Metro = &v +} + +// GetViewMaxRequestLatency returns the ViewMaxRequestLatency field value if set, zero value otherwise. +func (o *VideoView) GetViewMaxRequestLatency() int64 { + if o == nil || o.ViewMaxRequestLatency == nil { + var ret int64 + return ret + } + return *o.ViewMaxRequestLatency +} + +// GetViewMaxRequestLatencyOk returns a tuple with the ViewMaxRequestLatency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewMaxRequestLatencyOk() (*int64, bool) { + if o == nil || o.ViewMaxRequestLatency == nil { + return nil, false + } + return o.ViewMaxRequestLatency, true +} + +// HasViewMaxRequestLatency returns a boolean if a field has been set. +func (o *VideoView) HasViewMaxRequestLatency() bool { + if o != nil && o.ViewMaxRequestLatency != nil { + return true + } + + return false +} + +// SetViewMaxRequestLatency gets a reference to the given int64 and assigns it to the ViewMaxRequestLatency field. +func (o *VideoView) SetViewMaxRequestLatency(v int64) { + o.ViewMaxRequestLatency = &v +} + +// GetRequestsForFirstPreroll returns the RequestsForFirstPreroll field value if set, zero value otherwise. +func (o *VideoView) GetRequestsForFirstPreroll() int64 { + if o == nil || o.RequestsForFirstPreroll == nil { + var ret int64 + return ret + } + return *o.RequestsForFirstPreroll +} + +// GetRequestsForFirstPrerollOk returns a tuple with the RequestsForFirstPreroll field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetRequestsForFirstPrerollOk() (*int64, bool) { + if o == nil || o.RequestsForFirstPreroll == nil { + return nil, false + } + return o.RequestsForFirstPreroll, true +} + +// HasRequestsForFirstPreroll returns a boolean if a field has been set. +func (o *VideoView) HasRequestsForFirstPreroll() bool { + if o != nil && o.RequestsForFirstPreroll != nil { + return true + } + + return false +} + +// SetRequestsForFirstPreroll gets a reference to the given int64 and assigns it to the RequestsForFirstPreroll field. +func (o *VideoView) SetRequestsForFirstPreroll(v int64) { + o.RequestsForFirstPreroll = &v +} + +// GetViewTotalDownscaling returns the ViewTotalDownscaling field value if set, zero value otherwise. +func (o *VideoView) GetViewTotalDownscaling() string { + if o == nil || o.ViewTotalDownscaling == nil { + var ret string + return ret + } + return *o.ViewTotalDownscaling +} + +// GetViewTotalDownscalingOk returns a tuple with the ViewTotalDownscaling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewTotalDownscalingOk() (*string, bool) { + if o == nil || o.ViewTotalDownscaling == nil { + return nil, false + } + return o.ViewTotalDownscaling, true +} + +// HasViewTotalDownscaling returns a boolean if a field has been set. +func (o *VideoView) HasViewTotalDownscaling() bool { + if o != nil && o.ViewTotalDownscaling != nil { + return true + } + + return false +} + +// SetViewTotalDownscaling gets a reference to the given string and assigns it to the ViewTotalDownscaling field. +func (o *VideoView) SetViewTotalDownscaling(v string) { + o.ViewTotalDownscaling = &v +} + +// GetLatitude returns the Latitude field value if set, zero value otherwise. +func (o *VideoView) GetLatitude() string { + if o == nil || o.Latitude == nil { + var ret string + return ret + } + return *o.Latitude +} + +// GetLatitudeOk returns a tuple with the Latitude field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetLatitudeOk() (*string, bool) { + if o == nil || o.Latitude == nil { + return nil, false + } + return o.Latitude, true +} + +// HasLatitude returns a boolean if a field has been set. +func (o *VideoView) HasLatitude() bool { + if o != nil && o.Latitude != nil { + return true + } + + return false +} + +// SetLatitude gets a reference to the given string and assigns it to the Latitude field. +func (o *VideoView) SetLatitude(v string) { + o.Latitude = &v +} + +// GetPlayerSourceHostName returns the PlayerSourceHostName field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceHostName() string { + if o == nil || o.PlayerSourceHostName == nil { + var ret string + return ret + } + return *o.PlayerSourceHostName +} + +// GetPlayerSourceHostNameOk returns a tuple with the PlayerSourceHostName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceHostNameOk() (*string, bool) { + if o == nil || o.PlayerSourceHostName == nil { + return nil, false + } + return o.PlayerSourceHostName, true +} + +// HasPlayerSourceHostName returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceHostName() bool { + if o != nil && o.PlayerSourceHostName != nil { + return true + } + + return false +} + +// SetPlayerSourceHostName gets a reference to the given string and assigns it to the PlayerSourceHostName field. +func (o *VideoView) SetPlayerSourceHostName(v string) { + o.PlayerSourceHostName = &v +} + +// GetInsertedAt returns the InsertedAt field value if set, zero value otherwise. +func (o *VideoView) GetInsertedAt() string { + if o == nil || o.InsertedAt == nil { + var ret string + return ret + } + return *o.InsertedAt +} + +// GetInsertedAtOk returns a tuple with the InsertedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetInsertedAtOk() (*string, bool) { + if o == nil || o.InsertedAt == nil { + return nil, false + } + return o.InsertedAt, true +} + +// HasInsertedAt returns a boolean if a field has been set. +func (o *VideoView) HasInsertedAt() bool { + if o != nil && o.InsertedAt != nil { + return true + } + + return false +} + +// SetInsertedAt gets a reference to the given string and assigns it to the InsertedAt field. +func (o *VideoView) SetInsertedAt(v string) { + o.InsertedAt = &v +} + +// GetViewEnd returns the ViewEnd field value if set, zero value otherwise. +func (o *VideoView) GetViewEnd() string { + if o == nil || o.ViewEnd == nil { + var ret string + return ret + } + return *o.ViewEnd +} + +// GetViewEndOk returns a tuple with the ViewEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewEndOk() (*string, bool) { + if o == nil || o.ViewEnd == nil { + return nil, false + } + return o.ViewEnd, true +} + +// HasViewEnd returns a boolean if a field has been set. +func (o *VideoView) HasViewEnd() bool { + if o != nil && o.ViewEnd != nil { + return true + } + + return false +} + +// SetViewEnd gets a reference to the given string and assigns it to the ViewEnd field. +func (o *VideoView) SetViewEnd(v string) { + o.ViewEnd = &v +} + +// GetMuxEmbedVersion returns the MuxEmbedVersion field value if set, zero value otherwise. +func (o *VideoView) GetMuxEmbedVersion() string { + if o == nil || o.MuxEmbedVersion == nil { + var ret string + return ret + } + return *o.MuxEmbedVersion +} + +// GetMuxEmbedVersionOk returns a tuple with the MuxEmbedVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetMuxEmbedVersionOk() (*string, bool) { + if o == nil || o.MuxEmbedVersion == nil { + return nil, false + } + return o.MuxEmbedVersion, true +} + +// HasMuxEmbedVersion returns a boolean if a field has been set. +func (o *VideoView) HasMuxEmbedVersion() bool { + if o != nil && o.MuxEmbedVersion != nil { + return true + } + + return false +} + +// SetMuxEmbedVersion gets a reference to the given string and assigns it to the MuxEmbedVersion field. +func (o *VideoView) SetMuxEmbedVersion(v string) { + o.MuxEmbedVersion = &v +} + +// GetPlayerLanguage returns the PlayerLanguage field value if set, zero value otherwise. +func (o *VideoView) GetPlayerLanguage() string { + if o == nil || o.PlayerLanguage == nil { + var ret string + return ret + } + return *o.PlayerLanguage +} + +// GetPlayerLanguageOk returns a tuple with the PlayerLanguage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerLanguageOk() (*string, bool) { + if o == nil || o.PlayerLanguage == nil { + return nil, false + } + return o.PlayerLanguage, true +} + +// HasPlayerLanguage returns a boolean if a field has been set. +func (o *VideoView) HasPlayerLanguage() bool { + if o != nil && o.PlayerLanguage != nil { + return true + } + + return false +} + +// SetPlayerLanguage gets a reference to the given string and assigns it to the PlayerLanguage field. +func (o *VideoView) SetPlayerLanguage(v string) { + o.PlayerLanguage = &v +} + +// GetPageLoadTime returns the PageLoadTime field value if set, zero value otherwise. +func (o *VideoView) GetPageLoadTime() int64 { + if o == nil || o.PageLoadTime == nil { + var ret int64 + return ret + } + return *o.PageLoadTime +} + +// GetPageLoadTimeOk returns a tuple with the PageLoadTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPageLoadTimeOk() (*int64, bool) { + if o == nil || o.PageLoadTime == nil { + return nil, false + } + return o.PageLoadTime, true +} + +// HasPageLoadTime returns a boolean if a field has been set. +func (o *VideoView) HasPageLoadTime() bool { + if o != nil && o.PageLoadTime != nil { + return true + } + + return false +} + +// SetPageLoadTime gets a reference to the given int64 and assigns it to the PageLoadTime field. +func (o *VideoView) SetPageLoadTime(v int64) { + o.PageLoadTime = &v +} + +// GetViewerDeviceCategory returns the ViewerDeviceCategory field value if set, zero value otherwise. +func (o *VideoView) GetViewerDeviceCategory() string { + if o == nil || o.ViewerDeviceCategory == nil { + var ret string + return ret + } + return *o.ViewerDeviceCategory +} + +// GetViewerDeviceCategoryOk returns a tuple with the ViewerDeviceCategory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerDeviceCategoryOk() (*string, bool) { + if o == nil || o.ViewerDeviceCategory == nil { + return nil, false + } + return o.ViewerDeviceCategory, true +} + +// HasViewerDeviceCategory returns a boolean if a field has been set. +func (o *VideoView) HasViewerDeviceCategory() bool { + if o != nil && o.ViewerDeviceCategory != nil { + return true + } + + return false +} + +// SetViewerDeviceCategory gets a reference to the given string and assigns it to the ViewerDeviceCategory field. +func (o *VideoView) SetViewerDeviceCategory(v string) { + o.ViewerDeviceCategory = &v +} + +// GetVideoStartupPrerollLoadTime returns the VideoStartupPrerollLoadTime field value if set, zero value otherwise. +func (o *VideoView) GetVideoStartupPrerollLoadTime() int64 { + if o == nil || o.VideoStartupPrerollLoadTime == nil { + var ret int64 + return ret + } + return *o.VideoStartupPrerollLoadTime +} + +// GetVideoStartupPrerollLoadTimeOk returns a tuple with the VideoStartupPrerollLoadTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoStartupPrerollLoadTimeOk() (*int64, bool) { + if o == nil || o.VideoStartupPrerollLoadTime == nil { + return nil, false + } + return o.VideoStartupPrerollLoadTime, true +} + +// HasVideoStartupPrerollLoadTime returns a boolean if a field has been set. +func (o *VideoView) HasVideoStartupPrerollLoadTime() bool { + if o != nil && o.VideoStartupPrerollLoadTime != nil { + return true + } + + return false +} + +// SetVideoStartupPrerollLoadTime gets a reference to the given int64 and assigns it to the VideoStartupPrerollLoadTime field. +func (o *VideoView) SetVideoStartupPrerollLoadTime(v int64) { + o.VideoStartupPrerollLoadTime = &v +} + +// GetPlayerVersion returns the PlayerVersion field value if set, zero value otherwise. +func (o *VideoView) GetPlayerVersion() string { + if o == nil || o.PlayerVersion == nil { + var ret string + return ret + } + return *o.PlayerVersion +} + +// GetPlayerVersionOk returns a tuple with the PlayerVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerVersionOk() (*string, bool) { + if o == nil || o.PlayerVersion == nil { + return nil, false + } + return o.PlayerVersion, true +} + +// HasPlayerVersion returns a boolean if a field has been set. +func (o *VideoView) HasPlayerVersion() bool { + if o != nil && o.PlayerVersion != nil { + return true + } + + return false +} + +// SetPlayerVersion gets a reference to the given string and assigns it to the PlayerVersion field. +func (o *VideoView) SetPlayerVersion(v string) { + o.PlayerVersion = &v +} + +// GetWatchTime returns the WatchTime field value if set, zero value otherwise. +func (o *VideoView) GetWatchTime() int64 { + if o == nil || o.WatchTime == nil { + var ret int64 + return ret + } + return *o.WatchTime +} + +// GetWatchTimeOk returns a tuple with the WatchTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetWatchTimeOk() (*int64, bool) { + if o == nil || o.WatchTime == nil { + return nil, false + } + return o.WatchTime, true +} + +// HasWatchTime returns a boolean if a field has been set. +func (o *VideoView) HasWatchTime() bool { + if o != nil && o.WatchTime != nil { + return true + } + + return false +} + +// SetWatchTime gets a reference to the given int64 and assigns it to the WatchTime field. +func (o *VideoView) SetWatchTime(v int64) { + o.WatchTime = &v +} + +// GetPlayerSourceStreamType returns the PlayerSourceStreamType field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceStreamType() string { + if o == nil || o.PlayerSourceStreamType == nil { + var ret string + return ret + } + return *o.PlayerSourceStreamType +} + +// GetPlayerSourceStreamTypeOk returns a tuple with the PlayerSourceStreamType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceStreamTypeOk() (*string, bool) { + if o == nil || o.PlayerSourceStreamType == nil { + return nil, false + } + return o.PlayerSourceStreamType, true +} + +// HasPlayerSourceStreamType returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceStreamType() bool { + if o != nil && o.PlayerSourceStreamType != nil { + return true + } + + return false +} + +// SetPlayerSourceStreamType gets a reference to the given string and assigns it to the PlayerSourceStreamType field. +func (o *VideoView) SetPlayerSourceStreamType(v string) { + o.PlayerSourceStreamType = &v +} + +// GetPrerollAdTagHostname returns the PrerollAdTagHostname field value if set, zero value otherwise. +func (o *VideoView) GetPrerollAdTagHostname() string { + if o == nil || o.PrerollAdTagHostname == nil { + var ret string + return ret + } + return *o.PrerollAdTagHostname +} + +// GetPrerollAdTagHostnameOk returns a tuple with the PrerollAdTagHostname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPrerollAdTagHostnameOk() (*string, bool) { + if o == nil || o.PrerollAdTagHostname == nil { + return nil, false + } + return o.PrerollAdTagHostname, true +} + +// HasPrerollAdTagHostname returns a boolean if a field has been set. +func (o *VideoView) HasPrerollAdTagHostname() bool { + if o != nil && o.PrerollAdTagHostname != nil { + return true + } + + return false +} + +// SetPrerollAdTagHostname gets a reference to the given string and assigns it to the PrerollAdTagHostname field. +func (o *VideoView) SetPrerollAdTagHostname(v string) { + o.PrerollAdTagHostname = &v +} + +// GetViewerDeviceManufacturer returns the ViewerDeviceManufacturer field value if set, zero value otherwise. +func (o *VideoView) GetViewerDeviceManufacturer() string { + if o == nil || o.ViewerDeviceManufacturer == nil { + var ret string + return ret + } + return *o.ViewerDeviceManufacturer +} + +// GetViewerDeviceManufacturerOk returns a tuple with the ViewerDeviceManufacturer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerDeviceManufacturerOk() (*string, bool) { + if o == nil || o.ViewerDeviceManufacturer == nil { + return nil, false + } + return o.ViewerDeviceManufacturer, true +} + +// HasViewerDeviceManufacturer returns a boolean if a field has been set. +func (o *VideoView) HasViewerDeviceManufacturer() bool { + if o != nil && o.ViewerDeviceManufacturer != nil { + return true + } + + return false +} + +// SetViewerDeviceManufacturer gets a reference to the given string and assigns it to the ViewerDeviceManufacturer field. +func (o *VideoView) SetViewerDeviceManufacturer(v string) { + o.ViewerDeviceManufacturer = &v +} + +// GetRebufferingScore returns the RebufferingScore field value if set, zero value otherwise. +func (o *VideoView) GetRebufferingScore() string { + if o == nil || o.RebufferingScore == nil { + var ret string + return ret + } + return *o.RebufferingScore +} + +// GetRebufferingScoreOk returns a tuple with the RebufferingScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetRebufferingScoreOk() (*string, bool) { + if o == nil || o.RebufferingScore == nil { + return nil, false + } + return o.RebufferingScore, true +} + +// HasRebufferingScore returns a boolean if a field has been set. +func (o *VideoView) HasRebufferingScore() bool { + if o != nil && o.RebufferingScore != nil { + return true + } + + return false +} + +// SetRebufferingScore gets a reference to the given string and assigns it to the RebufferingScore field. +func (o *VideoView) SetRebufferingScore(v string) { + o.RebufferingScore = &v +} + +// GetExperimentName returns the ExperimentName field value if set, zero value otherwise. +func (o *VideoView) GetExperimentName() string { + if o == nil || o.ExperimentName == nil { + var ret string + return ret + } + return *o.ExperimentName +} + +// GetExperimentNameOk returns a tuple with the ExperimentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetExperimentNameOk() (*string, bool) { + if o == nil || o.ExperimentName == nil { + return nil, false + } + return o.ExperimentName, true +} + +// HasExperimentName returns a boolean if a field has been set. +func (o *VideoView) HasExperimentName() bool { + if o != nil && o.ExperimentName != nil { + return true + } + + return false +} + +// SetExperimentName gets a reference to the given string and assigns it to the ExperimentName field. +func (o *VideoView) SetExperimentName(v string) { + o.ExperimentName = &v +} + +// GetViewerOsVersion returns the ViewerOsVersion field value if set, zero value otherwise. +func (o *VideoView) GetViewerOsVersion() string { + if o == nil || o.ViewerOsVersion == nil { + var ret string + return ret + } + return *o.ViewerOsVersion +} + +// GetViewerOsVersionOk returns a tuple with the ViewerOsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerOsVersionOk() (*string, bool) { + if o == nil || o.ViewerOsVersion == nil { + return nil, false + } + return o.ViewerOsVersion, true +} + +// HasViewerOsVersion returns a boolean if a field has been set. +func (o *VideoView) HasViewerOsVersion() bool { + if o != nil && o.ViewerOsVersion != nil { + return true + } + + return false +} + +// SetViewerOsVersion gets a reference to the given string and assigns it to the ViewerOsVersion field. +func (o *VideoView) SetViewerOsVersion(v string) { + o.ViewerOsVersion = &v +} + +// GetPlayerPreload returns the PlayerPreload field value if set, zero value otherwise. +func (o *VideoView) GetPlayerPreload() bool { + if o == nil || o.PlayerPreload == nil { + var ret bool + return ret + } + return *o.PlayerPreload +} + +// GetPlayerPreloadOk returns a tuple with the PlayerPreload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerPreloadOk() (*bool, bool) { + if o == nil || o.PlayerPreload == nil { + return nil, false + } + return o.PlayerPreload, true +} + +// HasPlayerPreload returns a boolean if a field has been set. +func (o *VideoView) HasPlayerPreload() bool { + if o != nil && o.PlayerPreload != nil { + return true + } + + return false +} + +// SetPlayerPreload gets a reference to the given bool and assigns it to the PlayerPreload field. +func (o *VideoView) SetPlayerPreload(v bool) { + o.PlayerPreload = &v +} + +// GetBufferingDuration returns the BufferingDuration field value if set, zero value otherwise. +func (o *VideoView) GetBufferingDuration() int64 { + if o == nil || o.BufferingDuration == nil { + var ret int64 + return ret + } + return *o.BufferingDuration +} + +// GetBufferingDurationOk returns a tuple with the BufferingDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetBufferingDurationOk() (*int64, bool) { + if o == nil || o.BufferingDuration == nil { + return nil, false + } + return o.BufferingDuration, true +} + +// HasBufferingDuration returns a boolean if a field has been set. +func (o *VideoView) HasBufferingDuration() bool { + if o != nil && o.BufferingDuration != nil { + return true + } + + return false +} + +// SetBufferingDuration gets a reference to the given int64 and assigns it to the BufferingDuration field. +func (o *VideoView) SetBufferingDuration(v int64) { + o.BufferingDuration = &v +} + +// GetPlayerViewCount returns the PlayerViewCount field value if set, zero value otherwise. +func (o *VideoView) GetPlayerViewCount() int64 { + if o == nil || o.PlayerViewCount == nil { + var ret int64 + return ret + } + return *o.PlayerViewCount +} + +// GetPlayerViewCountOk returns a tuple with the PlayerViewCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerViewCountOk() (*int64, bool) { + if o == nil || o.PlayerViewCount == nil { + return nil, false + } + return o.PlayerViewCount, true +} + +// HasPlayerViewCount returns a boolean if a field has been set. +func (o *VideoView) HasPlayerViewCount() bool { + if o != nil && o.PlayerViewCount != nil { + return true + } + + return false +} + +// SetPlayerViewCount gets a reference to the given int64 and assigns it to the PlayerViewCount field. +func (o *VideoView) SetPlayerViewCount(v int64) { + o.PlayerViewCount = &v +} + +// GetPlayerSoftware returns the PlayerSoftware field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSoftware() string { + if o == nil || o.PlayerSoftware == nil { + var ret string + return ret + } + return *o.PlayerSoftware +} + +// GetPlayerSoftwareOk returns a tuple with the PlayerSoftware field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSoftwareOk() (*string, bool) { + if o == nil || o.PlayerSoftware == nil { + return nil, false + } + return o.PlayerSoftware, true +} + +// HasPlayerSoftware returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSoftware() bool { + if o != nil && o.PlayerSoftware != nil { + return true + } + + return false +} + +// SetPlayerSoftware gets a reference to the given string and assigns it to the PlayerSoftware field. +func (o *VideoView) SetPlayerSoftware(v string) { + o.PlayerSoftware = &v +} + +// GetPlayerLoadTime returns the PlayerLoadTime field value if set, zero value otherwise. +func (o *VideoView) GetPlayerLoadTime() int64 { + if o == nil || o.PlayerLoadTime == nil { + var ret int64 + return ret + } + return *o.PlayerLoadTime +} + +// GetPlayerLoadTimeOk returns a tuple with the PlayerLoadTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerLoadTimeOk() (*int64, bool) { + if o == nil || o.PlayerLoadTime == nil { + return nil, false + } + return o.PlayerLoadTime, true +} + +// HasPlayerLoadTime returns a boolean if a field has been set. +func (o *VideoView) HasPlayerLoadTime() bool { + if o != nil && o.PlayerLoadTime != nil { + return true + } + + return false +} + +// SetPlayerLoadTime gets a reference to the given int64 and assigns it to the PlayerLoadTime field. +func (o *VideoView) SetPlayerLoadTime(v int64) { + o.PlayerLoadTime = &v +} + +// GetPlatformSummary returns the PlatformSummary field value if set, zero value otherwise. +func (o *VideoView) GetPlatformSummary() string { + if o == nil || o.PlatformSummary == nil { + var ret string + return ret + } + return *o.PlatformSummary +} + +// GetPlatformSummaryOk returns a tuple with the PlatformSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlatformSummaryOk() (*string, bool) { + if o == nil || o.PlatformSummary == nil { + return nil, false + } + return o.PlatformSummary, true +} + +// HasPlatformSummary returns a boolean if a field has been set. +func (o *VideoView) HasPlatformSummary() bool { + if o != nil && o.PlatformSummary != nil { + return true + } + + return false +} + +// SetPlatformSummary gets a reference to the given string and assigns it to the PlatformSummary field. +func (o *VideoView) SetPlatformSummary(v string) { + o.PlatformSummary = &v +} + +// GetVideoEncodingVariant returns the VideoEncodingVariant field value if set, zero value otherwise. +func (o *VideoView) GetVideoEncodingVariant() string { + if o == nil || o.VideoEncodingVariant == nil { + var ret string + return ret + } + return *o.VideoEncodingVariant +} + +// GetVideoEncodingVariantOk returns a tuple with the VideoEncodingVariant field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoEncodingVariantOk() (*string, bool) { + if o == nil || o.VideoEncodingVariant == nil { + return nil, false + } + return o.VideoEncodingVariant, true +} + +// HasVideoEncodingVariant returns a boolean if a field has been set. +func (o *VideoView) HasVideoEncodingVariant() bool { + if o != nil && o.VideoEncodingVariant != nil { + return true + } + + return false +} + +// SetVideoEncodingVariant gets a reference to the given string and assigns it to the VideoEncodingVariant field. +func (o *VideoView) SetVideoEncodingVariant(v string) { + o.VideoEncodingVariant = &v +} + +// GetPlayerWidth returns the PlayerWidth field value if set, zero value otherwise. +func (o *VideoView) GetPlayerWidth() int32 { + if o == nil || o.PlayerWidth == nil { + var ret int32 + return ret + } + return *o.PlayerWidth +} + +// GetPlayerWidthOk returns a tuple with the PlayerWidth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerWidthOk() (*int32, bool) { + if o == nil || o.PlayerWidth == nil { + return nil, false + } + return o.PlayerWidth, true +} + +// HasPlayerWidth returns a boolean if a field has been set. +func (o *VideoView) HasPlayerWidth() bool { + if o != nil && o.PlayerWidth != nil { + return true + } + + return false +} + +// SetPlayerWidth gets a reference to the given int32 and assigns it to the PlayerWidth field. +func (o *VideoView) SetPlayerWidth(v int32) { + o.PlayerWidth = &v +} + +// GetViewSeekCount returns the ViewSeekCount field value if set, zero value otherwise. +func (o *VideoView) GetViewSeekCount() int64 { + if o == nil || o.ViewSeekCount == nil { + var ret int64 + return ret + } + return *o.ViewSeekCount +} + +// GetViewSeekCountOk returns a tuple with the ViewSeekCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewSeekCountOk() (*int64, bool) { + if o == nil || o.ViewSeekCount == nil { + return nil, false + } + return o.ViewSeekCount, true +} + +// HasViewSeekCount returns a boolean if a field has been set. +func (o *VideoView) HasViewSeekCount() bool { + if o != nil && o.ViewSeekCount != nil { + return true + } + + return false +} + +// SetViewSeekCount gets a reference to the given int64 and assigns it to the ViewSeekCount field. +func (o *VideoView) SetViewSeekCount(v int64) { + o.ViewSeekCount = &v +} + +// GetViewerExperienceScore returns the ViewerExperienceScore field value if set, zero value otherwise. +func (o *VideoView) GetViewerExperienceScore() string { + if o == nil || o.ViewerExperienceScore == nil { + var ret string + return ret + } + return *o.ViewerExperienceScore +} + +// GetViewerExperienceScoreOk returns a tuple with the ViewerExperienceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerExperienceScoreOk() (*string, bool) { + if o == nil || o.ViewerExperienceScore == nil { + return nil, false + } + return o.ViewerExperienceScore, true +} + +// HasViewerExperienceScore returns a boolean if a field has been set. +func (o *VideoView) HasViewerExperienceScore() bool { + if o != nil && o.ViewerExperienceScore != nil { + return true + } + + return false +} + +// SetViewerExperienceScore gets a reference to the given string and assigns it to the ViewerExperienceScore field. +func (o *VideoView) SetViewerExperienceScore(v string) { + o.ViewerExperienceScore = &v +} + +// GetViewErrorId returns the ViewErrorId field value if set, zero value otherwise. +func (o *VideoView) GetViewErrorId() int32 { + if o == nil || o.ViewErrorId == nil { + var ret int32 + return ret + } + return *o.ViewErrorId +} + +// GetViewErrorIdOk returns a tuple with the ViewErrorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewErrorIdOk() (*int32, bool) { + if o == nil || o.ViewErrorId == nil { + return nil, false + } + return o.ViewErrorId, true +} + +// HasViewErrorId returns a boolean if a field has been set. +func (o *VideoView) HasViewErrorId() bool { + if o != nil && o.ViewErrorId != nil { + return true + } + + return false +} + +// SetViewErrorId gets a reference to the given int32 and assigns it to the ViewErrorId field. +func (o *VideoView) SetViewErrorId(v int32) { + o.ViewErrorId = &v +} + +// GetVideoVariantName returns the VideoVariantName field value if set, zero value otherwise. +func (o *VideoView) GetVideoVariantName() string { + if o == nil || o.VideoVariantName == nil { + var ret string + return ret + } + return *o.VideoVariantName +} + +// GetVideoVariantNameOk returns a tuple with the VideoVariantName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoVariantNameOk() (*string, bool) { + if o == nil || o.VideoVariantName == nil { + return nil, false + } + return o.VideoVariantName, true +} + +// HasVideoVariantName returns a boolean if a field has been set. +func (o *VideoView) HasVideoVariantName() bool { + if o != nil && o.VideoVariantName != nil { + return true + } + + return false +} + +// SetVideoVariantName gets a reference to the given string and assigns it to the VideoVariantName field. +func (o *VideoView) SetVideoVariantName(v string) { + o.VideoVariantName = &v +} + +// GetPrerollPlayed returns the PrerollPlayed field value if set, zero value otherwise. +func (o *VideoView) GetPrerollPlayed() bool { + if o == nil || o.PrerollPlayed == nil { + var ret bool + return ret + } + return *o.PrerollPlayed +} + +// GetPrerollPlayedOk returns a tuple with the PrerollPlayed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPrerollPlayedOk() (*bool, bool) { + if o == nil || o.PrerollPlayed == nil { + return nil, false + } + return o.PrerollPlayed, true +} + +// HasPrerollPlayed returns a boolean if a field has been set. +func (o *VideoView) HasPrerollPlayed() bool { + if o != nil && o.PrerollPlayed != nil { + return true + } + + return false +} + +// SetPrerollPlayed gets a reference to the given bool and assigns it to the PrerollPlayed field. +func (o *VideoView) SetPrerollPlayed(v bool) { + o.PrerollPlayed = &v +} + +// GetViewerApplicationEngine returns the ViewerApplicationEngine field value if set, zero value otherwise. +func (o *VideoView) GetViewerApplicationEngine() string { + if o == nil || o.ViewerApplicationEngine == nil { + var ret string + return ret + } + return *o.ViewerApplicationEngine +} + +// GetViewerApplicationEngineOk returns a tuple with the ViewerApplicationEngine field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerApplicationEngineOk() (*string, bool) { + if o == nil || o.ViewerApplicationEngine == nil { + return nil, false + } + return o.ViewerApplicationEngine, true +} + +// HasViewerApplicationEngine returns a boolean if a field has been set. +func (o *VideoView) HasViewerApplicationEngine() bool { + if o != nil && o.ViewerApplicationEngine != nil { + return true + } + + return false +} + +// SetViewerApplicationEngine gets a reference to the given string and assigns it to the ViewerApplicationEngine field. +func (o *VideoView) SetViewerApplicationEngine(v string) { + o.ViewerApplicationEngine = &v +} + +// GetViewerOsArchitecture returns the ViewerOsArchitecture field value if set, zero value otherwise. +func (o *VideoView) GetViewerOsArchitecture() string { + if o == nil || o.ViewerOsArchitecture == nil { + var ret string + return ret + } + return *o.ViewerOsArchitecture +} + +// GetViewerOsArchitectureOk returns a tuple with the ViewerOsArchitecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerOsArchitectureOk() (*string, bool) { + if o == nil || o.ViewerOsArchitecture == nil { + return nil, false + } + return o.ViewerOsArchitecture, true +} + +// HasViewerOsArchitecture returns a boolean if a field has been set. +func (o *VideoView) HasViewerOsArchitecture() bool { + if o != nil && o.ViewerOsArchitecture != nil { + return true + } + + return false +} + +// SetViewerOsArchitecture gets a reference to the given string and assigns it to the ViewerOsArchitecture field. +func (o *VideoView) SetViewerOsArchitecture(v string) { + o.ViewerOsArchitecture = &v +} + +// GetPlayerErrorCode returns the PlayerErrorCode field value if set, zero value otherwise. +func (o *VideoView) GetPlayerErrorCode() string { + if o == nil || o.PlayerErrorCode == nil { + var ret string + return ret + } + return *o.PlayerErrorCode +} + +// GetPlayerErrorCodeOk returns a tuple with the PlayerErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerErrorCodeOk() (*string, bool) { + if o == nil || o.PlayerErrorCode == nil { + return nil, false + } + return o.PlayerErrorCode, true +} + +// HasPlayerErrorCode returns a boolean if a field has been set. +func (o *VideoView) HasPlayerErrorCode() bool { + if o != nil && o.PlayerErrorCode != nil { + return true + } + + return false +} + +// SetPlayerErrorCode gets a reference to the given string and assigns it to the PlayerErrorCode field. +func (o *VideoView) SetPlayerErrorCode(v string) { + o.PlayerErrorCode = &v +} + +// GetBufferingRate returns the BufferingRate field value if set, zero value otherwise. +func (o *VideoView) GetBufferingRate() string { + if o == nil || o.BufferingRate == nil { + var ret string + return ret + } + return *o.BufferingRate +} + +// GetBufferingRateOk returns a tuple with the BufferingRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetBufferingRateOk() (*string, bool) { + if o == nil || o.BufferingRate == nil { + return nil, false + } + return o.BufferingRate, true +} + +// HasBufferingRate returns a boolean if a field has been set. +func (o *VideoView) HasBufferingRate() bool { + if o != nil && o.BufferingRate != nil { + return true + } + + return false +} + +// SetBufferingRate gets a reference to the given string and assigns it to the BufferingRate field. +func (o *VideoView) SetBufferingRate(v string) { + o.BufferingRate = &v +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *VideoView) GetEvents() []VideoViewEvent { + if o == nil || o.Events == nil { + var ret []VideoViewEvent + return ret + } + return *o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetEventsOk() (*[]VideoViewEvent, bool) { + if o == nil || o.Events == nil { + return nil, false + } + return o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *VideoView) HasEvents() bool { + if o != nil && o.Events != nil { + return true + } + + return false +} + +// SetEvents gets a reference to the given []VideoViewEvent and assigns it to the Events field. +func (o *VideoView) SetEvents(v []VideoViewEvent) { + o.Events = &v +} + +// GetPlayerName returns the PlayerName field value if set, zero value otherwise. +func (o *VideoView) GetPlayerName() string { + if o == nil || o.PlayerName == nil { + var ret string + return ret + } + return *o.PlayerName +} + +// GetPlayerNameOk returns a tuple with the PlayerName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerNameOk() (*string, bool) { + if o == nil || o.PlayerName == nil { + return nil, false + } + return o.PlayerName, true +} + +// HasPlayerName returns a boolean if a field has been set. +func (o *VideoView) HasPlayerName() bool { + if o != nil && o.PlayerName != nil { + return true + } + + return false +} + +// SetPlayerName gets a reference to the given string and assigns it to the PlayerName field. +func (o *VideoView) SetPlayerName(v string) { + o.PlayerName = &v +} + +// GetViewStart returns the ViewStart field value if set, zero value otherwise. +func (o *VideoView) GetViewStart() string { + if o == nil || o.ViewStart == nil { + var ret string + return ret + } + return *o.ViewStart +} + +// GetViewStartOk returns a tuple with the ViewStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewStartOk() (*string, bool) { + if o == nil || o.ViewStart == nil { + return nil, false + } + return o.ViewStart, true +} + +// HasViewStart returns a boolean if a field has been set. +func (o *VideoView) HasViewStart() bool { + if o != nil && o.ViewStart != nil { + return true + } + + return false +} + +// SetViewStart gets a reference to the given string and assigns it to the ViewStart field. +func (o *VideoView) SetViewStart(v string) { + o.ViewStart = &v +} + +// GetViewAverageRequestThroughput returns the ViewAverageRequestThroughput field value if set, zero value otherwise. +func (o *VideoView) GetViewAverageRequestThroughput() int64 { + if o == nil || o.ViewAverageRequestThroughput == nil { + var ret int64 + return ret + } + return *o.ViewAverageRequestThroughput +} + +// GetViewAverageRequestThroughputOk returns a tuple with the ViewAverageRequestThroughput field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewAverageRequestThroughputOk() (*int64, bool) { + if o == nil || o.ViewAverageRequestThroughput == nil { + return nil, false + } + return o.ViewAverageRequestThroughput, true +} + +// HasViewAverageRequestThroughput returns a boolean if a field has been set. +func (o *VideoView) HasViewAverageRequestThroughput() bool { + if o != nil && o.ViewAverageRequestThroughput != nil { + return true + } + + return false +} + +// SetViewAverageRequestThroughput gets a reference to the given int64 and assigns it to the ViewAverageRequestThroughput field. +func (o *VideoView) SetViewAverageRequestThroughput(v int64) { + o.ViewAverageRequestThroughput = &v +} + +// GetVideoProducer returns the VideoProducer field value if set, zero value otherwise. +func (o *VideoView) GetVideoProducer() string { + if o == nil || o.VideoProducer == nil { + var ret string + return ret + } + return *o.VideoProducer +} + +// GetVideoProducerOk returns a tuple with the VideoProducer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoProducerOk() (*string, bool) { + if o == nil || o.VideoProducer == nil { + return nil, false + } + return o.VideoProducer, true +} + +// HasVideoProducer returns a boolean if a field has been set. +func (o *VideoView) HasVideoProducer() bool { + if o != nil && o.VideoProducer != nil { + return true + } + + return false +} + +// SetVideoProducer gets a reference to the given string and assigns it to the VideoProducer field. +func (o *VideoView) SetVideoProducer(v string) { + o.VideoProducer = &v +} + +// GetErrorTypeId returns the ErrorTypeId field value if set, zero value otherwise. +func (o *VideoView) GetErrorTypeId() int32 { + if o == nil || o.ErrorTypeId == nil { + var ret int32 + return ret + } + return *o.ErrorTypeId +} + +// GetErrorTypeIdOk returns a tuple with the ErrorTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetErrorTypeIdOk() (*int32, bool) { + if o == nil || o.ErrorTypeId == nil { + return nil, false + } + return o.ErrorTypeId, true +} + +// HasErrorTypeId returns a boolean if a field has been set. +func (o *VideoView) HasErrorTypeId() bool { + if o != nil && o.ErrorTypeId != nil { + return true + } + + return false +} + +// SetErrorTypeId gets a reference to the given int32 and assigns it to the ErrorTypeId field. +func (o *VideoView) SetErrorTypeId(v int32) { + o.ErrorTypeId = &v +} + +// GetMuxViewerId returns the MuxViewerId field value if set, zero value otherwise. +func (o *VideoView) GetMuxViewerId() string { + if o == nil || o.MuxViewerId == nil { + var ret string + return ret + } + return *o.MuxViewerId +} + +// GetMuxViewerIdOk returns a tuple with the MuxViewerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetMuxViewerIdOk() (*string, bool) { + if o == nil || o.MuxViewerId == nil { + return nil, false + } + return o.MuxViewerId, true +} + +// HasMuxViewerId returns a boolean if a field has been set. +func (o *VideoView) HasMuxViewerId() bool { + if o != nil && o.MuxViewerId != nil { + return true + } + + return false +} + +// SetMuxViewerId gets a reference to the given string and assigns it to the MuxViewerId field. +func (o *VideoView) SetMuxViewerId(v string) { + o.MuxViewerId = &v +} + +// GetVideoId returns the VideoId field value if set, zero value otherwise. +func (o *VideoView) GetVideoId() string { + if o == nil || o.VideoId == nil { + var ret string + return ret + } + return *o.VideoId +} + +// GetVideoIdOk returns a tuple with the VideoId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoIdOk() (*string, bool) { + if o == nil || o.VideoId == nil { + return nil, false + } + return o.VideoId, true +} + +// HasVideoId returns a boolean if a field has been set. +func (o *VideoView) HasVideoId() bool { + if o != nil && o.VideoId != nil { + return true + } + + return false +} + +// SetVideoId gets a reference to the given string and assigns it to the VideoId field. +func (o *VideoView) SetVideoId(v string) { + o.VideoId = &v +} + +// GetContinentCode returns the ContinentCode field value if set, zero value otherwise. +func (o *VideoView) GetContinentCode() string { + if o == nil || o.ContinentCode == nil { + var ret string + return ret + } + return *o.ContinentCode +} + +// GetContinentCodeOk returns a tuple with the ContinentCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetContinentCodeOk() (*string, bool) { + if o == nil || o.ContinentCode == nil { + return nil, false + } + return o.ContinentCode, true +} + +// HasContinentCode returns a boolean if a field has been set. +func (o *VideoView) HasContinentCode() bool { + if o != nil && o.ContinentCode != nil { + return true + } + + return false +} + +// SetContinentCode gets a reference to the given string and assigns it to the ContinentCode field. +func (o *VideoView) SetContinentCode(v string) { + o.ContinentCode = &v +} + +// GetSessionId returns the SessionId field value if set, zero value otherwise. +func (o *VideoView) GetSessionId() string { + if o == nil || o.SessionId == nil { + var ret string + return ret + } + return *o.SessionId +} + +// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetSessionIdOk() (*string, bool) { + if o == nil || o.SessionId == nil { + return nil, false + } + return o.SessionId, true +} + +// HasSessionId returns a boolean if a field has been set. +func (o *VideoView) HasSessionId() bool { + if o != nil && o.SessionId != nil { + return true + } + + return false +} + +// SetSessionId gets a reference to the given string and assigns it to the SessionId field. +func (o *VideoView) SetSessionId(v string) { + o.SessionId = &v +} + +// GetExitBeforeVideoStart returns the ExitBeforeVideoStart field value if set, zero value otherwise. +func (o *VideoView) GetExitBeforeVideoStart() bool { + if o == nil || o.ExitBeforeVideoStart == nil { + var ret bool + return ret + } + return *o.ExitBeforeVideoStart +} + +// GetExitBeforeVideoStartOk returns a tuple with the ExitBeforeVideoStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetExitBeforeVideoStartOk() (*bool, bool) { + if o == nil || o.ExitBeforeVideoStart == nil { + return nil, false + } + return o.ExitBeforeVideoStart, true +} + +// HasExitBeforeVideoStart returns a boolean if a field has been set. +func (o *VideoView) HasExitBeforeVideoStart() bool { + if o != nil && o.ExitBeforeVideoStart != nil { + return true + } + + return false +} + +// SetExitBeforeVideoStart gets a reference to the given bool and assigns it to the ExitBeforeVideoStart field. +func (o *VideoView) SetExitBeforeVideoStart(v bool) { + o.ExitBeforeVideoStart = &v +} + +// GetVideoContentType returns the VideoContentType field value if set, zero value otherwise. +func (o *VideoView) GetVideoContentType() string { + if o == nil || o.VideoContentType == nil { + var ret string + return ret + } + return *o.VideoContentType +} + +// GetVideoContentTypeOk returns a tuple with the VideoContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoContentTypeOk() (*string, bool) { + if o == nil || o.VideoContentType == nil { + return nil, false + } + return o.VideoContentType, true +} + +// HasVideoContentType returns a boolean if a field has been set. +func (o *VideoView) HasVideoContentType() bool { + if o != nil && o.VideoContentType != nil { + return true + } + + return false +} + +// SetVideoContentType gets a reference to the given string and assigns it to the VideoContentType field. +func (o *VideoView) SetVideoContentType(v string) { + o.VideoContentType = &v +} + +// GetViewerOsFamily returns the ViewerOsFamily field value if set, zero value otherwise. +func (o *VideoView) GetViewerOsFamily() string { + if o == nil || o.ViewerOsFamily == nil { + var ret string + return ret + } + return *o.ViewerOsFamily +} + +// GetViewerOsFamilyOk returns a tuple with the ViewerOsFamily field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerOsFamilyOk() (*string, bool) { + if o == nil || o.ViewerOsFamily == nil { + return nil, false + } + return o.ViewerOsFamily, true +} + +// HasViewerOsFamily returns a boolean if a field has been set. +func (o *VideoView) HasViewerOsFamily() bool { + if o != nil && o.ViewerOsFamily != nil { + return true + } + + return false +} + +// SetViewerOsFamily gets a reference to the given string and assigns it to the ViewerOsFamily field. +func (o *VideoView) SetViewerOsFamily(v string) { + o.ViewerOsFamily = &v +} + +// GetPlayerPoster returns the PlayerPoster field value if set, zero value otherwise. +func (o *VideoView) GetPlayerPoster() string { + if o == nil || o.PlayerPoster == nil { + var ret string + return ret + } + return *o.PlayerPoster +} + +// GetPlayerPosterOk returns a tuple with the PlayerPoster field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerPosterOk() (*string, bool) { + if o == nil || o.PlayerPoster == nil { + return nil, false + } + return o.PlayerPoster, true +} + +// HasPlayerPoster returns a boolean if a field has been set. +func (o *VideoView) HasPlayerPoster() bool { + if o != nil && o.PlayerPoster != nil { + return true + } + + return false +} + +// SetPlayerPoster gets a reference to the given string and assigns it to the PlayerPoster field. +func (o *VideoView) SetPlayerPoster(v string) { + o.PlayerPoster = &v +} + +// GetViewAverageRequestLatency returns the ViewAverageRequestLatency field value if set, zero value otherwise. +func (o *VideoView) GetViewAverageRequestLatency() int64 { + if o == nil || o.ViewAverageRequestLatency == nil { + var ret int64 + return ret + } + return *o.ViewAverageRequestLatency +} + +// GetViewAverageRequestLatencyOk returns a tuple with the ViewAverageRequestLatency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewAverageRequestLatencyOk() (*int64, bool) { + if o == nil || o.ViewAverageRequestLatency == nil { + return nil, false + } + return o.ViewAverageRequestLatency, true +} + +// HasViewAverageRequestLatency returns a boolean if a field has been set. +func (o *VideoView) HasViewAverageRequestLatency() bool { + if o != nil && o.ViewAverageRequestLatency != nil { + return true + } + + return false +} + +// SetViewAverageRequestLatency gets a reference to the given int64 and assigns it to the ViewAverageRequestLatency field. +func (o *VideoView) SetViewAverageRequestLatency(v int64) { + o.ViewAverageRequestLatency = &v +} + +// GetVideoVariantId returns the VideoVariantId field value if set, zero value otherwise. +func (o *VideoView) GetVideoVariantId() string { + if o == nil || o.VideoVariantId == nil { + var ret string + return ret + } + return *o.VideoVariantId +} + +// GetVideoVariantIdOk returns a tuple with the VideoVariantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoVariantIdOk() (*string, bool) { + if o == nil || o.VideoVariantId == nil { + return nil, false + } + return o.VideoVariantId, true +} + +// HasVideoVariantId returns a boolean if a field has been set. +func (o *VideoView) HasVideoVariantId() bool { + if o != nil && o.VideoVariantId != nil { + return true + } + + return false +} + +// SetVideoVariantId gets a reference to the given string and assigns it to the VideoVariantId field. +func (o *VideoView) SetVideoVariantId(v string) { + o.VideoVariantId = &v +} + +// GetPlayerSourceDuration returns the PlayerSourceDuration field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceDuration() int64 { + if o == nil || o.PlayerSourceDuration == nil { + var ret int64 + return ret + } + return *o.PlayerSourceDuration +} + +// GetPlayerSourceDurationOk returns a tuple with the PlayerSourceDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceDurationOk() (*int64, bool) { + if o == nil || o.PlayerSourceDuration == nil { + return nil, false + } + return o.PlayerSourceDuration, true +} + +// HasPlayerSourceDuration returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceDuration() bool { + if o != nil && o.PlayerSourceDuration != nil { + return true + } + + return false +} + +// SetPlayerSourceDuration gets a reference to the given int64 and assigns it to the PlayerSourceDuration field. +func (o *VideoView) SetPlayerSourceDuration(v int64) { + o.PlayerSourceDuration = &v +} + +// GetPlayerSourceUrl returns the PlayerSourceUrl field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSourceUrl() string { + if o == nil || o.PlayerSourceUrl == nil { + var ret string + return ret + } + return *o.PlayerSourceUrl +} + +// GetPlayerSourceUrlOk returns a tuple with the PlayerSourceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSourceUrlOk() (*string, bool) { + if o == nil || o.PlayerSourceUrl == nil { + return nil, false + } + return o.PlayerSourceUrl, true +} + +// HasPlayerSourceUrl returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSourceUrl() bool { + if o != nil && o.PlayerSourceUrl != nil { + return true + } + + return false +} + +// SetPlayerSourceUrl gets a reference to the given string and assigns it to the PlayerSourceUrl field. +func (o *VideoView) SetPlayerSourceUrl(v string) { + o.PlayerSourceUrl = &v +} + +// GetMuxApiVersion returns the MuxApiVersion field value if set, zero value otherwise. +func (o *VideoView) GetMuxApiVersion() string { + if o == nil || o.MuxApiVersion == nil { + var ret string + return ret + } + return *o.MuxApiVersion +} + +// GetMuxApiVersionOk returns a tuple with the MuxApiVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetMuxApiVersionOk() (*string, bool) { + if o == nil || o.MuxApiVersion == nil { + return nil, false + } + return o.MuxApiVersion, true +} + +// HasMuxApiVersion returns a boolean if a field has been set. +func (o *VideoView) HasMuxApiVersion() bool { + if o != nil && o.MuxApiVersion != nil { + return true + } + + return false +} + +// SetMuxApiVersion gets a reference to the given string and assigns it to the MuxApiVersion field. +func (o *VideoView) SetMuxApiVersion(v string) { + o.MuxApiVersion = &v +} + +// GetVideoTitle returns the VideoTitle field value if set, zero value otherwise. +func (o *VideoView) GetVideoTitle() string { + if o == nil || o.VideoTitle == nil { + var ret string + return ret + } + return *o.VideoTitle +} + +// GetVideoTitleOk returns a tuple with the VideoTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoTitleOk() (*string, bool) { + if o == nil || o.VideoTitle == nil { + return nil, false + } + return o.VideoTitle, true +} + +// HasVideoTitle returns a boolean if a field has been set. +func (o *VideoView) HasVideoTitle() bool { + if o != nil && o.VideoTitle != nil { + return true + } + + return false +} + +// SetVideoTitle gets a reference to the given string and assigns it to the VideoTitle field. +func (o *VideoView) SetVideoTitle(v string) { + o.VideoTitle = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *VideoView) GetId() string { + if o == nil || o.Id == nil { + 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 *VideoView) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *VideoView) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *VideoView) SetId(v string) { + o.Id = &v +} + +// GetShortTime returns the ShortTime field value if set, zero value otherwise. +func (o *VideoView) GetShortTime() string { + if o == nil || o.ShortTime == nil { + var ret string + return ret + } + return *o.ShortTime +} + +// GetShortTimeOk returns a tuple with the ShortTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetShortTimeOk() (*string, bool) { + if o == nil || o.ShortTime == nil { + return nil, false + } + return o.ShortTime, true +} + +// HasShortTime returns a boolean if a field has been set. +func (o *VideoView) HasShortTime() bool { + if o != nil && o.ShortTime != nil { + return true + } + + return false +} + +// SetShortTime gets a reference to the given string and assigns it to the ShortTime field. +func (o *VideoView) SetShortTime(v string) { + o.ShortTime = &v +} + +// GetRebufferPercentage returns the RebufferPercentage field value if set, zero value otherwise. +func (o *VideoView) GetRebufferPercentage() string { + if o == nil || o.RebufferPercentage == nil { + var ret string + return ret + } + return *o.RebufferPercentage +} + +// GetRebufferPercentageOk returns a tuple with the RebufferPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetRebufferPercentageOk() (*string, bool) { + if o == nil || o.RebufferPercentage == nil { + return nil, false + } + return o.RebufferPercentage, true +} + +// HasRebufferPercentage returns a boolean if a field has been set. +func (o *VideoView) HasRebufferPercentage() bool { + if o != nil && o.RebufferPercentage != nil { + return true + } + + return false +} + +// SetRebufferPercentage gets a reference to the given string and assigns it to the RebufferPercentage field. +func (o *VideoView) SetRebufferPercentage(v string) { + o.RebufferPercentage = &v +} + +// GetTimeToFirstFrame returns the TimeToFirstFrame field value if set, zero value otherwise. +func (o *VideoView) GetTimeToFirstFrame() int64 { + if o == nil || o.TimeToFirstFrame == nil { + var ret int64 + return ret + } + return *o.TimeToFirstFrame +} + +// GetTimeToFirstFrameOk returns a tuple with the TimeToFirstFrame field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetTimeToFirstFrameOk() (*int64, bool) { + if o == nil || o.TimeToFirstFrame == nil { + return nil, false + } + return o.TimeToFirstFrame, true +} + +// HasTimeToFirstFrame returns a boolean if a field has been set. +func (o *VideoView) HasTimeToFirstFrame() bool { + if o != nil && o.TimeToFirstFrame != nil { + return true + } + + return false +} + +// SetTimeToFirstFrame gets a reference to the given int64 and assigns it to the TimeToFirstFrame field. +func (o *VideoView) SetTimeToFirstFrame(v int64) { + o.TimeToFirstFrame = &v +} + +// GetViewerUserId returns the ViewerUserId field value if set, zero value otherwise. +func (o *VideoView) GetViewerUserId() string { + if o == nil || o.ViewerUserId == nil { + var ret string + return ret + } + return *o.ViewerUserId +} + +// GetViewerUserIdOk returns a tuple with the ViewerUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerUserIdOk() (*string, bool) { + if o == nil || o.ViewerUserId == nil { + return nil, false + } + return o.ViewerUserId, true +} + +// HasViewerUserId returns a boolean if a field has been set. +func (o *VideoView) HasViewerUserId() bool { + if o != nil && o.ViewerUserId != nil { + return true + } + + return false +} + +// SetViewerUserId gets a reference to the given string and assigns it to the ViewerUserId field. +func (o *VideoView) SetViewerUserId(v string) { + o.ViewerUserId = &v +} + +// GetVideoStreamType returns the VideoStreamType field value if set, zero value otherwise. +func (o *VideoView) GetVideoStreamType() string { + if o == nil || o.VideoStreamType == nil { + var ret string + return ret + } + return *o.VideoStreamType +} + +// GetVideoStreamTypeOk returns a tuple with the VideoStreamType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetVideoStreamTypeOk() (*string, bool) { + if o == nil || o.VideoStreamType == nil { + return nil, false + } + return o.VideoStreamType, true +} + +// HasVideoStreamType returns a boolean if a field has been set. +func (o *VideoView) HasVideoStreamType() bool { + if o != nil && o.VideoStreamType != nil { + return true + } + + return false +} + +// SetVideoStreamType gets a reference to the given string and assigns it to the VideoStreamType field. +func (o *VideoView) SetVideoStreamType(v string) { + o.VideoStreamType = &v +} + +// GetPlayerStartupTime returns the PlayerStartupTime field value if set, zero value otherwise. +func (o *VideoView) GetPlayerStartupTime() int64 { + if o == nil || o.PlayerStartupTime == nil { + var ret int64 + return ret + } + return *o.PlayerStartupTime +} + +// GetPlayerStartupTimeOk returns a tuple with the PlayerStartupTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerStartupTimeOk() (*int64, bool) { + if o == nil || o.PlayerStartupTime == nil { + return nil, false + } + return o.PlayerStartupTime, true +} + +// HasPlayerStartupTime returns a boolean if a field has been set. +func (o *VideoView) HasPlayerStartupTime() bool { + if o != nil && o.PlayerStartupTime != nil { + return true + } + + return false +} + +// SetPlayerStartupTime gets a reference to the given int64 and assigns it to the PlayerStartupTime field. +func (o *VideoView) SetPlayerStartupTime(v int64) { + o.PlayerStartupTime = &v +} + +// GetViewerApplicationVersion returns the ViewerApplicationVersion field value if set, zero value otherwise. +func (o *VideoView) GetViewerApplicationVersion() string { + if o == nil || o.ViewerApplicationVersion == nil { + var ret string + return ret + } + return *o.ViewerApplicationVersion +} + +// GetViewerApplicationVersionOk returns a tuple with the ViewerApplicationVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewerApplicationVersionOk() (*string, bool) { + if o == nil || o.ViewerApplicationVersion == nil { + return nil, false + } + return o.ViewerApplicationVersion, true +} + +// HasViewerApplicationVersion returns a boolean if a field has been set. +func (o *VideoView) HasViewerApplicationVersion() bool { + if o != nil && o.ViewerApplicationVersion != nil { + return true + } + + return false +} + +// SetViewerApplicationVersion gets a reference to the given string and assigns it to the ViewerApplicationVersion field. +func (o *VideoView) SetViewerApplicationVersion(v string) { + o.ViewerApplicationVersion = &v +} + +// GetViewMaxDownscalePercentage returns the ViewMaxDownscalePercentage field value if set, zero value otherwise. +func (o *VideoView) GetViewMaxDownscalePercentage() string { + if o == nil || o.ViewMaxDownscalePercentage == nil { + var ret string + return ret + } + return *o.ViewMaxDownscalePercentage +} + +// GetViewMaxDownscalePercentageOk returns a tuple with the ViewMaxDownscalePercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewMaxDownscalePercentageOk() (*string, bool) { + if o == nil || o.ViewMaxDownscalePercentage == nil { + return nil, false + } + return o.ViewMaxDownscalePercentage, true +} + +// HasViewMaxDownscalePercentage returns a boolean if a field has been set. +func (o *VideoView) HasViewMaxDownscalePercentage() bool { + if o != nil && o.ViewMaxDownscalePercentage != nil { + return true + } + + return false +} + +// SetViewMaxDownscalePercentage gets a reference to the given string and assigns it to the ViewMaxDownscalePercentage field. +func (o *VideoView) SetViewMaxDownscalePercentage(v string) { + o.ViewMaxDownscalePercentage = &v +} + +// GetViewMaxUpscalePercentage returns the ViewMaxUpscalePercentage field value if set, zero value otherwise. +func (o *VideoView) GetViewMaxUpscalePercentage() string { + if o == nil || o.ViewMaxUpscalePercentage == nil { + var ret string + return ret + } + return *o.ViewMaxUpscalePercentage +} + +// GetViewMaxUpscalePercentageOk returns a tuple with the ViewMaxUpscalePercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetViewMaxUpscalePercentageOk() (*string, bool) { + if o == nil || o.ViewMaxUpscalePercentage == nil { + return nil, false + } + return o.ViewMaxUpscalePercentage, true +} + +// HasViewMaxUpscalePercentage returns a boolean if a field has been set. +func (o *VideoView) HasViewMaxUpscalePercentage() bool { + if o != nil && o.ViewMaxUpscalePercentage != nil { + return true + } + + return false +} + +// SetViewMaxUpscalePercentage gets a reference to the given string and assigns it to the ViewMaxUpscalePercentage field. +func (o *VideoView) SetViewMaxUpscalePercentage(v string) { + o.ViewMaxUpscalePercentage = &v +} + +// GetCountryCode returns the CountryCode field value if set, zero value otherwise. +func (o *VideoView) GetCountryCode() string { + if o == nil || o.CountryCode == nil { + var ret string + return ret + } + return *o.CountryCode +} + +// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetCountryCodeOk() (*string, bool) { + if o == nil || o.CountryCode == nil { + return nil, false + } + return o.CountryCode, true +} + +// HasCountryCode returns a boolean if a field has been set. +func (o *VideoView) HasCountryCode() bool { + if o != nil && o.CountryCode != nil { + return true + } + + return false +} + +// SetCountryCode gets a reference to the given string and assigns it to the CountryCode field. +func (o *VideoView) SetCountryCode(v string) { + o.CountryCode = &v +} + +// GetUsedFullscreen returns the UsedFullscreen field value if set, zero value otherwise. +func (o *VideoView) GetUsedFullscreen() bool { + if o == nil || o.UsedFullscreen == nil { + var ret bool + return ret + } + return *o.UsedFullscreen +} + +// GetUsedFullscreenOk returns a tuple with the UsedFullscreen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetUsedFullscreenOk() (*bool, bool) { + if o == nil || o.UsedFullscreen == nil { + return nil, false + } + return o.UsedFullscreen, true +} + +// HasUsedFullscreen returns a boolean if a field has been set. +func (o *VideoView) HasUsedFullscreen() bool { + if o != nil && o.UsedFullscreen != nil { + return true + } + + return false +} + +// SetUsedFullscreen gets a reference to the given bool and assigns it to the UsedFullscreen field. +func (o *VideoView) SetUsedFullscreen(v bool) { + o.UsedFullscreen = &v +} + +// GetIsp returns the Isp field value if set, zero value otherwise. +func (o *VideoView) GetIsp() string { + if o == nil || o.Isp == nil { + var ret string + return ret + } + return *o.Isp +} + +// GetIspOk returns a tuple with the Isp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetIspOk() (*string, bool) { + if o == nil || o.Isp == nil { + return nil, false + } + return o.Isp, true +} + +// HasIsp returns a boolean if a field has been set. +func (o *VideoView) HasIsp() bool { + if o != nil && o.Isp != nil { + return true + } + + return false +} + +// SetIsp gets a reference to the given string and assigns it to the Isp field. +func (o *VideoView) SetIsp(v string) { + o.Isp = &v +} + +// GetPropertyId returns the PropertyId field value if set, zero value otherwise. +func (o *VideoView) GetPropertyId() int64 { + if o == nil || o.PropertyId == nil { + var ret int64 + return ret + } + return *o.PropertyId +} + +// GetPropertyIdOk returns a tuple with the PropertyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPropertyIdOk() (*int64, bool) { + if o == nil || o.PropertyId == nil { + return nil, false + } + return o.PropertyId, true +} + +// HasPropertyId returns a boolean if a field has been set. +func (o *VideoView) HasPropertyId() bool { + if o != nil && o.PropertyId != nil { + return true + } + + return false +} + +// SetPropertyId gets a reference to the given int64 and assigns it to the PropertyId field. +func (o *VideoView) SetPropertyId(v int64) { + o.PropertyId = &v +} + +// GetPlayerAutoplay returns the PlayerAutoplay field value if set, zero value otherwise. +func (o *VideoView) GetPlayerAutoplay() bool { + if o == nil || o.PlayerAutoplay == nil { + var ret bool + return ret + } + return *o.PlayerAutoplay +} + +// GetPlayerAutoplayOk returns a tuple with the PlayerAutoplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerAutoplayOk() (*bool, bool) { + if o == nil || o.PlayerAutoplay == nil { + return nil, false + } + return o.PlayerAutoplay, true +} + +// HasPlayerAutoplay returns a boolean if a field has been set. +func (o *VideoView) HasPlayerAutoplay() bool { + if o != nil && o.PlayerAutoplay != nil { + return true + } + + return false +} + +// SetPlayerAutoplay gets a reference to the given bool and assigns it to the PlayerAutoplay field. +func (o *VideoView) SetPlayerAutoplay(v bool) { + o.PlayerAutoplay = &v +} + +// GetPlayerHeight returns the PlayerHeight field value if set, zero value otherwise. +func (o *VideoView) GetPlayerHeight() int32 { + if o == nil || o.PlayerHeight == nil { + var ret int32 + return ret + } + return *o.PlayerHeight +} + +// GetPlayerHeightOk returns a tuple with the PlayerHeight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerHeightOk() (*int32, bool) { + if o == nil || o.PlayerHeight == nil { + return nil, false + } + return o.PlayerHeight, true +} + +// HasPlayerHeight returns a boolean if a field has been set. +func (o *VideoView) HasPlayerHeight() bool { + if o != nil && o.PlayerHeight != nil { + return true + } + + return false +} + +// SetPlayerHeight gets a reference to the given int32 and assigns it to the PlayerHeight field. +func (o *VideoView) SetPlayerHeight(v int32) { + o.PlayerHeight = &v +} + +// GetAsn returns the Asn field value if set, zero value otherwise. +func (o *VideoView) GetAsn() int64 { + if o == nil || o.Asn == nil { + var ret int64 + return ret + } + return *o.Asn +} + +// GetAsnOk returns a tuple with the Asn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetAsnOk() (*int64, bool) { + if o == nil || o.Asn == nil { + return nil, false + } + return o.Asn, true +} + +// HasAsn returns a boolean if a field has been set. +func (o *VideoView) HasAsn() bool { + if o != nil && o.Asn != nil { + return true + } + + return false +} + +// SetAsn gets a reference to the given int64 and assigns it to the Asn field. +func (o *VideoView) SetAsn(v int64) { + o.Asn = &v +} + +// GetAsnName returns the AsnName field value if set, zero value otherwise. +func (o *VideoView) GetAsnName() string { + if o == nil || o.AsnName == nil { + var ret string + return ret + } + return *o.AsnName +} + +// GetAsnNameOk returns a tuple with the AsnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetAsnNameOk() (*string, bool) { + if o == nil || o.AsnName == nil { + return nil, false + } + return o.AsnName, true +} + +// HasAsnName returns a boolean if a field has been set. +func (o *VideoView) HasAsnName() bool { + if o != nil && o.AsnName != nil { + return true + } + + return false +} + +// SetAsnName gets a reference to the given string and assigns it to the AsnName field. +func (o *VideoView) SetAsnName(v string) { + o.AsnName = &v +} + +// GetQualityScore returns the QualityScore field value if set, zero value otherwise. +func (o *VideoView) GetQualityScore() string { + if o == nil || o.QualityScore == nil { + var ret string + return ret + } + return *o.QualityScore +} + +// GetQualityScoreOk returns a tuple with the QualityScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetQualityScoreOk() (*string, bool) { + if o == nil || o.QualityScore == nil { + return nil, false + } + return o.QualityScore, true +} + +// HasQualityScore returns a boolean if a field has been set. +func (o *VideoView) HasQualityScore() bool { + if o != nil && o.QualityScore != nil { + return true + } + + return false +} + +// SetQualityScore gets a reference to the given string and assigns it to the QualityScore field. +func (o *VideoView) SetQualityScore(v string) { + o.QualityScore = &v +} + +// GetPlayerSoftwareVersion returns the PlayerSoftwareVersion field value if set, zero value otherwise. +func (o *VideoView) GetPlayerSoftwareVersion() string { + if o == nil || o.PlayerSoftwareVersion == nil { + var ret string + return ret + } + return *o.PlayerSoftwareVersion +} + +// GetPlayerSoftwareVersionOk returns a tuple with the PlayerSoftwareVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerSoftwareVersionOk() (*string, bool) { + if o == nil || o.PlayerSoftwareVersion == nil { + return nil, false + } + return o.PlayerSoftwareVersion, true +} + +// HasPlayerSoftwareVersion returns a boolean if a field has been set. +func (o *VideoView) HasPlayerSoftwareVersion() bool { + if o != nil && o.PlayerSoftwareVersion != nil { + return true + } + + return false +} + +// SetPlayerSoftwareVersion gets a reference to the given string and assigns it to the PlayerSoftwareVersion field. +func (o *VideoView) SetPlayerSoftwareVersion(v string) { + o.PlayerSoftwareVersion = &v +} + +// GetPlayerMuxPluginName returns the PlayerMuxPluginName field value if set, zero value otherwise. +func (o *VideoView) GetPlayerMuxPluginName() string { + if o == nil || o.PlayerMuxPluginName == nil { + var ret string + return ret + } + return *o.PlayerMuxPluginName +} + +// GetPlayerMuxPluginNameOk returns a tuple with the PlayerMuxPluginName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoView) GetPlayerMuxPluginNameOk() (*string, bool) { + if o == nil || o.PlayerMuxPluginName == nil { + return nil, false + } + return o.PlayerMuxPluginName, true +} + +// HasPlayerMuxPluginName returns a boolean if a field has been set. +func (o *VideoView) HasPlayerMuxPluginName() bool { + if o != nil && o.PlayerMuxPluginName != nil { + return true + } + + return false +} + +// SetPlayerMuxPluginName gets a reference to the given string and assigns it to the PlayerMuxPluginName field. +func (o *VideoView) SetPlayerMuxPluginName(v string) { + o.PlayerMuxPluginName = &v +} + +func (o VideoView) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ViewTotalUpscaling != nil { + toSerialize["view_total_upscaling"] = o.ViewTotalUpscaling + } + if o.PrerollAdAssetHostname != nil { + toSerialize["preroll_ad_asset_hostname"] = o.PrerollAdAssetHostname + } + if o.PlayerSourceDomain != nil { + toSerialize["player_source_domain"] = o.PlayerSourceDomain + } + if o.Region != nil { + toSerialize["region"] = o.Region + } + if o.ViewerUserAgent != nil { + toSerialize["viewer_user_agent"] = o.ViewerUserAgent + } + if o.PrerollRequested != nil { + toSerialize["preroll_requested"] = o.PrerollRequested + } + if o.PageType != nil { + toSerialize["page_type"] = o.PageType + } + if o.StartupScore != nil { + toSerialize["startup_score"] = o.StartupScore + } + if o.ViewSeekDuration != nil { + toSerialize["view_seek_duration"] = o.ViewSeekDuration + } + if o.CountryName != nil { + toSerialize["country_name"] = o.CountryName + } + if o.PlayerSourceHeight != nil { + toSerialize["player_source_height"] = o.PlayerSourceHeight + } + if o.Longitude != nil { + toSerialize["longitude"] = o.Longitude + } + if o.BufferingCount != nil { + toSerialize["buffering_count"] = o.BufferingCount + } + if o.VideoDuration != nil { + toSerialize["video_duration"] = o.VideoDuration + } + if o.PlayerSourceType != nil { + toSerialize["player_source_type"] = o.PlayerSourceType + } + if o.City != nil { + toSerialize["city"] = o.City + } + if o.ViewId != nil { + toSerialize["view_id"] = o.ViewId + } + if o.PlatformDescription != nil { + toSerialize["platform_description"] = o.PlatformDescription + } + if o.VideoStartupPrerollRequestTime != nil { + toSerialize["video_startup_preroll_request_time"] = o.VideoStartupPrerollRequestTime + } + if o.ViewerDeviceName != nil { + toSerialize["viewer_device_name"] = o.ViewerDeviceName + } + if o.VideoSeries != nil { + toSerialize["video_series"] = o.VideoSeries + } + if o.ViewerApplicationName != nil { + toSerialize["viewer_application_name"] = o.ViewerApplicationName + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.ViewTotalContentPlaybackTime != nil { + toSerialize["view_total_content_playback_time"] = o.ViewTotalContentPlaybackTime + } + if o.Cdn != nil { + toSerialize["cdn"] = o.Cdn + } + if o.PlayerInstanceId != nil { + toSerialize["player_instance_id"] = o.PlayerInstanceId + } + if o.VideoLanguage != nil { + toSerialize["video_language"] = o.VideoLanguage + } + if o.PlayerSourceWidth != nil { + toSerialize["player_source_width"] = o.PlayerSourceWidth + } + if o.PlayerErrorMessage != nil { + toSerialize["player_error_message"] = o.PlayerErrorMessage + } + if o.PlayerMuxPluginVersion != nil { + toSerialize["player_mux_plugin_version"] = o.PlayerMuxPluginVersion + } + if o.Watched != nil { + toSerialize["watched"] = o.Watched + } + if o.PlaybackScore != nil { + toSerialize["playback_score"] = o.PlaybackScore + } + if o.PageUrl != nil { + toSerialize["page_url"] = o.PageUrl + } + if o.Metro != nil { + toSerialize["metro"] = o.Metro + } + if o.ViewMaxRequestLatency != nil { + toSerialize["view_max_request_latency"] = o.ViewMaxRequestLatency + } + if o.RequestsForFirstPreroll != nil { + toSerialize["requests_for_first_preroll"] = o.RequestsForFirstPreroll + } + if o.ViewTotalDownscaling != nil { + toSerialize["view_total_downscaling"] = o.ViewTotalDownscaling + } + if o.Latitude != nil { + toSerialize["latitude"] = o.Latitude + } + if o.PlayerSourceHostName != nil { + toSerialize["player_source_host_name"] = o.PlayerSourceHostName + } + if o.InsertedAt != nil { + toSerialize["inserted_at"] = o.InsertedAt + } + if o.ViewEnd != nil { + toSerialize["view_end"] = o.ViewEnd + } + if o.MuxEmbedVersion != nil { + toSerialize["mux_embed_version"] = o.MuxEmbedVersion + } + if o.PlayerLanguage != nil { + toSerialize["player_language"] = o.PlayerLanguage + } + if o.PageLoadTime != nil { + toSerialize["page_load_time"] = o.PageLoadTime + } + if o.ViewerDeviceCategory != nil { + toSerialize["viewer_device_category"] = o.ViewerDeviceCategory + } + if o.VideoStartupPrerollLoadTime != nil { + toSerialize["video_startup_preroll_load_time"] = o.VideoStartupPrerollLoadTime + } + if o.PlayerVersion != nil { + toSerialize["player_version"] = o.PlayerVersion + } + if o.WatchTime != nil { + toSerialize["watch_time"] = o.WatchTime + } + if o.PlayerSourceStreamType != nil { + toSerialize["player_source_stream_type"] = o.PlayerSourceStreamType + } + if o.PrerollAdTagHostname != nil { + toSerialize["preroll_ad_tag_hostname"] = o.PrerollAdTagHostname + } + if o.ViewerDeviceManufacturer != nil { + toSerialize["viewer_device_manufacturer"] = o.ViewerDeviceManufacturer + } + if o.RebufferingScore != nil { + toSerialize["rebuffering_score"] = o.RebufferingScore + } + if o.ExperimentName != nil { + toSerialize["experiment_name"] = o.ExperimentName + } + if o.ViewerOsVersion != nil { + toSerialize["viewer_os_version"] = o.ViewerOsVersion + } + if o.PlayerPreload != nil { + toSerialize["player_preload"] = o.PlayerPreload + } + if o.BufferingDuration != nil { + toSerialize["buffering_duration"] = o.BufferingDuration + } + if o.PlayerViewCount != nil { + toSerialize["player_view_count"] = o.PlayerViewCount + } + if o.PlayerSoftware != nil { + toSerialize["player_software"] = o.PlayerSoftware + } + if o.PlayerLoadTime != nil { + toSerialize["player_load_time"] = o.PlayerLoadTime + } + if o.PlatformSummary != nil { + toSerialize["platform_summary"] = o.PlatformSummary + } + if o.VideoEncodingVariant != nil { + toSerialize["video_encoding_variant"] = o.VideoEncodingVariant + } + if o.PlayerWidth != nil { + toSerialize["player_width"] = o.PlayerWidth + } + if o.ViewSeekCount != nil { + toSerialize["view_seek_count"] = o.ViewSeekCount + } + if o.ViewerExperienceScore != nil { + toSerialize["viewer_experience_score"] = o.ViewerExperienceScore + } + if o.ViewErrorId != nil { + toSerialize["view_error_id"] = o.ViewErrorId + } + if o.VideoVariantName != nil { + toSerialize["video_variant_name"] = o.VideoVariantName + } + if o.PrerollPlayed != nil { + toSerialize["preroll_played"] = o.PrerollPlayed + } + if o.ViewerApplicationEngine != nil { + toSerialize["viewer_application_engine"] = o.ViewerApplicationEngine + } + if o.ViewerOsArchitecture != nil { + toSerialize["viewer_os_architecture"] = o.ViewerOsArchitecture + } + if o.PlayerErrorCode != nil { + toSerialize["player_error_code"] = o.PlayerErrorCode + } + if o.BufferingRate != nil { + toSerialize["buffering_rate"] = o.BufferingRate + } + if o.Events != nil { + toSerialize["events"] = o.Events + } + if o.PlayerName != nil { + toSerialize["player_name"] = o.PlayerName + } + if o.ViewStart != nil { + toSerialize["view_start"] = o.ViewStart + } + if o.ViewAverageRequestThroughput != nil { + toSerialize["view_average_request_throughput"] = o.ViewAverageRequestThroughput + } + if o.VideoProducer != nil { + toSerialize["video_producer"] = o.VideoProducer + } + if o.ErrorTypeId != nil { + toSerialize["error_type_id"] = o.ErrorTypeId + } + if o.MuxViewerId != nil { + toSerialize["mux_viewer_id"] = o.MuxViewerId + } + if o.VideoId != nil { + toSerialize["video_id"] = o.VideoId + } + if o.ContinentCode != nil { + toSerialize["continent_code"] = o.ContinentCode + } + if o.SessionId != nil { + toSerialize["session_id"] = o.SessionId + } + if o.ExitBeforeVideoStart != nil { + toSerialize["exit_before_video_start"] = o.ExitBeforeVideoStart + } + if o.VideoContentType != nil { + toSerialize["video_content_type"] = o.VideoContentType + } + if o.ViewerOsFamily != nil { + toSerialize["viewer_os_family"] = o.ViewerOsFamily + } + if o.PlayerPoster != nil { + toSerialize["player_poster"] = o.PlayerPoster + } + if o.ViewAverageRequestLatency != nil { + toSerialize["view_average_request_latency"] = o.ViewAverageRequestLatency + } + if o.VideoVariantId != nil { + toSerialize["video_variant_id"] = o.VideoVariantId + } + if o.PlayerSourceDuration != nil { + toSerialize["player_source_duration"] = o.PlayerSourceDuration + } + if o.PlayerSourceUrl != nil { + toSerialize["player_source_url"] = o.PlayerSourceUrl + } + if o.MuxApiVersion != nil { + toSerialize["mux_api_version"] = o.MuxApiVersion + } + if o.VideoTitle != nil { + toSerialize["video_title"] = o.VideoTitle + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.ShortTime != nil { + toSerialize["short_time"] = o.ShortTime + } + if o.RebufferPercentage != nil { + toSerialize["rebuffer_percentage"] = o.RebufferPercentage + } + if o.TimeToFirstFrame != nil { + toSerialize["time_to_first_frame"] = o.TimeToFirstFrame + } + if o.ViewerUserId != nil { + toSerialize["viewer_user_id"] = o.ViewerUserId + } + if o.VideoStreamType != nil { + toSerialize["video_stream_type"] = o.VideoStreamType + } + if o.PlayerStartupTime != nil { + toSerialize["player_startup_time"] = o.PlayerStartupTime + } + if o.ViewerApplicationVersion != nil { + toSerialize["viewer_application_version"] = o.ViewerApplicationVersion + } + if o.ViewMaxDownscalePercentage != nil { + toSerialize["view_max_downscale_percentage"] = o.ViewMaxDownscalePercentage + } + if o.ViewMaxUpscalePercentage != nil { + toSerialize["view_max_upscale_percentage"] = o.ViewMaxUpscalePercentage + } + if o.CountryCode != nil { + toSerialize["country_code"] = o.CountryCode + } + if o.UsedFullscreen != nil { + toSerialize["used_fullscreen"] = o.UsedFullscreen + } + if o.Isp != nil { + toSerialize["isp"] = o.Isp + } + if o.PropertyId != nil { + toSerialize["property_id"] = o.PropertyId + } + if o.PlayerAutoplay != nil { + toSerialize["player_autoplay"] = o.PlayerAutoplay + } + if o.PlayerHeight != nil { + toSerialize["player_height"] = o.PlayerHeight + } + if o.Asn != nil { + toSerialize["asn"] = o.Asn + } + if o.AsnName != nil { + toSerialize["asn_name"] = o.AsnName + } + if o.QualityScore != nil { + toSerialize["quality_score"] = o.QualityScore + } + if o.PlayerSoftwareVersion != nil { + toSerialize["player_software_version"] = o.PlayerSoftwareVersion + } + if o.PlayerMuxPluginName != nil { + toSerialize["player_mux_plugin_name"] = o.PlayerMuxPluginName + } + return json.Marshal(toSerialize) +} + +type NullableVideoView struct { + value *VideoView + isSet bool +} + +func (v NullableVideoView) Get() *VideoView { + return v.value +} + +func (v *NullableVideoView) Set(val *VideoView) { + v.value = val + v.isSet = true +} + +func (v NullableVideoView) IsSet() bool { + return v.isSet +} + +func (v *NullableVideoView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVideoView(val *VideoView) *NullableVideoView { + return &NullableVideoView{value: val, isSet: true} +} + +func (v NullableVideoView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVideoView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_video_view_event.go b/model_video_view_event.go index 5c250a2..8dc7426 100644 --- a/model_video_view_event.go +++ b/model_video_view_event.go @@ -1,11 +1,223 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// VideoViewEvent struct for VideoViewEvent type VideoViewEvent struct { - ViewerTime int64 `json:"viewer_time,omitempty"` - PlaybackTime int64 `json:"playback_time,omitempty"` - Name string `json:"name,omitempty"` - EventTime int64 `json:"event_time,omitempty"` + ViewerTime *int64 `json:"viewer_time,omitempty"` + PlaybackTime *int64 `json:"playback_time,omitempty"` + Name *string `json:"name,omitempty"` + EventTime *int64 `json:"event_time,omitempty"` +} + +// NewVideoViewEvent instantiates a new VideoViewEvent 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 NewVideoViewEvent() *VideoViewEvent { + this := VideoViewEvent{} + return &this +} + +// NewVideoViewEventWithDefaults instantiates a new VideoViewEvent 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 NewVideoViewEventWithDefaults() *VideoViewEvent { + this := VideoViewEvent{} + return &this +} + +// GetViewerTime returns the ViewerTime field value if set, zero value otherwise. +func (o *VideoViewEvent) GetViewerTime() int64 { + if o == nil || o.ViewerTime == nil { + var ret int64 + return ret + } + return *o.ViewerTime +} + +// GetViewerTimeOk returns a tuple with the ViewerTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoViewEvent) GetViewerTimeOk() (*int64, bool) { + if o == nil || o.ViewerTime == nil { + return nil, false + } + return o.ViewerTime, true +} + +// HasViewerTime returns a boolean if a field has been set. +func (o *VideoViewEvent) HasViewerTime() bool { + if o != nil && o.ViewerTime != nil { + return true + } + + return false +} + +// SetViewerTime gets a reference to the given int64 and assigns it to the ViewerTime field. +func (o *VideoViewEvent) SetViewerTime(v int64) { + o.ViewerTime = &v +} + +// GetPlaybackTime returns the PlaybackTime field value if set, zero value otherwise. +func (o *VideoViewEvent) GetPlaybackTime() int64 { + if o == nil || o.PlaybackTime == nil { + var ret int64 + return ret + } + return *o.PlaybackTime +} + +// GetPlaybackTimeOk returns a tuple with the PlaybackTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoViewEvent) GetPlaybackTimeOk() (*int64, bool) { + if o == nil || o.PlaybackTime == nil { + return nil, false + } + return o.PlaybackTime, true +} + +// HasPlaybackTime returns a boolean if a field has been set. +func (o *VideoViewEvent) HasPlaybackTime() bool { + if o != nil && o.PlaybackTime != nil { + return true + } + + return false +} + +// SetPlaybackTime gets a reference to the given int64 and assigns it to the PlaybackTime field. +func (o *VideoViewEvent) SetPlaybackTime(v int64) { + o.PlaybackTime = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *VideoViewEvent) GetName() string { + if o == nil || o.Name == nil { + 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 *VideoViewEvent) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *VideoViewEvent) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *VideoViewEvent) SetName(v string) { + o.Name = &v +} + +// GetEventTime returns the EventTime field value if set, zero value otherwise. +func (o *VideoViewEvent) GetEventTime() int64 { + if o == nil || o.EventTime == nil { + var ret int64 + return ret + } + return *o.EventTime +} + +// GetEventTimeOk returns a tuple with the EventTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoViewEvent) GetEventTimeOk() (*int64, bool) { + if o == nil || o.EventTime == nil { + return nil, false + } + return o.EventTime, true +} + +// HasEventTime returns a boolean if a field has been set. +func (o *VideoViewEvent) HasEventTime() bool { + if o != nil && o.EventTime != nil { + return true + } + + return false +} + +// SetEventTime gets a reference to the given int64 and assigns it to the EventTime field. +func (o *VideoViewEvent) SetEventTime(v int64) { + o.EventTime = &v +} + +func (o VideoViewEvent) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ViewerTime != nil { + toSerialize["viewer_time"] = o.ViewerTime + } + if o.PlaybackTime != nil { + toSerialize["playback_time"] = o.PlaybackTime + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.EventTime != nil { + toSerialize["event_time"] = o.EventTime + } + return json.Marshal(toSerialize) +} + +type NullableVideoViewEvent struct { + value *VideoViewEvent + isSet bool +} + +func (v NullableVideoViewEvent) Get() *VideoViewEvent { + return v.value +} + +func (v *NullableVideoViewEvent) Set(val *VideoViewEvent) { + v.value = val + v.isSet = true +} + +func (v NullableVideoViewEvent) IsSet() bool { + return v.isSet +} + +func (v *NullableVideoViewEvent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVideoViewEvent(val *VideoViewEvent) *NullableVideoViewEvent { + return &NullableVideoViewEvent{value: val, isSet: true} +} + +func (v NullableVideoViewEvent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVideoViewEvent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_video_view_response.go b/model_video_view_response.go index b73626b..606263e 100644 --- a/model_video_view_response.go +++ b/model_video_view_response.go @@ -1,9 +1,151 @@ -// Mux Go - Copyright 2019 Mux Inc. -// NOTE: This file is auto generated. Do not edit this file manually. +/* + * Mux API + * + * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + * + * API version: v1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package muxgo +import ( + "encoding/json" +) + +// VideoViewResponse struct for VideoViewResponse type VideoViewResponse struct { - Data VideoView `json:"data,omitempty"` - Timeframe []int64 `json:"timeframe,omitempty"` + Data *VideoView `json:"data,omitempty"` + Timeframe *[]int64 `json:"timeframe,omitempty"` +} + +// NewVideoViewResponse instantiates a new VideoViewResponse 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 NewVideoViewResponse() *VideoViewResponse { + this := VideoViewResponse{} + return &this +} + +// NewVideoViewResponseWithDefaults instantiates a new VideoViewResponse 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 NewVideoViewResponseWithDefaults() *VideoViewResponse { + this := VideoViewResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *VideoViewResponse) GetData() VideoView { + if o == nil || o.Data == nil { + var ret VideoView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoViewResponse) GetDataOk() (*VideoView, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *VideoViewResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given VideoView and assigns it to the Data field. +func (o *VideoViewResponse) SetData(v VideoView) { + o.Data = &v +} + +// GetTimeframe returns the Timeframe field value if set, zero value otherwise. +func (o *VideoViewResponse) GetTimeframe() []int64 { + if o == nil || o.Timeframe == nil { + var ret []int64 + return ret + } + return *o.Timeframe +} + +// GetTimeframeOk returns a tuple with the Timeframe field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoViewResponse) GetTimeframeOk() (*[]int64, bool) { + if o == nil || o.Timeframe == nil { + return nil, false + } + return o.Timeframe, true +} + +// HasTimeframe returns a boolean if a field has been set. +func (o *VideoViewResponse) HasTimeframe() bool { + if o != nil && o.Timeframe != nil { + return true + } + + return false } + +// SetTimeframe gets a reference to the given []int64 and assigns it to the Timeframe field. +func (o *VideoViewResponse) SetTimeframe(v []int64) { + o.Timeframe = &v +} + +func (o VideoViewResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Timeframe != nil { + toSerialize["timeframe"] = o.Timeframe + } + return json.Marshal(toSerialize) +} + +type NullableVideoViewResponse struct { + value *VideoViewResponse + isSet bool +} + +func (v NullableVideoViewResponse) Get() *VideoViewResponse { + return v.value +} + +func (v *NullableVideoViewResponse) Set(val *VideoViewResponse) { + v.value = val + v.isSet = true +} + +func (v NullableVideoViewResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableVideoViewResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVideoViewResponse(val *VideoViewResponse) *NullableVideoViewResponse { + return &NullableVideoViewResponse{value: val, isSet: true} +} + +func (v NullableVideoViewResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVideoViewResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +