From 86bbb44171a4030cc5ca789887c5d14c188b57ab Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 Nov 2020 02:34:33 +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 --- .../2017-11-15/timeseriesinsights/models.go | 66 +++++++++++-------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go b/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go index a518c1a4ee1d..0cd6c4fe3155 100644 --- a/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/models.go +++ b/services/timeseriesinsights/mgmt/2017-11-15/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"` @@ -252,8 +254,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"` @@ -380,8 +382,8 @@ type EnvironmentMutableProperties struct { PartitionKeyProperties *[]PartitionKeyProperty `json:"partitionKeyProperties,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 - The sku determines the capacity of the environment, the SLA (in queries-per-minute and total capacity), and the billing rate. @@ -536,8 +538,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 } @@ -825,8 +827,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"` @@ -1070,8 +1072,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"` @@ -1270,7 +1272,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"` @@ -1465,8 +1468,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' @@ -1615,8 +1618,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"` @@ -1858,7 +1861,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"` @@ -1866,8 +1870,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"` @@ -2046,12 +2050,15 @@ 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, + } } -// PartitionKeyProperty the structure of the property that a partition key can have. An environment can have -// multiple such properties. +// PartitionKeyProperty the structure of the property that a partition key can have. An environment can +// have multiple such properties. type PartitionKeyProperty struct { // Name - The name of the property. Name *string `json:"name,omitempty"` @@ -2149,9 +2156,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"` @@ -2320,8 +2328,8 @@ func (rp ResourceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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"`