From 7dec396e30f16ad80f825cb031ed4c876544b979 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 Nov 2020 02:34:59 +0000 Subject: [PATCH] CodeGen from PR 11462 in Azure/azure-rest-api-specs Fix Swagger Linting issues reported (#11462) * Fixing linting issues according to report (task 8554751) * Adding a default response to operations --- .../timeseriesinsights/models.go | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go index 263f1fbbac51..4e8709b86fb0 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/models.go @@ -77,7 +77,8 @@ type AccessPolicyListResponse struct { Value *[]AccessPolicyResource `json:"value,omitempty"` } -// AccessPolicyMutableProperties an object that represents a set of mutable access policy resource properties. +// AccessPolicyMutableProperties an object that represents a set of mutable access policy resource +// properties. type AccessPolicyMutableProperties struct { // Description - An description of the access policy. Description *string `json:"description,omitempty"` @@ -207,7 +208,8 @@ func (apup *AccessPolicyUpdateParameters) UnmarshalJSON(body []byte) error { return nil } -// AzureEventSourceProperties properties of an event source that reads events from an event broker in Azure. +// AzureEventSourceProperties properties of an event source that reads events from an event broker in +// Azure. type AzureEventSourceProperties struct { // EventSourceResourceID - The resource id of the event source in Azure Resource Manager. EventSourceResourceID *string `json:"eventSourceResourceId,omitempty"` @@ -248,8 +250,8 @@ type CloudErrorBody struct { Details *[]CloudErrorBody `json:"details,omitempty"` } -// CreateOrUpdateTrackedResourceProperties properties required to create any resource tracked by Azure Resource -// Manager. +// CreateOrUpdateTrackedResourceProperties properties required to create any resource tracked by Azure +// Resource Manager. type CreateOrUpdateTrackedResourceProperties struct { // Location - The location of the resource. Location *string `json:"location,omitempty"` @@ -369,8 +371,8 @@ type EnvironmentMutableProperties struct { DataRetentionTime *string `json:"dataRetentionTime,omitempty"` } -// EnvironmentResource an environment is a set of time-series data available for query, and is the top level -// Azure Time Series Insights resource. +// EnvironmentResource an environment is a set of time-series data available for query, and is the top +// level Azure Time Series Insights resource. type EnvironmentResource struct { autorest.Response `json:"-"` Sku *Sku `json:"sku,omitempty"` @@ -511,8 +513,8 @@ func (erp EnvironmentResourceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// EnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// EnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type EnvironmentsCreateOrUpdateFuture struct { azure.Future } @@ -782,8 +784,8 @@ func (ehescoup *EventHubEventSourceCreateOrUpdateParameters) UnmarshalJSON(body return nil } -// EventHubEventSourceCreationProperties properties of the EventHub event source that are required on create or -// update requests. +// EventHubEventSourceCreationProperties properties of the EventHub event source that are required on +// create or update requests. type EventHubEventSourceCreationProperties struct { // SharedAccessKey - The value of the shared access key that grants the Time Series Insights service read access to the event hub. This property is not shown in event source responses. SharedAccessKey *string `json:"sharedAccessKey,omitempty"` @@ -1020,8 +1022,8 @@ func (ehesrp EventHubEventSourceResourceProperties) MarshalJSON() ([]byte, error return json.Marshal(objectMap) } -// EventHubEventSourceUpdateParameters parameters supplied to the Update Event Source operation to update an -// EventHub event source. +// EventHubEventSourceUpdateParameters parameters supplied to the Update Event Source operation to update +// an EventHub event source. type EventHubEventSourceUpdateParameters struct { // EventHubEventSourceMutableProperties - Properties of the EventHub event source. *EventHubEventSourceMutableProperties `json:"properties,omitempty"` @@ -1217,7 +1219,8 @@ func (eslr *EventSourceListResponse) UnmarshalJSON(body []byte) error { return nil } -// EventSourceMutableProperties an object that represents a set of mutable event source resource properties. +// EventSourceMutableProperties an object that represents a set of mutable event source resource +// properties. type EventSourceMutableProperties struct { // TimestampPropertyName - The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. TimestampPropertyName *string `json:"timestampPropertyName,omitempty"` @@ -1400,8 +1403,8 @@ func (ithescp IoTHubEventSourceCommonProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// IoTHubEventSourceCreateOrUpdateParameters parameters supplied to the Create or Update Event Source operation -// for an IoTHub event source. +// IoTHubEventSourceCreateOrUpdateParameters parameters supplied to the Create or Update Event Source +// operation for an IoTHub event source. type IoTHubEventSourceCreateOrUpdateParameters struct { *IoTHubEventSourceCreationProperties `json:"properties,omitempty"` // Kind - Possible values include: 'KindEventSourceCreateOrUpdateParameters', 'KindMicrosoftEventHub', 'KindMicrosoftIoTHub' @@ -1547,8 +1550,8 @@ func (ithescp IoTHubEventSourceCreationProperties) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } -// IoTHubEventSourceMutableProperties an object that represents a set of mutable IoTHub event source resource -// properties. +// IoTHubEventSourceMutableProperties an object that represents a set of mutable IoTHub event source +// resource properties. type IoTHubEventSourceMutableProperties struct { // SharedAccessKey - The value of the shared access key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses. SharedAccessKey *string `json:"sharedAccessKey,omitempty"` @@ -1786,7 +1789,8 @@ func (ithesup *IoTHubEventSourceUpdateParameters) UnmarshalJSON(body []byte) err // LocalTimestamp an object that represents the local timestamp property. It contains the format of local // timestamp that needs to be used and the corresponding timezone offset information. If a value isn't -// specified for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. +// specified for localTimestamp, or if null, then the local timestamp will not be ingressed with the +// events. type LocalTimestamp struct { // Format - An enum that represents the format of the local timestamp property that needs to be set. Possible values include: 'Embedded', 'Iana', 'TimeSpan' Format LocalTimestampFormat `json:"format,omitempty"` @@ -1794,8 +1798,8 @@ type LocalTimestamp struct { TimeZoneOffset *LocalTimestampTimeZoneOffset `json:"timeZoneOffset,omitempty"` } -// LocalTimestampTimeZoneOffset an object that represents the offset information for the local timestamp format -// specified. Should not be specified for LocalTimestampFormat - Embedded. +// LocalTimestampTimeZoneOffset an object that represents the offset information for the local timestamp +// format specified. Should not be specified for LocalTimestampFormat - Embedded. type LocalTimestampTimeZoneOffset struct { // PropertyName - The event property that will be contain the offset information to calculate the local timestamp. When the LocalTimestampFormat is Iana, the property name will contain the name of the column which contains IANA Timezone Name (eg: Americas/Los Angeles). When LocalTimestampFormat is Timespan, it contains the name of property which contains values representing the offset (eg: P1D or 1.00:00:00) PropertyName *string `json:"propertyName,omitempty"` @@ -1974,8 +1978,11 @@ func (page OperationListResultPage) Values() []Operation { } // Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{ + fn: getNextPage, + olr: cur, + } } // ReferenceDataSetCreateOrUpdateParameters ... @@ -2066,9 +2073,10 @@ type ReferenceDataSetListResponse struct { Value *[]ReferenceDataSetResource `json:"value,omitempty"` } -// ReferenceDataSetResource a reference data set provides metadata about the events in an environment. Metadata -// in the reference data set will be joined with events as they are read from event sources. The metadata that -// makes up the reference data set is uploaded or modified through the Time Series Insights data plane APIs. +// ReferenceDataSetResource a reference data set provides metadata about the events in an environment. +// Metadata in the reference data set will be joined with events as they are read from event sources. The +// metadata that makes up the reference data set is uploaded or modified through the Time Series Insights +// data plane APIs. type ReferenceDataSetResource struct { autorest.Response `json:"-"` *ReferenceDataSetResourceProperties `json:"properties,omitempty"` @@ -2220,8 +2228,8 @@ type ResourceProperties struct { CreationTime *date.Time `json:"creationTime,omitempty"` } -// Sku the sku determines the capacity of the environment, the SLA (in queries-per-minute and total capacity), -// and the billing rate. +// Sku the sku determines the capacity of the environment, the SLA (in queries-per-minute and total +// capacity), and the billing rate. type Sku struct { // Name - The name of this SKU. Possible values include: 'S1', 'S2' Name SkuName `json:"name,omitempty"`