From 956301d7eb831eeac8725c269d47a4cd90e4e65b Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 15 Jul 2020 02:07:17 +0000 Subject: [PATCH] Generated from 631eb6a5d23f3970445a66b02ba53a7f3aa3ae49 Adding 2020-05-15 in places it was missing in readme.md --- .../timeseriesinsights/accesspolicies.go | 5 - .../timeseriesinsights/environments.go | 17 +- .../timeseriesinsights/eventsources.go | 5 - .../timeseriesinsights/models.go | 285 ++++-------------- .../timeseriesinsights/operations.go | 1 - .../timeseriesinsights/referencedatasets.go | 5 - .../timeseriesinsightsapi/interfaces.go | 2 +- .../timeseriesinsights/version.go | 2 +- 8 files changed, 58 insertions(+), 264 deletions(-) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go index 709717a0ac49..9fd3d7ca91de 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go @@ -126,7 +126,6 @@ func (client AccessPoliciesClient) CreateOrUpdateSender(req *http.Request) (*htt func (client AccessPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result AccessPolicyResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -207,7 +206,6 @@ func (client AccessPoliciesClient) DeleteSender(req *http.Request) (*http.Respon func (client AccessPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -286,7 +284,6 @@ func (client AccessPoliciesClient) GetSender(req *http.Request) (*http.Response, func (client AccessPoliciesClient) GetResponder(resp *http.Response) (result AccessPolicyResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -363,7 +360,6 @@ func (client AccessPoliciesClient) ListByEnvironmentSender(req *http.Request) (* func (client AccessPoliciesClient) ListByEnvironmentResponder(resp *http.Response) (result AccessPolicyListResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -447,7 +443,6 @@ func (client AccessPoliciesClient) UpdateSender(req *http.Request) (*http.Respon func (client AccessPoliciesClient) UpdateResponder(resp *http.Response) (result AccessPolicyResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go index 43436c2d09a0..4bc3e842808b 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go @@ -128,7 +128,6 @@ func (client EnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future func (client EnvironmentsClient) CreateOrUpdateResponder(resp *http.Response) (result EnvironmentResourceModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -205,7 +204,6 @@ func (client EnvironmentsClient) DeleteSender(req *http.Request) (*http.Response func (client EnvironmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -286,7 +284,6 @@ func (client EnvironmentsClient) GetSender(req *http.Request) (*http.Response, e func (client EnvironmentsClient) GetResponder(resp *http.Response) (result EnvironmentResourceModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -361,7 +358,6 @@ func (client EnvironmentsClient) ListByResourceGroupSender(req *http.Request) (* func (client EnvironmentsClient) ListByResourceGroupResponder(resp *http.Response) (result EnvironmentListResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -432,7 +428,6 @@ func (client EnvironmentsClient) ListBySubscriptionSender(req *http.Request) (*h func (client EnvironmentsClient) ListBySubscriptionResponder(resp *http.Response) (result EnvironmentListResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -445,9 +440,8 @@ func (client EnvironmentsClient) ListBySubscriptionResponder(resp *http.Response // resourceGroupName - name of an Azure Resource group. // environmentName - the name of the Time Series Insights environment associated with the specified resource // group. -// standardEnvironmentUpdateParameters - request object that contains the updated information for the -// environment. -func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, environmentName string, standardEnvironmentUpdateParameters StandardEnvironmentUpdateParameters) (result EnvironmentsUpdateFuture, err error) { +// environmentUpdateParameters - request object that contains the updated information for the environment. +func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters EnvironmentUpdateParameters) (result EnvironmentsUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.Update") defer func() { @@ -458,7 +452,7 @@ func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName s tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, resourceGroupName, environmentName, standardEnvironmentUpdateParameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, environmentName, environmentUpdateParameters) if err != nil { err = autorest.NewErrorWithError(err, "timeseriesinsights.EnvironmentsClient", "Update", nil, "Failure preparing request") return @@ -474,7 +468,7 @@ func (client EnvironmentsClient) Update(ctx context.Context, resourceGroupName s } // UpdatePreparer prepares the Update request. -func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, environmentName string, standardEnvironmentUpdateParameters StandardEnvironmentUpdateParameters) (*http.Request, error) { +func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters EnvironmentUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "environmentName": autorest.Encode("path", environmentName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -491,7 +485,7 @@ func (client EnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGro autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}", pathParameters), - autorest.WithJSON(standardEnvironmentUpdateParameters), + autorest.WithJSON(environmentUpdateParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -513,7 +507,6 @@ func (client EnvironmentsClient) UpdateSender(req *http.Request) (future Environ func (client EnvironmentsClient) UpdateResponder(resp *http.Response) (result EnvironmentResourceModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go index af0564d5771f..5a1043911726 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go @@ -124,7 +124,6 @@ func (client EventSourcesClient) CreateOrUpdateSender(req *http.Request) (*http. func (client EventSourcesClient) CreateOrUpdateResponder(resp *http.Response) (result EventSourceResourceModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -205,7 +204,6 @@ func (client EventSourcesClient) DeleteSender(req *http.Request) (*http.Response func (client EventSourcesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -284,7 +282,6 @@ func (client EventSourcesClient) GetSender(req *http.Request) (*http.Response, e func (client EventSourcesClient) GetResponder(resp *http.Response) (result EventSourceResourceModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -362,7 +359,6 @@ func (client EventSourcesClient) ListByEnvironmentSender(req *http.Request) (*ht func (client EventSourcesClient) ListByEnvironmentResponder(resp *http.Response) (result EventSourceListResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -446,7 +442,6 @@ func (client EventSourcesClient) UpdateSender(req *http.Request) (*http.Response func (client EventSourcesClient) UpdateResponder(resp *http.Response) (result EventSourceResourceModel, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go index 668b58548d1f..2b714ad58811 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/models.go @@ -143,13 +143,13 @@ const ( KindBasicEventSourceResourceKindEventSourceResource KindBasicEventSourceResource = "EventSourceResource" // KindBasicEventSourceResourceKindMicrosoftEventHub ... KindBasicEventSourceResourceKindMicrosoftEventHub KindBasicEventSourceResource = "Microsoft.EventHub" - // KindBasicEventSourceResourceKindMicrosoftIotHub ... - KindBasicEventSourceResourceKindMicrosoftIotHub KindBasicEventSourceResource = "Microsoft.IotHub" + // KindBasicEventSourceResourceKindMicrosoftIoTHub ... + KindBasicEventSourceResourceKindMicrosoftIoTHub KindBasicEventSourceResource = "Microsoft.IoTHub" ) // PossibleKindBasicEventSourceResourceValues returns an array of possible values for the KindBasicEventSourceResource const type. func PossibleKindBasicEventSourceResourceValues() []KindBasicEventSourceResource { - return []KindBasicEventSourceResource{KindBasicEventSourceResourceKindEventSourceResource, KindBasicEventSourceResourceKindMicrosoftEventHub, KindBasicEventSourceResourceKindMicrosoftIotHub} + return []KindBasicEventSourceResource{KindBasicEventSourceResourceKindEventSourceResource, KindBasicEventSourceResourceKindMicrosoftEventHub, KindBasicEventSourceResourceKindMicrosoftIoTHub} } // LocalTimestampFormat enumerates the values for local timestamp format. @@ -158,15 +158,11 @@ type LocalTimestampFormat string const ( // Embedded ... Embedded LocalTimestampFormat = "Embedded" - // Iana ... - Iana LocalTimestampFormat = "Iana" - // TimeSpan ... - TimeSpan LocalTimestampFormat = "TimeSpan" ) // PossibleLocalTimestampFormatValues returns an array of possible values for the LocalTimestampFormat const type. func PossibleLocalTimestampFormatValues() []LocalTimestampFormat { - return []LocalTimestampFormat{Embedded, Iana, TimeSpan} + return []LocalTimestampFormat{Embedded} } // PropertyType enumerates the values for property type. @@ -885,6 +881,8 @@ type EventHubEventSourceCommonProperties struct { // operation for an EventHub event source. type EventHubEventSourceCreateOrUpdateParameters struct { *EventHubEventSourceCreationProperties `json:"properties,omitempty"` + // 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. + LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` // Location - The location of the resource. Location *string `json:"location,omitempty"` // Tags - Key-value pairs of additional properties for the resource. @@ -900,6 +898,9 @@ func (ehescoup EventHubEventSourceCreateOrUpdateParameters) MarshalJSON() ([]byt if ehescoup.EventHubEventSourceCreationProperties != nil { objectMap["properties"] = ehescoup.EventHubEventSourceCreationProperties } + if ehescoup.LocalTimestamp != nil { + objectMap["localTimestamp"] = ehescoup.LocalTimestamp + } if ehescoup.Kind != "" { objectMap["kind"] = ehescoup.Kind } @@ -950,6 +951,15 @@ func (ehescoup *EventHubEventSourceCreateOrUpdateParameters) UnmarshalJSON(body } ehescoup.EventHubEventSourceCreationProperties = &eventHubEventSourceCreationProperties } + case "localTimestamp": + if v != nil { + var localTimestamp LocalTimestamp + err = json.Unmarshal(*v, &localTimestamp) + if err != nil { + return err + } + ehescoup.LocalTimestamp = &localTimestamp + } case "kind": if v != nil { var kind KindBasicEventSourceCreateOrUpdateParameters @@ -1030,7 +1040,7 @@ type EventHubEventSourceResource struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindBasicEventSourceResourceKindEventSourceResource', 'KindBasicEventSourceResourceKindMicrosoftEventHub', 'KindBasicEventSourceResourceKindMicrosoftIotHub' + // Kind - Possible values include: 'KindBasicEventSourceResourceKindEventSourceResource', 'KindBasicEventSourceResourceKindMicrosoftEventHub', 'KindBasicEventSourceResourceKindMicrosoftIoTHub' Kind KindBasicEventSourceResource `json:"kind,omitempty"` } @@ -1244,6 +1254,8 @@ type BasicEventSourceCreateOrUpdateParameters interface { // EventSourceCreateOrUpdateParameters parameters supplied to the Create or Update Event Source operation. type EventSourceCreateOrUpdateParameters struct { + // 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. + LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` // Kind - Possible values include: 'KindEventSourceCreateOrUpdateParameters', 'KindMicrosoftEventHub', 'KindMicrosoftIoTHub' Kind KindBasicEventSourceCreateOrUpdateParameters `json:"kind,omitempty"` // Location - The location of the resource. @@ -1297,6 +1309,9 @@ func unmarshalBasicEventSourceCreateOrUpdateParametersArray(body []byte) ([]Basi func (escoup EventSourceCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { escoup.Kind = KindEventSourceCreateOrUpdateParameters objectMap := make(map[string]interface{}) + if escoup.LocalTimestamp != nil { + objectMap["localTimestamp"] = escoup.LocalTimestamp + } if escoup.Kind != "" { objectMap["kind"] = escoup.Kind } @@ -1382,7 +1397,7 @@ type BasicEventSourceResource interface { // from the event source type EventSourceResource struct { autorest.Response `json:"-"` - // Kind - Possible values include: 'KindBasicEventSourceResourceKindEventSourceResource', 'KindBasicEventSourceResourceKindMicrosoftEventHub', 'KindBasicEventSourceResourceKindMicrosoftIotHub' + // Kind - Possible values include: 'KindBasicEventSourceResourceKindEventSourceResource', 'KindBasicEventSourceResourceKindMicrosoftEventHub', 'KindBasicEventSourceResourceKindMicrosoftIoTHub' Kind KindBasicEventSourceResource `json:"kind,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -1408,7 +1423,7 @@ func unmarshalBasicEventSourceResource(body []byte) (BasicEventSourceResource, e var ehesr EventHubEventSourceResource err := json.Unmarshal(body, &ehesr) return ehesr, err - case string(KindBasicEventSourceResourceKindMicrosoftIotHub): + case string(KindBasicEventSourceResourceKindMicrosoftIoTHub): var ithesr IoTHubEventSourceResource err := json.Unmarshal(body, &ithesr) return ithesr, err @@ -1535,6 +1550,8 @@ type IoTHubEventSourceCommonProperties struct { // operation for an IoTHub event source. type IoTHubEventSourceCreateOrUpdateParameters struct { *IoTHubEventSourceCreationProperties `json:"properties,omitempty"` + // 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. + LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` // Kind - Possible values include: 'KindEventSourceCreateOrUpdateParameters', 'KindMicrosoftEventHub', 'KindMicrosoftIoTHub' Kind KindBasicEventSourceCreateOrUpdateParameters `json:"kind,omitempty"` // Location - The location of the resource. @@ -1550,6 +1567,9 @@ func (ithescoup IoTHubEventSourceCreateOrUpdateParameters) MarshalJSON() ([]byte if ithescoup.IoTHubEventSourceCreationProperties != nil { objectMap["properties"] = ithescoup.IoTHubEventSourceCreationProperties } + if ithescoup.LocalTimestamp != nil { + objectMap["localTimestamp"] = ithescoup.LocalTimestamp + } if ithescoup.Kind != "" { objectMap["kind"] = ithescoup.Kind } @@ -1600,6 +1620,15 @@ func (ithescoup *IoTHubEventSourceCreateOrUpdateParameters) UnmarshalJSON(body [ } ithescoup.IoTHubEventSourceCreationProperties = &ioTHubEventSourceCreationProperties } + case "localTimestamp": + if v != nil { + var localTimestamp LocalTimestamp + err = json.Unmarshal(*v, &localTimestamp) + if err != nil { + return err + } + ithescoup.LocalTimestamp = &localTimestamp + } case "kind": if v != nil { var kind KindBasicEventSourceCreateOrUpdateParameters @@ -1668,7 +1697,7 @@ type IoTHubEventSourceMutableProperties struct { // IoTHubEventSourceResource an event source that receives its data from an Azure IoTHub. type IoTHubEventSourceResource struct { *IoTHubEventSourceResourceProperties `json:"properties,omitempty"` - // Kind - Possible values include: 'KindBasicEventSourceResourceKindEventSourceResource', 'KindBasicEventSourceResourceKindMicrosoftEventHub', 'KindBasicEventSourceResourceKindMicrosoftIotHub' + // Kind - Possible values include: 'KindBasicEventSourceResourceKindEventSourceResource', 'KindBasicEventSourceResourceKindMicrosoftEventHub', 'KindBasicEventSourceResourceKindMicrosoftIoTHub' Kind KindBasicEventSourceResource `json:"kind,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -1684,7 +1713,7 @@ type IoTHubEventSourceResource struct { // MarshalJSON is the custom marshaler for IoTHubEventSourceResource. func (ithesr IoTHubEventSourceResource) MarshalJSON() ([]byte, error) { - ithesr.Kind = KindBasicEventSourceResourceKindMicrosoftIotHub + ithesr.Kind = KindBasicEventSourceResourceKindMicrosoftIoTHub objectMap := make(map[string]interface{}) if ithesr.IoTHubEventSourceResourceProperties != nil { objectMap["properties"] = ithesr.IoTHubEventSourceResourceProperties @@ -1876,7 +1905,7 @@ func (ithesup *IoTHubEventSourceUpdateParameters) UnmarshalJSON(body []byte) err // 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 - An enum that represents the format of the local timestamp property that needs to be set. Possible values include: 'Embedded' Format LocalTimestampFormat `json:"format,omitempty"` // TimeZoneOffset - An object that represents the offset information for the local timestamp format specified. Should not be specified for LocalTimestampFormat - Embedded. TimeZoneOffset *LocalTimestampTimeZoneOffset `json:"timeZoneOffset,omitempty"` @@ -2011,65 +2040,8 @@ type LongTermEnvironmentCreationProperties struct { TimeSeriesIDProperties *[]TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"` // StorageConfiguration - The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. StorageConfiguration *LongTermStorageConfigurationInput `json:"storageConfiguration,omitempty"` - // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query. - *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` -} - -// MarshalJSON is the custom marshaler for LongTermEnvironmentCreationProperties. -func (ltecp LongTermEnvironmentCreationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ltecp.TimeSeriesIDProperties != nil { - objectMap["timeSeriesIdProperties"] = ltecp.TimeSeriesIDProperties - } - if ltecp.StorageConfiguration != nil { - objectMap["storageConfiguration"] = ltecp.StorageConfiguration - } - if ltecp.WarmStoreConfigurationProperties != nil { - objectMap["warmStoreConfiguration"] = ltecp.WarmStoreConfigurationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LongTermEnvironmentCreationProperties struct. -func (ltecp *LongTermEnvironmentCreationProperties) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "timeSeriesIdProperties": - if v != nil { - var timeSeriesIDProperties []TimeSeriesIDProperty - err = json.Unmarshal(*v, &timeSeriesIDProperties) - if err != nil { - return err - } - ltecp.TimeSeriesIDProperties = &timeSeriesIDProperties - } - case "storageConfiguration": - if v != nil { - var storageConfiguration LongTermStorageConfigurationInput - err = json.Unmarshal(*v, &storageConfiguration) - if err != nil { - return err - } - ltecp.StorageConfiguration = &storageConfiguration - } - case "warmStoreConfiguration": - if v != nil { - var warmStoreConfigurationProperties WarmStoreConfigurationProperties - err = json.Unmarshal(*v, &warmStoreConfigurationProperties) - if err != nil { - return err - } - ltecp.WarmStoreConfigurationProperties = &warmStoreConfigurationProperties - } - } - } - - return nil + // WarmStoreConfiguration - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query. + WarmStoreConfiguration *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` } // LongTermEnvironmentMutableProperties an object that represents a set of mutable long-term environment @@ -2077,53 +2049,8 @@ func (ltecp *LongTermEnvironmentCreationProperties) UnmarshalJSON(body []byte) e type LongTermEnvironmentMutableProperties struct { // StorageConfiguration - The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. StorageConfiguration *LongTermStorageConfigurationMutableProperties `json:"storageConfiguration,omitempty"` - // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query. - *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` -} - -// MarshalJSON is the custom marshaler for LongTermEnvironmentMutableProperties. -func (ltemp LongTermEnvironmentMutableProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ltemp.StorageConfiguration != nil { - objectMap["storageConfiguration"] = ltemp.StorageConfiguration - } - if ltemp.WarmStoreConfigurationProperties != nil { - objectMap["warmStoreConfiguration"] = ltemp.WarmStoreConfigurationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LongTermEnvironmentMutableProperties struct. -func (ltemp *LongTermEnvironmentMutableProperties) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "storageConfiguration": - if v != nil { - var storageConfiguration LongTermStorageConfigurationMutableProperties - err = json.Unmarshal(*v, &storageConfiguration) - if err != nil { - return err - } - ltemp.StorageConfiguration = &storageConfiguration - } - case "warmStoreConfiguration": - if v != nil { - var warmStoreConfigurationProperties WarmStoreConfigurationProperties - err = json.Unmarshal(*v, &warmStoreConfigurationProperties) - if err != nil { - return err - } - ltemp.WarmStoreConfigurationProperties = &warmStoreConfigurationProperties - } - } - } - - return nil + // WarmStoreConfiguration - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query. + WarmStoreConfiguration *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` } // LongTermEnvironmentResource an environment is a set of time-series data available for query, and is the @@ -2292,116 +2219,8 @@ type LongTermEnvironmentResourceProperties struct { TimeSeriesIDProperties *[]TimeSeriesIDProperty `json:"timeSeriesIdProperties,omitempty"` // StorageConfiguration - The storage configuration provides the connection details that allows the Time Series Insights service to connect to the customer storage account that is used to store the environment's data. StorageConfiguration *LongTermStorageConfigurationOutput `json:"storageConfiguration,omitempty"` - // WarmStoreConfigurationProperties - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query. - *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` -} - -// MarshalJSON is the custom marshaler for LongTermEnvironmentResourceProperties. -func (lterp LongTermEnvironmentResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if lterp.Status != nil { - objectMap["status"] = lterp.Status - } - if lterp.ProvisioningState != "" { - objectMap["provisioningState"] = lterp.ProvisioningState - } - if lterp.TimeSeriesIDProperties != nil { - objectMap["timeSeriesIdProperties"] = lterp.TimeSeriesIDProperties - } - if lterp.StorageConfiguration != nil { - objectMap["storageConfiguration"] = lterp.StorageConfiguration - } - if lterp.WarmStoreConfigurationProperties != nil { - objectMap["warmStoreConfiguration"] = lterp.WarmStoreConfigurationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for LongTermEnvironmentResourceProperties struct. -func (lterp *LongTermEnvironmentResourceProperties) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "dataAccessId": - if v != nil { - var dataAccessID uuid.UUID - err = json.Unmarshal(*v, &dataAccessID) - if err != nil { - return err - } - lterp.DataAccessID = &dataAccessID - } - case "dataAccessFqdn": - if v != nil { - var dataAccessFqdn string - err = json.Unmarshal(*v, &dataAccessFqdn) - if err != nil { - return err - } - lterp.DataAccessFqdn = &dataAccessFqdn - } - case "status": - if v != nil { - var status EnvironmentStatus - err = json.Unmarshal(*v, &status) - if err != nil { - return err - } - lterp.Status = &status - } - case "provisioningState": - if v != nil { - var provisioningState ProvisioningState - err = json.Unmarshal(*v, &provisioningState) - if err != nil { - return err - } - lterp.ProvisioningState = provisioningState - } - case "creationTime": - if v != nil { - var creationTime date.Time - err = json.Unmarshal(*v, &creationTime) - if err != nil { - return err - } - lterp.CreationTime = &creationTime - } - case "timeSeriesIdProperties": - if v != nil { - var timeSeriesIDProperties []TimeSeriesIDProperty - err = json.Unmarshal(*v, &timeSeriesIDProperties) - if err != nil { - return err - } - lterp.TimeSeriesIDProperties = &timeSeriesIDProperties - } - case "storageConfiguration": - if v != nil { - var storageConfiguration LongTermStorageConfigurationOutput - err = json.Unmarshal(*v, &storageConfiguration) - if err != nil { - return err - } - lterp.StorageConfiguration = &storageConfiguration - } - case "warmStoreConfiguration": - if v != nil { - var warmStoreConfigurationProperties WarmStoreConfigurationProperties - err = json.Unmarshal(*v, &warmStoreConfigurationProperties) - if err != nil { - return err - } - lterp.WarmStoreConfigurationProperties = &warmStoreConfigurationProperties - } - } - } - - return nil + // WarmStoreConfiguration - The warm store configuration provides the details to create a warm store cache that will retain a copy of the environment's data available for faster query. + WarmStoreConfiguration *WarmStoreConfigurationProperties `json:"warmStoreConfiguration,omitempty"` } // LongTermEnvironmentUpdateParameters parameters supplied to the Update Environment operation to update a @@ -3020,7 +2839,7 @@ type StandardEnvironmentCreationProperties struct { DataRetentionTime *string `json:"dataRetentionTime,omitempty"` // StorageLimitExceededBehavior - The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If "PauseIngress" is specified, new events will not be read from the event source. If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. The default behavior is PurgeOldData. Possible values include: 'PurgeOldData', 'PauseIngress' StorageLimitExceededBehavior StorageLimitExceededBehavior `json:"storageLimitExceededBehavior,omitempty"` - // PartitionKeyProperties - The list of event properties which will be used to partition data in the environment. + // PartitionKeyProperties - The list of event properties which will be used to partition data in the environment. Currently, only a single partition key property is supported. PartitionKeyProperties *[]TimeSeriesIDProperty `json:"partitionKeyProperties,omitempty"` } @@ -3031,8 +2850,6 @@ type StandardEnvironmentMutableProperties struct { DataRetentionTime *string `json:"dataRetentionTime,omitempty"` // StorageLimitExceededBehavior - The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If "PauseIngress" is specified, new events will not be read from the event source. If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. The default behavior is PurgeOldData. Possible values include: 'PurgeOldData', 'PauseIngress' StorageLimitExceededBehavior StorageLimitExceededBehavior `json:"storageLimitExceededBehavior,omitempty"` - // PartitionKeyProperties - The list of event properties which will be used to partition data in the environment. - PartitionKeyProperties *[]TimeSeriesIDProperty `json:"partitionKeyProperties,omitempty"` } // StandardEnvironmentResource an environment is a set of time-series data available for query, and is the @@ -3190,7 +3007,7 @@ type StandardEnvironmentResourceProperties struct { DataRetentionTime *string `json:"dataRetentionTime,omitempty"` // StorageLimitExceededBehavior - The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If "PauseIngress" is specified, new events will not be read from the event source. If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. The default behavior is PurgeOldData. Possible values include: 'PurgeOldData', 'PauseIngress' StorageLimitExceededBehavior StorageLimitExceededBehavior `json:"storageLimitExceededBehavior,omitempty"` - // PartitionKeyProperties - The list of event properties which will be used to partition data in the environment. + // PartitionKeyProperties - The list of event properties which will be used to partition data in the environment. Currently, only a single partition key property is supported. PartitionKeyProperties *[]TimeSeriesIDProperty `json:"partitionKeyProperties,omitempty"` // DataAccessID - READ-ONLY; An id used to access the environment data, e.g. to query the environment's events or upload reference data for the environment. DataAccessID *uuid.UUID `json:"dataAccessId,omitempty"` diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go index 645f763652f7..e21a5d5cb186 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go @@ -101,7 +101,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go index d96deca28456..71309bf72ccc 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go @@ -128,7 +128,6 @@ func (client ReferenceDataSetsClient) CreateOrUpdateSender(req *http.Request) (* func (client ReferenceDataSetsClient) CreateOrUpdateResponder(resp *http.Response) (result ReferenceDataSetResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -209,7 +208,6 @@ func (client ReferenceDataSetsClient) DeleteSender(req *http.Request) (*http.Res func (client ReferenceDataSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -288,7 +286,6 @@ func (client ReferenceDataSetsClient) GetSender(req *http.Request) (*http.Respon func (client ReferenceDataSetsClient) GetResponder(resp *http.Response) (result ReferenceDataSetResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -366,7 +363,6 @@ func (client ReferenceDataSetsClient) ListByEnvironmentSender(req *http.Request) func (client ReferenceDataSetsClient) ListByEnvironmentResponder(resp *http.Response) (result ReferenceDataSetListResponse, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -451,7 +447,6 @@ func (client ReferenceDataSetsClient) UpdateSender(req *http.Request) (*http.Res func (client ReferenceDataSetsClient) UpdateResponder(resp *http.Response) (result ReferenceDataSetResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go index 33fbc2136231..389b6b36ee55 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go @@ -38,7 +38,7 @@ type EnvironmentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, environmentName string, expand string) (result timeseriesinsights.EnvironmentResourceModel, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result timeseriesinsights.EnvironmentListResponse, err error) ListBySubscription(ctx context.Context) (result timeseriesinsights.EnvironmentListResponse, err error) - Update(ctx context.Context, resourceGroupName string, environmentName string, standardEnvironmentUpdateParameters timeseriesinsights.StandardEnvironmentUpdateParameters) (result timeseriesinsights.EnvironmentsUpdateFuture, err error) + Update(ctx context.Context, resourceGroupName string, environmentName string, environmentUpdateParameters timeseriesinsights.EnvironmentUpdateParameters) (result timeseriesinsights.EnvironmentsUpdateFuture, err error) } var _ EnvironmentsClientAPI = (*timeseriesinsights.EnvironmentsClient)(nil) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/version.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/version.go index 278d03510193..203352a6344a 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/version.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " timeseriesinsights/2018-08-15-preview" + return "Azure-SDK-For-Go/" + Version() + " timeseriesinsights/2018-08-15-preview" } // Version returns the semantic version (see http://semver.org) of the client.