diff --git a/api_dimensions.go b/api_dimensions.go new file mode 100644 index 0000000..537e02f --- /dev/null +++ b/api_dimensions.go @@ -0,0 +1,195 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +import ( + "fmt" + "io/ioutil" + "net/url" + "strings" +) + +type DimensionsApiService service + +type ListDimensionValuesParams struct { + Limit int32 + Page int32 + Filters []string + Timeframe []string +} + +// ListDimensionValues optionally accepts the APIOption of WithParams(*ListDimensionValuesParams). +func (a *DimensionsApiService) ListDimensionValues(dIMENSIONID string, opts ...APIOption) (ListDimensionValuesResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + 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") + } + + // 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) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Limit) { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Page) { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.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 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) + } + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +func (a *DimensionsApiService) ListDimensions(opts ...APIOption) (ListDimensionsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListDimensionsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/dimensions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} diff --git a/api_incidents.go b/api_incidents.go new file mode 100644 index 0000000..0edea7f --- /dev/null +++ b/api_incidents.go @@ -0,0 +1,295 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +import ( + "fmt" + "io/ioutil" + "net/url" + "strings" +) + +type IncidentsApiService service + +func (a *IncidentsApiService) GetIncident(iNCIDENTID string, opts ...APIOption) (IncidentResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue IncidentResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // 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) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +type ListIncidentsParams struct { + Limit int32 + Page int32 + OrderBy string + OrderDirection string + Status string + Severity string +} + +// ListIncidents optionally accepts the APIOption of WithParams(*ListIncidentsParams). +func (a *IncidentsApiService) ListIncidents(opts ...APIOption) (ListIncidentsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + 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") + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/incidents" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Limit) { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Page) { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { + localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { + localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Status) { + localVarQueryParams.Add("status", parameterToString(localVarOptionals.Status, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Severity) { + localVarQueryParams.Add("severity", parameterToString(localVarOptionals.Severity, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +type ListRelatedIncidentsParams struct { + Limit int32 + Page int32 + OrderBy string + OrderDirection string +} + +// ListRelatedIncidents optionally accepts the APIOption of WithParams(*ListRelatedIncidentsParams). +func (a *IncidentsApiService) ListRelatedIncidents(iNCIDENTID string, opts ...APIOption) (ListRelatedIncidentsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + 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") + } + + // 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) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && isSet(localVarOptionals.Limit) { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.Page) { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { + localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { + localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} diff --git a/api_real_time.go b/api_real_time.go new file mode 100644 index 0000000..908916d --- /dev/null +++ b/api_real_time.go @@ -0,0 +1,453 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +import ( + "fmt" + "io/ioutil" + "net/url" + "strings" +) + +type RealTimeApiService service + +type GetRealtimeBreakdownParams struct { + Dimension string + Timestamp float64 + Filters []string + OrderBy string + OrderDirection string +} + +// GetRealtimeBreakdown optionally accepts the APIOption of WithParams(*GetRealtimeBreakdownParams). +func (a *RealTimeApiService) GetRealtimeBreakdown(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeBreakdownResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + 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") + } + + // 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) + + 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) + } + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderBy) { + localVarQueryParams.Add("order_by", parameterToString(localVarOptionals.OrderBy, "")) + } + if localVarOptionals != nil && isSet(localVarOptionals.OrderDirection) { + localVarQueryParams.Add("order_direction", parameterToString(localVarOptionals.OrderDirection, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +type GetRealtimeHistogramTimeseriesParams struct { + Filters []string +} + +// GetRealtimeHistogramTimeseries optionally accepts the APIOption of WithParams(*GetRealtimeHistogramTimeseriesParams). +func (a *RealTimeApiService) GetRealtimeHistogramTimeseries(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeHistogramTimeseriesResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + 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") + } + + // 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) + + 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) + } + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +type GetRealtimeTimeseriesParams struct { + Filters []string +} + +// GetRealtimeTimeseries optionally accepts the APIOption of WithParams(*GetRealtimeTimeseriesParams). +func (a *RealTimeApiService) GetRealtimeTimeseries(rEALTIMEMETRICID string, opts ...APIOption) (GetRealTimeTimeseriesResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + 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") + } + + // 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) + + 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) + } + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +func (a *RealTimeApiService) ListRealtimeDimensions(opts ...APIOption) (ListRealTimeDimensionsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListRealTimeDimensionsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/dimensions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} + +func (a *RealTimeApiService) ListRealtimeMetrics(opts ...APIOption) (ListRealTimeMetricsResponse, error) { + var ( + localVarAPIOptions = new(APIOptions) + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ListRealTimeMetricsResponse + ) + + for _, opt := range opts { + opt(localVarAPIOptions) + } + + // create path and map variables + localVarPath := a.client.cfg.basePath + "/data/v1/realtime/metrics" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + + r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, err + } + + // Check for common HTTP error status codes + err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) + if err != nil { + return localVarReturnValue, err + } + + 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, nil +} diff --git a/client.go b/client.go index 3134c5d..68d0543 100644 --- a/client.go +++ b/client.go @@ -39,12 +39,15 @@ type APIClient struct { // API Services AssetsApi *AssetsApiService DeliveryUsageApi *DeliveryUsageApiService + DimensionsApi *DimensionsApiService DirectUploadsApi *DirectUploadsApiService ErrorsApi *ErrorsApiService ExportsApi *ExportsApiService FiltersApi *FiltersApiService + IncidentsApi *IncidentsApiService LiveStreamsApi *LiveStreamsApiService MetricsApi *MetricsApiService + RealTimeApi *RealTimeApiService URLSigningKeysApi *URLSigningKeysApiService VideoViewsApi *VideoViewsApiService } @@ -65,12 +68,15 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.AssetsApi = (*AssetsApiService)(&c.common) c.DeliveryUsageApi = (*DeliveryUsageApiService)(&c.common) + c.DimensionsApi = (*DimensionsApiService)(&c.common) c.DirectUploadsApi = (*DirectUploadsApiService)(&c.common) c.ErrorsApi = (*ErrorsApiService)(&c.common) c.ExportsApi = (*ExportsApiService)(&c.common) c.FiltersApi = (*FiltersApiService)(&c.common) + c.IncidentsApi = (*IncidentsApiService)(&c.common) c.LiveStreamsApi = (*LiveStreamsApiService)(&c.common) c.MetricsApi = (*MetricsApiService)(&c.common) + c.RealTimeApi = (*RealTimeApiService)(&c.common) c.URLSigningKeysApi = (*URLSigningKeysApiService)(&c.common) c.VideoViewsApi = (*VideoViewsApiService)(&c.common) diff --git a/docs/DimensionValue.md b/docs/DimensionValue.md new file mode 100644 index 0000000..a31d6ca --- /dev/null +++ b/docs/DimensionValue.md @@ -0,0 +1,11 @@ +# DimensionValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**TotalCount** | **int64** | | [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/DimensionsApi.md b/docs/DimensionsApi.md new file mode 100644 index 0000000..76e2e1e --- /dev/null +++ b/docs/DimensionsApi.md @@ -0,0 +1,74 @@ +# \DimensionsApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDimensionValues**](DimensionsApi.md#ListDimensionValues) | **Get** /data/v1/dimensions/{DIMENSION_ID} | Lists the values for a specific dimension +[**ListDimensions**](DimensionsApi.md#ListDimensions) | **Get** /data/v1/dimensions | List Dimensions + + +# **ListDimensionValues** +> ListDimensionValuesResponse ListDimensionValues(ctx, dIMENSIONID, optional) +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 + +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 + +### 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. | + +### Return type + +[**ListDimensionValuesResponse**](ListDimensionValuesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + +# **ListDimensions** +> ListDimensionsResponse ListDimensions(ctx, ) +List Dimensions + +List all available dimensions. Note: This API replaces the list-filters API call. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListDimensionsResponse**](ListDimensionsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + diff --git a/docs/FiltersApi.md b/docs/FiltersApi.md index 4d590d9..dbafe70 100644 --- a/docs/FiltersApi.md +++ b/docs/FiltersApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description > ListFilterValuesResponse ListFilterValues(ctx, fILTERID, optional) Lists values for a specific filter -Lists the values for a filter along with a total count of related views +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 @@ -52,7 +52,7 @@ Name | Type | Description | Notes > ListFiltersResponse ListFilters(ctx, ) List Filters -Lists all the filters broken out into basic and advanced +Deprecated: The API has been replaced by the list-dimensions API call. Lists all the filters broken out into basic and advanced. ### Required Parameters This endpoint does not need any parameter. diff --git a/docs/GetRealTimeBreakdownResponse.md b/docs/GetRealTimeBreakdownResponse.md new file mode 100644 index 0000000..b6fdc16 --- /dev/null +++ b/docs/GetRealTimeBreakdownResponse.md @@ -0,0 +1,12 @@ +# GetRealTimeBreakdownResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RealTimeBreakdownValue**](RealTimeBreakdownValue.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/GetRealTimeHistogramTimeseriesResponse.md b/docs/GetRealTimeHistogramTimeseriesResponse.md new file mode 100644 index 0000000..680c501 --- /dev/null +++ b/docs/GetRealTimeHistogramTimeseriesResponse.md @@ -0,0 +1,13 @@ +# GetRealTimeHistogramTimeseriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**GetRealTimeHistogramTimeseriesResponseMeta**](GetRealTimeHistogramTimeseriesResponse_meta.md) | | [optional] +**Data** | [**[]RealTimeHistogramTimeseriesDatapoint**](RealTimeHistogramTimeseriesDatapoint.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/GetRealTimeHistogramTimeseriesResponseMeta.md b/docs/GetRealTimeHistogramTimeseriesResponseMeta.md new file mode 100644 index 0000000..7a51c22 --- /dev/null +++ b/docs/GetRealTimeHistogramTimeseriesResponseMeta.md @@ -0,0 +1,10 @@ +# GetRealTimeHistogramTimeseriesResponseMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Buckets** | [**[]RealTimeHistogramTimeseriesBucket**](RealTimeHistogramTimeseriesBucket.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/GetRealTimeTimeseriesResponse.md b/docs/GetRealTimeTimeseriesResponse.md new file mode 100644 index 0000000..0510fa8 --- /dev/null +++ b/docs/GetRealTimeTimeseriesResponse.md @@ -0,0 +1,12 @@ +# GetRealTimeTimeseriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RealTimeTimeseriesDatapoint**](RealTimeTimeseriesDatapoint.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/Incident.md b/docs/Incident.md new file mode 100644 index 0000000..41d5416 --- /dev/null +++ b/docs/Incident.md @@ -0,0 +1,30 @@ +# 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] + +[[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 new file mode 100644 index 0000000..08ad0da --- /dev/null +++ b/docs/IncidentBreakdown.md @@ -0,0 +1,12 @@ +# IncidentBreakdown + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**Name** | **string** | | [optional] +**Id** | **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/IncidentNotification.md b/docs/IncidentNotification.md new file mode 100644 index 0000000..b8fa797 --- /dev/null +++ b/docs/IncidentNotification.md @@ -0,0 +1,12 @@ +# IncidentNotification + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueuedAt** | **string** | | [optional] +**Id** | **int64** | | [optional] +**AttemptedAt** | **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/IncidentNotificationRule.md b/docs/IncidentNotificationRule.md new file mode 100644 index 0000000..8d14acb --- /dev/null +++ b/docs/IncidentNotificationRule.md @@ -0,0 +1,14 @@ +# IncidentNotificationRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | [optional] +**Rules** | [**[]NotificationRule**](NotificationRule.md) | | [optional] +**PropertyId** | **string** | | [optional] +**Id** | **string** | | [optional] +**Action** | **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/IncidentResponse.md b/docs/IncidentResponse.md new file mode 100644 index 0000000..1cb1748 --- /dev/null +++ b/docs/IncidentResponse.md @@ -0,0 +1,11 @@ +# IncidentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Incident**](.md) | | [optional] +**Timeframe** | **[]int64** | | [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/IncidentsApi.md b/docs/IncidentsApi.md new file mode 100644 index 0000000..e0b3557 --- /dev/null +++ b/docs/IncidentsApi.md @@ -0,0 +1,119 @@ +# \IncidentsApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIncident**](IncidentsApi.md#GetIncident) | **Get** /data/v1/incidents/{INCIDENT_ID} | Get an Incident +[**ListIncidents**](IncidentsApi.md#ListIncidents) | **Get** /data/v1/incidents | List Incidents +[**ListRelatedIncidents**](IncidentsApi.md#ListRelatedIncidents) | **Get** /data/v1/incidents/{INCIDENT_ID}/related | List Related Incidents + + +# **GetIncident** +> IncidentResponse GetIncident(ctx, iNCIDENTID) +Get an Incident + +Returns the details of an incident + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **iNCIDENTID** | **string**| ID of the Incident | + +### Return type + +[**IncidentResponse**](IncidentResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + +# **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 + +### 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 | + +### Return type + +[**ListIncidentsResponse**](ListIncidentsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + +# **ListRelatedIncidents** +> ListRelatedIncidentsResponse ListRelatedIncidents(ctx, iNCIDENTID, optional) +List Related Incidents + +Returns all the incidents that seem related to a specific incident + +### Required 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 + +### 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. | + +### Return type + +[**ListRelatedIncidentsResponse**](ListRelatedIncidentsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + diff --git a/docs/ListDimensionValuesResponse.md b/docs/ListDimensionValuesResponse.md new file mode 100644 index 0000000..55d1021 --- /dev/null +++ b/docs/ListDimensionValuesResponse.md @@ -0,0 +1,12 @@ +# ListDimensionValuesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]DimensionValue**](DimensionValue.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/ListDimensionsResponse.md b/docs/ListDimensionsResponse.md new file mode 100644 index 0000000..0aa9fe1 --- /dev/null +++ b/docs/ListDimensionsResponse.md @@ -0,0 +1,12 @@ +# ListDimensionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ListFiltersResponseData**](ListFiltersResponse_data.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/ListIncidentsResponse.md b/docs/ListIncidentsResponse.md new file mode 100644 index 0000000..acfaf31 --- /dev/null +++ b/docs/ListIncidentsResponse.md @@ -0,0 +1,12 @@ +# ListIncidentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Incident**](Incident.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/ListRealTimeDimensionsResponse.md b/docs/ListRealTimeDimensionsResponse.md new file mode 100644 index 0000000..fed007c --- /dev/null +++ b/docs/ListRealTimeDimensionsResponse.md @@ -0,0 +1,12 @@ +# ListRealTimeDimensionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponse_data.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/ListRealTimeDimensionsResponseData.md b/docs/ListRealTimeDimensionsResponseData.md new file mode 100644 index 0000000..ebae1b3 --- /dev/null +++ b/docs/ListRealTimeDimensionsResponseData.md @@ -0,0 +1,11 @@ +# ListRealTimeDimensionsResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**DisplayName** | **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/ListRealTimeMetricsResponse.md b/docs/ListRealTimeMetricsResponse.md new file mode 100644 index 0000000..532de6c --- /dev/null +++ b/docs/ListRealTimeMetricsResponse.md @@ -0,0 +1,12 @@ +# ListRealTimeMetricsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]ListRealTimeDimensionsResponseData**](ListRealTimeDimensionsResponse_data.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/ListRelatedIncidentsResponse.md b/docs/ListRelatedIncidentsResponse.md new file mode 100644 index 0000000..c60872e --- /dev/null +++ b/docs/ListRelatedIncidentsResponse.md @@ -0,0 +1,12 @@ +# ListRelatedIncidentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Incident**](Incident.md) | | [optional] +**TotalRowCount** | **int64** | | [optional] +**Timeframe** | **[]int64** | | [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/NotificationRule.md b/docs/NotificationRule.md new file mode 100644 index 0000000..5f2ca8b --- /dev/null +++ b/docs/NotificationRule.md @@ -0,0 +1,12 @@ +# NotificationRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**Name** | **string** | | [optional] +**Id** | **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/RealTimeApi.md b/docs/RealTimeApi.md new file mode 100644 index 0000000..6219d88 --- /dev/null +++ b/docs/RealTimeApi.md @@ -0,0 +1,176 @@ +# \RealTimeApi + +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 +[**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) +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 + +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 + +### 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. | + +### Return type + +[**GetRealTimeBreakdownResponse**](GetRealTimeBreakdownResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + +# **GetRealtimeHistogramTimeseries** +> GetRealTimeHistogramTimeseriesResponse GetRealtimeHistogramTimeseries(ctx, rEALTIMEMETRICID, optional) +Get Real-Time Histogram Timeseries + +Gets histogram timeseries information for a specific metric. + +### Required 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 + +### 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. | + +### Return type + +[**GetRealTimeHistogramTimeseriesResponse**](GetRealTimeHistogramTimeseriesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + +# **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 + +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 + +### 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. | + +### Return type + +[**GetRealTimeTimeseriesResponse**](GetRealTimeTimeseriesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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** +> ListRealTimeDimensionsResponse ListRealtimeDimensions(ctx, ) +List Real-Time Dimensions + +Lists availiable real-time dimensions + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListRealTimeDimensionsResponse**](ListRealTimeDimensionsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + +# **ListRealtimeMetrics** +> ListRealTimeMetricsResponse ListRealtimeMetrics(ctx, ) +List Real-Time Metrics + +Lists availiable real-time metrics. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListRealTimeMetricsResponse**](ListRealTimeMetricsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **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) + diff --git a/docs/RealTimeBreakdownValue.md b/docs/RealTimeBreakdownValue.md new file mode 100644 index 0000000..7a0146c --- /dev/null +++ b/docs/RealTimeBreakdownValue.md @@ -0,0 +1,14 @@ +# RealTimeBreakdownValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | [optional] +**NegativeImpact** | **int64** | | [optional] +**MetricValue** | **float64** | | [optional] +**DisplayValue** | **string** | | [optional] +**ConcurentViewers** | **int64** | | [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/RealTimeHistogramTimeseriesBucket.md b/docs/RealTimeHistogramTimeseriesBucket.md new file mode 100644 index 0000000..82a3dae --- /dev/null +++ b/docs/RealTimeHistogramTimeseriesBucket.md @@ -0,0 +1,11 @@ +# RealTimeHistogramTimeseriesBucket + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Start** | **int64** | | [optional] +**End** | **int64** | | [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/RealTimeHistogramTimeseriesBucketValues.md b/docs/RealTimeHistogramTimeseriesBucketValues.md new file mode 100644 index 0000000..001fc43 --- /dev/null +++ b/docs/RealTimeHistogramTimeseriesBucketValues.md @@ -0,0 +1,11 @@ +# RealTimeHistogramTimeseriesBucketValues + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Percentage** | **float64** | | [optional] +**Count** | **int64** | | [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/RealTimeHistogramTimeseriesDatapoint.md b/docs/RealTimeHistogramTimeseriesDatapoint.md new file mode 100644 index 0000000..8ea4e02 --- /dev/null +++ b/docs/RealTimeHistogramTimeseriesDatapoint.md @@ -0,0 +1,16 @@ +# RealTimeHistogramTimeseriesDatapoint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Timestamp** | **string** | | [optional] +**Sum** | **int64** | | [optional] +**P95** | **int64** | | [optional] +**Median** | **int64** | | [optional] +**MaxPercentage** | **float64** | | [optional] +**BucketValues** | [**[]RealTimeHistogramTimeseriesBucketValues**](RealTimeHistogramTimeseriesBucketValues.md) | | [optional] +**Average** | **float64** | | [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/RealTimeTimeseriesDatapoint.md b/docs/RealTimeTimeseriesDatapoint.md new file mode 100644 index 0000000..ad000bd --- /dev/null +++ b/docs/RealTimeTimeseriesDatapoint.md @@ -0,0 +1,12 @@ +# RealTimeTimeseriesDatapoint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **float64** | | [optional] +**Date** | **string** | | [optional] +**ConcurentViewers** | **int64** | | [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/model_dimension_value.go b/model_dimension_value.go new file mode 100644 index 0000000..03559ba --- /dev/null +++ b/model_dimension_value.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type DimensionValue struct { + Value string `json:"value,omitempty"` + TotalCount int64 `json:"total_count,omitempty"` +} diff --git a/model_get_real_time_breakdown_response.go b/model_get_real_time_breakdown_response.go new file mode 100644 index 0000000..bfeefb9 --- /dev/null +++ b/model_get_real_time_breakdown_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeBreakdownResponse struct { + Data []RealTimeBreakdownValue `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_get_real_time_histogram_timeseries_response.go b/model_get_real_time_histogram_timeseries_response.go new file mode 100644 index 0000000..b6d4117 --- /dev/null +++ b/model_get_real_time_histogram_timeseries_response.go @@ -0,0 +1,11 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +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"` +} diff --git a/model_get_real_time_histogram_timeseries_response_meta.go b/model_get_real_time_histogram_timeseries_response_meta.go new file mode 100644 index 0000000..f12c3ec --- /dev/null +++ b/model_get_real_time_histogram_timeseries_response_meta.go @@ -0,0 +1,8 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeHistogramTimeseriesResponseMeta struct { + Buckets []RealTimeHistogramTimeseriesBucket `json:"buckets,omitempty"` +} diff --git a/model_get_real_time_timeseries_response.go b/model_get_real_time_timeseries_response.go new file mode 100644 index 0000000..be4344e --- /dev/null +++ b/model_get_real_time_timeseries_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type GetRealTimeTimeseriesResponse struct { + Data []RealTimeTimeseriesDatapoint `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_incident.go b/model_incident.go new file mode 100644 index 0000000..3d76c35 --- /dev/null +++ b/model_incident.go @@ -0,0 +1,28 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +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"` +} diff --git a/model_incident_breakdown.go b/model_incident_breakdown.go new file mode 100644 index 0000000..c30f65f --- /dev/null +++ b/model_incident_breakdown.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentBreakdown struct { + Value string `json:"value,omitempty"` + Name string `json:"name,omitempty"` + Id string `json:"id,omitempty"` +} diff --git a/model_incident_notification.go b/model_incident_notification.go new file mode 100644 index 0000000..ccdfe83 --- /dev/null +++ b/model_incident_notification.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentNotification struct { + QueuedAt string `json:"queued_at,omitempty"` + Id int64 `json:"id,omitempty"` + AttemptedAt string `json:"attempted_at,omitempty"` +} diff --git a/model_incident_notification_rule.go b/model_incident_notification_rule.go new file mode 100644 index 0000000..fdd9e38 --- /dev/null +++ b/model_incident_notification_rule.go @@ -0,0 +1,12 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +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"` +} diff --git a/model_incident_response.go b/model_incident_response.go new file mode 100644 index 0000000..64c4670 --- /dev/null +++ b/model_incident_response.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type IncidentResponse struct { + Data Incident `json:"data,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_dimension_values_response.go b/model_list_dimension_values_response.go new file mode 100644 index 0000000..5549ee5 --- /dev/null +++ b/model_list_dimension_values_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListDimensionValuesResponse struct { + Data []DimensionValue `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_dimensions_response.go b/model_list_dimensions_response.go new file mode 100644 index 0000000..1bfc2e1 --- /dev/null +++ b/model_list_dimensions_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListDimensionsResponse struct { + Data ListFiltersResponseData `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_incidents_response.go b/model_list_incidents_response.go new file mode 100644 index 0000000..f584447 --- /dev/null +++ b/model_list_incidents_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListIncidentsResponse struct { + Data []Incident `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_real_time_dimensions_response.go b/model_list_real_time_dimensions_response.go new file mode 100644 index 0000000..5e811ee --- /dev/null +++ b/model_list_real_time_dimensions_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRealTimeDimensionsResponse struct { + Data []ListRealTimeDimensionsResponseData `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_real_time_dimensions_response_data.go b/model_list_real_time_dimensions_response_data.go new file mode 100644 index 0000000..5a951a8 --- /dev/null +++ b/model_list_real_time_dimensions_response_data.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRealTimeDimensionsResponseData struct { + Name string `json:"name,omitempty"` + DisplayName string `json:"display_name,omitempty"` +} diff --git a/model_list_real_time_metrics_response.go b/model_list_real_time_metrics_response.go new file mode 100644 index 0000000..a534c83 --- /dev/null +++ b/model_list_real_time_metrics_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRealTimeMetricsResponse struct { + Data []ListRealTimeDimensionsResponseData `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_list_related_incidents_response.go b/model_list_related_incidents_response.go new file mode 100644 index 0000000..a5ce0c1 --- /dev/null +++ b/model_list_related_incidents_response.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type ListRelatedIncidentsResponse struct { + Data []Incident `json:"data,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + Timeframe []int64 `json:"timeframe,omitempty"` +} diff --git a/model_notification_rule.go b/model_notification_rule.go new file mode 100644 index 0000000..cd986d8 --- /dev/null +++ b/model_notification_rule.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type NotificationRule struct { + Value string `json:"value,omitempty"` + Name string `json:"name,omitempty"` + Id string `json:"id,omitempty"` +} diff --git a/model_real_time_breakdown_value.go b/model_real_time_breakdown_value.go new file mode 100644 index 0000000..51885cc --- /dev/null +++ b/model_real_time_breakdown_value.go @@ -0,0 +1,12 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +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"` +} diff --git a/model_real_time_histogram_timeseries_bucket.go b/model_real_time_histogram_timeseries_bucket.go new file mode 100644 index 0000000..f3354c3 --- /dev/null +++ b/model_real_time_histogram_timeseries_bucket.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeHistogramTimeseriesBucket struct { + Start int64 `json:"start,omitempty"` + End int64 `json:"end,omitempty"` +} diff --git a/model_real_time_histogram_timeseries_bucket_values.go b/model_real_time_histogram_timeseries_bucket_values.go new file mode 100644 index 0000000..735ee68 --- /dev/null +++ b/model_real_time_histogram_timeseries_bucket_values.go @@ -0,0 +1,9 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeHistogramTimeseriesBucketValues struct { + Percentage float64 `json:"percentage,omitempty"` + Count int64 `json:"count,omitempty"` +} diff --git a/model_real_time_histogram_timeseries_datapoint.go b/model_real_time_histogram_timeseries_datapoint.go new file mode 100644 index 0000000..6741e64 --- /dev/null +++ b/model_real_time_histogram_timeseries_datapoint.go @@ -0,0 +1,14 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeHistogramTimeseriesDatapoint struct { + Timestamp string `json:"timestamp,omitempty"` + Sum int64 `json:"sum,omitempty"` + P95 int64 `json:"p95,omitempty"` + Median int64 `json:"median,omitempty"` + MaxPercentage float64 `json:"max_percentage,omitempty"` + BucketValues []RealTimeHistogramTimeseriesBucketValues `json:"bucket_values,omitempty"` + Average float64 `json:"average,omitempty"` +} diff --git a/model_real_time_timeseries_datapoint.go b/model_real_time_timeseries_datapoint.go new file mode 100644 index 0000000..e594621 --- /dev/null +++ b/model_real_time_timeseries_datapoint.go @@ -0,0 +1,10 @@ +// Mux Go - Copyright 2019 Mux Inc. +// NOTE: This file is auto generated. Do not edit this file manually. + +package muxgo + +type RealTimeTimeseriesDatapoint struct { + Value float64 `json:"value,omitempty"` + Date string `json:"date,omitempty"` + ConcurentViewers int64 `json:"concurent_viewers,omitempty"` +}