diff --git a/internal/services/streamanalytics/client/client.go b/internal/services/streamanalytics/client/client.go index 521ed68388e0..dedfa3ba9fba 100644 --- a/internal/services/streamanalytics/client/client.go +++ b/internal/services/streamanalytics/client/client.go @@ -8,9 +8,9 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions" "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs" "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs" "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations" "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs" + "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/streamanalytics/stream_analytics_job_data_source.go b/internal/services/streamanalytics/stream_analytics_job_data_source.go index 9ed6ea5630c4..c226c89a3b9d 100644 --- a/internal/services/streamanalytics/stream_analytics_job_data_source.go +++ b/internal/services/streamanalytics/stream_analytics_job_data_source.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs" + "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -96,6 +96,11 @@ func dataSourceStreamAnalyticsJob() *pluginsdk.Resource { Type: pluginsdk.TypeString, Computed: true, }, + + "sku_name": { + Type: pluginsdk.TypeString, + Computed: true, + }, }, } } @@ -191,6 +196,12 @@ func dataSourceStreamAnalyticsJobRead(d *pluginsdk.ResourceData, meta interface{ } d.Set("job_id", jobId) + sku := "" + if props.Sku != nil && props.Sku.Name != nil { + sku = string(*props.Sku.Name) + } + d.Set("sku_name", sku) + if props.Transformation != nil && props.Transformation.Properties != nil { var streamingUnits int64 if v := props.Transformation.Properties.StreamingUnits; v != nil { diff --git a/internal/services/streamanalytics/stream_analytics_job_resource.go b/internal/services/streamanalytics/stream_analytics_job_resource.go index fbd90226dea9..b3c531443166 100644 --- a/internal/services/streamanalytics/stream_analytics_job_resource.go +++ b/internal/services/streamanalytics/stream_analytics_job_resource.go @@ -14,15 +14,14 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs" "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations" + "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/services/streamanalytics/migration" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/streamanalytics/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -140,7 +139,7 @@ func resourceStreamAnalyticsJob() *pluginsdk.Resource { "streaming_units": { Type: pluginsdk.TypeInt, Optional: true, - ValidateFunc: validate.StreamAnalyticsJobStreamingUnits, + ValidateFunc: validation.IntBetween(1, 120), }, "content_storage_policy": { @@ -196,6 +195,16 @@ func resourceStreamAnalyticsJob() *pluginsdk.Resource { Computed: true, }, + "sku_name": { + Type: pluginsdk.TypeString, + Optional: true, + Default: string(streamingjobs.SkuNameStandard), + ValidateFunc: validation.StringInSlice([]string{ + string(streamingjobs.SkuNameStandard), + "StandardV2", // missing from swagger as described here https://github.com/Azure/azure-rest-api-specs/issues/27506 + }, false), + }, + "tags": commonschema.Tags(), }, } @@ -262,7 +271,7 @@ func resourceStreamAnalyticsJobCreateUpdate(d *pluginsdk.ResourceData, meta inte Location: utils.String(azure.NormalizeLocation(d.Get("location").(string))), Properties: &streamingjobs.StreamingJobProperties{ Sku: &streamingjobs.Sku{ - Name: pointer.To(streamingjobs.SkuNameStandard), + Name: pointer.To(streamingjobs.SkuName(d.Get("sku_name").(string))), }, ContentStoragePolicy: pointer.To(streamingjobs.ContentStoragePolicy(contentStoragePolicy)), EventsLateArrivalMaxDelayInSeconds: pointer.To(int64(d.Get("events_late_arrival_max_delay_in_seconds").(int))), @@ -437,6 +446,12 @@ func resourceStreamAnalyticsJobRead(d *pluginsdk.ResourceData, meta interface{}) } d.Set("type", jobType) + sku := "" + if props.Sku != nil && props.Sku.Name != nil { + sku = string(*props.Sku.Name) + } + d.Set("sku_name", sku) + storagePolicy := "" if v := props.ContentStoragePolicy; v != nil { storagePolicy = string(*v) diff --git a/internal/services/streamanalytics/stream_analytics_job_resource_test.go b/internal/services/streamanalytics/stream_analytics_job_resource_test.go index 3bbcaa9ace8c..0eb76e16a1d7 100644 --- a/internal/services/streamanalytics/stream_analytics_job_resource_test.go +++ b/internal/services/streamanalytics/stream_analytics_job_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs" + "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -152,6 +152,32 @@ func TestAccStreamAnalyticsJob_jobStorageAccount(t *testing.T) { }) } +func TestAccStreamAnalyticsJob_standardV2(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_stream_analytics_job", "test") + r := StreamAnalyticsJobResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("tags.environment").HasValue("Test"), + ), + }, + data.ImportStep(), + { + Config: r.standardV2(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + check.That(data.ResourceName).Key("tags.%").HasValue("1"), + check.That(data.ResourceName).Key("tags.environment").HasValue("Test"), + ), + }, + data.ImportStep(), + }) +} + func (r StreamAnalyticsJobResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { id, err := streamingjobs.ParseStreamingJobID(state.ID) if err != nil { @@ -425,3 +451,35 @@ QUERY } `, data.RandomInteger, data.RandomString, data.Locations.Primary, data.RandomInteger) } + +func (r StreamAnalyticsJobResource) standardV2(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_stream_analytics_job" "test" { + name = "acctestjob-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + streaming_units = 7 + sku_name = "StandardV2" + + tags = { + environment = "Test" + } + + transformation_query = < 120 { - es = append(es, fmt.Errorf("expected %s to be in the range (1 - 120), got %d", k, v)) - return - } - - if v%6 != 0 { - es = append(es, fmt.Errorf("expected %s to be divisible by 6, got %d", k, v)) - return - } - - return -} diff --git a/internal/services/streamanalytics/validate/stream_analytics_test.go b/internal/services/streamanalytics/validate/stream_analytics_test.go deleted file mode 100644 index 3088bb8ce37a..000000000000 --- a/internal/services/streamanalytics/validate/stream_analytics_test.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package validate - -import ( - "testing" -) - -func TestStreamAnalyticsJobStreamingUnits(t *testing.T) { - cases := map[int]bool{ - 0: false, - 1: true, - 2: false, - 3: true, - 4: false, - 5: false, - 6: true, - 7: false, - 8: false, - 9: false, - 10: false, - 11: false, - 12: true, - 18: true, - 24: true, - 30: true, - } - for i, shouldBeValid := range cases { - _, errors := StreamAnalyticsJobStreamingUnits(i, "streaming_units") - - isValid := len(errors) == 0 - if shouldBeValid != isValid { - t.Fatalf("Expected %d to be %t but got %t", i, shouldBeValid, isValid) - } - } -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md new file mode 100644 index 000000000000..cfb0f2339baf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md @@ -0,0 +1,183 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs` Documentation + +The `streamingjobs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs" +``` + + +### Client Initialization + +```go +client := streamingjobs.NewStreamingJobsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `StreamingJobsClient.CreateOrReplace` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +payload := streamingjobs.StreamingJob{ + // ... +} + + +if err := client.CreateOrReplaceThenPoll(ctx, id, payload, streamingjobs.DefaultCreateOrReplaceOperationOptions()); err != nil { + // handle the error +} +``` + + +### Example Usage: `StreamingJobsClient.Delete` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `StreamingJobsClient.Get` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +read, err := client.Get(ctx, id, streamingjobs.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `StreamingJobsClient.List` + +```go +ctx := context.TODO() +id := streamingjobs.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id, streamingjobs.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, streamingjobs.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `StreamingJobsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := streamingjobs.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, streamingjobs.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, streamingjobs.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `StreamingJobsClient.Scale` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +payload := streamingjobs.ScaleStreamingJobParameters{ + // ... +} + + +if err := client.ScaleThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `StreamingJobsClient.SkuList` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +// alternatively `client.SkuList(ctx, id)` can be used to do batched pagination +items, err := client.SkuListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `StreamingJobsClient.Start` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +payload := streamingjobs.StartStreamingJobParameters{ + // ... +} + + +if err := client.StartThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `StreamingJobsClient.Stop` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +if err := client.StopThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `StreamingJobsClient.Update` + +```go +ctx := context.TODO() +id := streamingjobs.NewStreamingJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "streamingJobValue") + +payload := streamingjobs.StreamingJob{ + // ... +} + + +read, err := client.Update(ctx, id, payload, streamingjobs.DefaultUpdateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go new file mode 100644 index 000000000000..0e0a69762911 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go @@ -0,0 +1,18 @@ +package streamingjobs + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StreamingJobsClient struct { + Client autorest.Client + baseUri string +} + +func NewStreamingJobsClientWithBaseURI(endpoint string) StreamingJobsClient { + return StreamingJobsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/constants.go new file mode 100644 index 000000000000..73ce2c99b866 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/constants.go @@ -0,0 +1,615 @@ +package streamingjobs + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AuthenticationMode string + +const ( + AuthenticationModeConnectionString AuthenticationMode = "ConnectionString" + AuthenticationModeMsi AuthenticationMode = "Msi" + AuthenticationModeUserToken AuthenticationMode = "UserToken" +) + +func PossibleValuesForAuthenticationMode() []string { + return []string{ + string(AuthenticationModeConnectionString), + string(AuthenticationModeMsi), + string(AuthenticationModeUserToken), + } +} + +func parseAuthenticationMode(input string) (*AuthenticationMode, error) { + vals := map[string]AuthenticationMode{ + "connectionstring": AuthenticationModeConnectionString, + "msi": AuthenticationModeMsi, + "usertoken": AuthenticationModeUserToken, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AuthenticationMode(input) + return &out, nil +} + +type BlobWriteMode string + +const ( + BlobWriteModeAppend BlobWriteMode = "Append" + BlobWriteModeOnce BlobWriteMode = "Once" +) + +func PossibleValuesForBlobWriteMode() []string { + return []string{ + string(BlobWriteModeAppend), + string(BlobWriteModeOnce), + } +} + +func parseBlobWriteMode(input string) (*BlobWriteMode, error) { + vals := map[string]BlobWriteMode{ + "append": BlobWriteModeAppend, + "once": BlobWriteModeOnce, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BlobWriteMode(input) + return &out, nil +} + +type CompatibilityLevel string + +const ( + CompatibilityLevelOnePointTwo CompatibilityLevel = "1.2" + CompatibilityLevelOnePointZero CompatibilityLevel = "1.0" +) + +func PossibleValuesForCompatibilityLevel() []string { + return []string{ + string(CompatibilityLevelOnePointTwo), + string(CompatibilityLevelOnePointZero), + } +} + +func parseCompatibilityLevel(input string) (*CompatibilityLevel, error) { + vals := map[string]CompatibilityLevel{ + "1.2": CompatibilityLevelOnePointTwo, + "1.0": CompatibilityLevelOnePointZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CompatibilityLevel(input) + return &out, nil +} + +type CompressionType string + +const ( + CompressionTypeDeflate CompressionType = "Deflate" + CompressionTypeGZip CompressionType = "GZip" + CompressionTypeNone CompressionType = "None" +) + +func PossibleValuesForCompressionType() []string { + return []string{ + string(CompressionTypeDeflate), + string(CompressionTypeGZip), + string(CompressionTypeNone), + } +} + +func parseCompressionType(input string) (*CompressionType, error) { + vals := map[string]CompressionType{ + "deflate": CompressionTypeDeflate, + "gzip": CompressionTypeGZip, + "none": CompressionTypeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CompressionType(input) + return &out, nil +} + +type ContentStoragePolicy string + +const ( + ContentStoragePolicyJobStorageAccount ContentStoragePolicy = "JobStorageAccount" + ContentStoragePolicySystemAccount ContentStoragePolicy = "SystemAccount" +) + +func PossibleValuesForContentStoragePolicy() []string { + return []string{ + string(ContentStoragePolicyJobStorageAccount), + string(ContentStoragePolicySystemAccount), + } +} + +func parseContentStoragePolicy(input string) (*ContentStoragePolicy, error) { + vals := map[string]ContentStoragePolicy{ + "jobstorageaccount": ContentStoragePolicyJobStorageAccount, + "systemaccount": ContentStoragePolicySystemAccount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ContentStoragePolicy(input) + return &out, nil +} + +type Encoding string + +const ( + EncodingUTFEight Encoding = "UTF8" +) + +func PossibleValuesForEncoding() []string { + return []string{ + string(EncodingUTFEight), + } +} + +func parseEncoding(input string) (*Encoding, error) { + vals := map[string]Encoding{ + "utf8": EncodingUTFEight, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Encoding(input) + return &out, nil +} + +type EventGridEventSchemaType string + +const ( + EventGridEventSchemaTypeCloudEventSchema EventGridEventSchemaType = "CloudEventSchema" + EventGridEventSchemaTypeEventGridEventSchema EventGridEventSchemaType = "EventGridEventSchema" +) + +func PossibleValuesForEventGridEventSchemaType() []string { + return []string{ + string(EventGridEventSchemaTypeCloudEventSchema), + string(EventGridEventSchemaTypeEventGridEventSchema), + } +} + +func parseEventGridEventSchemaType(input string) (*EventGridEventSchemaType, error) { + vals := map[string]EventGridEventSchemaType{ + "cloudeventschema": EventGridEventSchemaTypeCloudEventSchema, + "eventgrideventschema": EventGridEventSchemaTypeEventGridEventSchema, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EventGridEventSchemaType(input) + return &out, nil +} + +type EventSerializationType string + +const ( + EventSerializationTypeAvro EventSerializationType = "Avro" + EventSerializationTypeCsv EventSerializationType = "Csv" + EventSerializationTypeCustomClr EventSerializationType = "CustomClr" + EventSerializationTypeDelta EventSerializationType = "Delta" + EventSerializationTypeJson EventSerializationType = "Json" + EventSerializationTypeParquet EventSerializationType = "Parquet" +) + +func PossibleValuesForEventSerializationType() []string { + return []string{ + string(EventSerializationTypeAvro), + string(EventSerializationTypeCsv), + string(EventSerializationTypeCustomClr), + string(EventSerializationTypeDelta), + string(EventSerializationTypeJson), + string(EventSerializationTypeParquet), + } +} + +func parseEventSerializationType(input string) (*EventSerializationType, error) { + vals := map[string]EventSerializationType{ + "avro": EventSerializationTypeAvro, + "csv": EventSerializationTypeCsv, + "customclr": EventSerializationTypeCustomClr, + "delta": EventSerializationTypeDelta, + "json": EventSerializationTypeJson, + "parquet": EventSerializationTypeParquet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EventSerializationType(input) + return &out, nil +} + +type EventsOutOfOrderPolicy string + +const ( + EventsOutOfOrderPolicyAdjust EventsOutOfOrderPolicy = "Adjust" + EventsOutOfOrderPolicyDrop EventsOutOfOrderPolicy = "Drop" +) + +func PossibleValuesForEventsOutOfOrderPolicy() []string { + return []string{ + string(EventsOutOfOrderPolicyAdjust), + string(EventsOutOfOrderPolicyDrop), + } +} + +func parseEventsOutOfOrderPolicy(input string) (*EventsOutOfOrderPolicy, error) { + vals := map[string]EventsOutOfOrderPolicy{ + "adjust": EventsOutOfOrderPolicyAdjust, + "drop": EventsOutOfOrderPolicyDrop, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EventsOutOfOrderPolicy(input) + return &out, nil +} + +type InputWatermarkMode string + +const ( + InputWatermarkModeNone InputWatermarkMode = "None" + InputWatermarkModeReadWatermark InputWatermarkMode = "ReadWatermark" +) + +func PossibleValuesForInputWatermarkMode() []string { + return []string{ + string(InputWatermarkModeNone), + string(InputWatermarkModeReadWatermark), + } +} + +func parseInputWatermarkMode(input string) (*InputWatermarkMode, error) { + vals := map[string]InputWatermarkMode{ + "none": InputWatermarkModeNone, + "readwatermark": InputWatermarkModeReadWatermark, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := InputWatermarkMode(input) + return &out, nil +} + +type JobType string + +const ( + JobTypeCloud JobType = "Cloud" + JobTypeEdge JobType = "Edge" +) + +func PossibleValuesForJobType() []string { + return []string{ + string(JobTypeCloud), + string(JobTypeEdge), + } +} + +func parseJobType(input string) (*JobType, error) { + vals := map[string]JobType{ + "cloud": JobTypeCloud, + "edge": JobTypeEdge, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobType(input) + return &out, nil +} + +type JsonOutputSerializationFormat string + +const ( + JsonOutputSerializationFormatArray JsonOutputSerializationFormat = "Array" + JsonOutputSerializationFormatLineSeparated JsonOutputSerializationFormat = "LineSeparated" +) + +func PossibleValuesForJsonOutputSerializationFormat() []string { + return []string{ + string(JsonOutputSerializationFormatArray), + string(JsonOutputSerializationFormatLineSeparated), + } +} + +func parseJsonOutputSerializationFormat(input string) (*JsonOutputSerializationFormat, error) { + vals := map[string]JsonOutputSerializationFormat{ + "array": JsonOutputSerializationFormatArray, + "lineseparated": JsonOutputSerializationFormatLineSeparated, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JsonOutputSerializationFormat(input) + return &out, nil +} + +type OutputErrorPolicy string + +const ( + OutputErrorPolicyDrop OutputErrorPolicy = "Drop" + OutputErrorPolicyStop OutputErrorPolicy = "Stop" +) + +func PossibleValuesForOutputErrorPolicy() []string { + return []string{ + string(OutputErrorPolicyDrop), + string(OutputErrorPolicyStop), + } +} + +func parseOutputErrorPolicy(input string) (*OutputErrorPolicy, error) { + vals := map[string]OutputErrorPolicy{ + "drop": OutputErrorPolicyDrop, + "stop": OutputErrorPolicyStop, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OutputErrorPolicy(input) + return &out, nil +} + +type OutputStartMode string + +const ( + OutputStartModeCustomTime OutputStartMode = "CustomTime" + OutputStartModeJobStartTime OutputStartMode = "JobStartTime" + OutputStartModeLastOutputEventTime OutputStartMode = "LastOutputEventTime" +) + +func PossibleValuesForOutputStartMode() []string { + return []string{ + string(OutputStartModeCustomTime), + string(OutputStartModeJobStartTime), + string(OutputStartModeLastOutputEventTime), + } +} + +func parseOutputStartMode(input string) (*OutputStartMode, error) { + vals := map[string]OutputStartMode{ + "customtime": OutputStartModeCustomTime, + "jobstarttime": OutputStartModeJobStartTime, + "lastoutputeventtime": OutputStartModeLastOutputEventTime, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OutputStartMode(input) + return &out, nil +} + +type OutputWatermarkMode string + +const ( + OutputWatermarkModeNone OutputWatermarkMode = "None" + OutputWatermarkModeSendCurrentPartitionWatermark OutputWatermarkMode = "SendCurrentPartitionWatermark" + OutputWatermarkModeSendLowestWatermarkAcrossPartitions OutputWatermarkMode = "SendLowestWatermarkAcrossPartitions" +) + +func PossibleValuesForOutputWatermarkMode() []string { + return []string{ + string(OutputWatermarkModeNone), + string(OutputWatermarkModeSendCurrentPartitionWatermark), + string(OutputWatermarkModeSendLowestWatermarkAcrossPartitions), + } +} + +func parseOutputWatermarkMode(input string) (*OutputWatermarkMode, error) { + vals := map[string]OutputWatermarkMode{ + "none": OutputWatermarkModeNone, + "sendcurrentpartitionwatermark": OutputWatermarkModeSendCurrentPartitionWatermark, + "sendlowestwatermarkacrosspartitions": OutputWatermarkModeSendLowestWatermarkAcrossPartitions, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OutputWatermarkMode(input) + return &out, nil +} + +type RefreshType string + +const ( + RefreshTypeRefreshPeriodicallyWithDelta RefreshType = "RefreshPeriodicallyWithDelta" + RefreshTypeRefreshPeriodicallyWithFull RefreshType = "RefreshPeriodicallyWithFull" + RefreshTypeStatic RefreshType = "Static" +) + +func PossibleValuesForRefreshType() []string { + return []string{ + string(RefreshTypeRefreshPeriodicallyWithDelta), + string(RefreshTypeRefreshPeriodicallyWithFull), + string(RefreshTypeStatic), + } +} + +func parseRefreshType(input string) (*RefreshType, error) { + vals := map[string]RefreshType{ + "refreshperiodicallywithdelta": RefreshTypeRefreshPeriodicallyWithDelta, + "refreshperiodicallywithfull": RefreshTypeRefreshPeriodicallyWithFull, + "static": RefreshTypeStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RefreshType(input) + return &out, nil +} + +type ResourceType string + +const ( + ResourceTypeMicrosoftPointStreamAnalyticsStreamingjobs ResourceType = "Microsoft.StreamAnalytics/streamingjobs" +) + +func PossibleValuesForResourceType() []string { + return []string{ + string(ResourceTypeMicrosoftPointStreamAnalyticsStreamingjobs), + } +} + +func parseResourceType(input string) (*ResourceType, error) { + vals := map[string]ResourceType{ + "microsoft.streamanalytics/streamingjobs": ResourceTypeMicrosoftPointStreamAnalyticsStreamingjobs, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceType(input) + return &out, nil +} + +type SkuCapacityScaleType string + +const ( + SkuCapacityScaleTypeAutomatic SkuCapacityScaleType = "automatic" + SkuCapacityScaleTypeManual SkuCapacityScaleType = "manual" + SkuCapacityScaleTypeNone SkuCapacityScaleType = "none" +) + +func PossibleValuesForSkuCapacityScaleType() []string { + return []string{ + string(SkuCapacityScaleTypeAutomatic), + string(SkuCapacityScaleTypeManual), + string(SkuCapacityScaleTypeNone), + } +} + +func parseSkuCapacityScaleType(input string) (*SkuCapacityScaleType, error) { + vals := map[string]SkuCapacityScaleType{ + "automatic": SkuCapacityScaleTypeAutomatic, + "manual": SkuCapacityScaleTypeManual, + "none": SkuCapacityScaleTypeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuCapacityScaleType(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameStandard SkuName = "Standard" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameStandard), + } +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "standard": SkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type UpdatableUdfRefreshType string + +const ( + UpdatableUdfRefreshTypeBlocking UpdatableUdfRefreshType = "Blocking" + UpdatableUdfRefreshTypeNonblocking UpdatableUdfRefreshType = "Nonblocking" +) + +func PossibleValuesForUpdatableUdfRefreshType() []string { + return []string{ + string(UpdatableUdfRefreshTypeBlocking), + string(UpdatableUdfRefreshTypeNonblocking), + } +} + +func parseUpdatableUdfRefreshType(input string) (*UpdatableUdfRefreshType, error) { + vals := map[string]UpdatableUdfRefreshType{ + "blocking": UpdatableUdfRefreshTypeBlocking, + "nonblocking": UpdatableUdfRefreshTypeNonblocking, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpdatableUdfRefreshType(input) + return &out, nil +} + +type UpdateMode string + +const ( + UpdateModeRefreshable UpdateMode = "Refreshable" + UpdateModeStatic UpdateMode = "Static" +) + +func PossibleValuesForUpdateMode() []string { + return []string{ + string(UpdateModeRefreshable), + string(UpdateModeStatic), + } +} + +func parseUpdateMode(input string) (*UpdateMode, error) { + vals := map[string]UpdateMode{ + "refreshable": UpdateModeRefreshable, + "static": UpdateModeStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpdateMode(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go new file mode 100644 index 000000000000..8d9e66ae2cfb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go @@ -0,0 +1,125 @@ +package streamingjobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &StreamingJobId{} + +// StreamingJobId is a struct representing the Resource ID for a Streaming Job +type StreamingJobId struct { + SubscriptionId string + ResourceGroupName string + StreamingJobName string +} + +// NewStreamingJobID returns a new StreamingJobId struct +func NewStreamingJobID(subscriptionId string, resourceGroupName string, streamingJobName string) StreamingJobId { + return StreamingJobId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + StreamingJobName: streamingJobName, + } +} + +// ParseStreamingJobID parses 'input' into a StreamingJobId +func ParseStreamingJobID(input string) (*StreamingJobId, error) { + parser := resourceids.NewParserFromResourceIdType(&StreamingJobId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := StreamingJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseStreamingJobIDInsensitively parses 'input' case-insensitively into a StreamingJobId +// note: this method should only be used for API response data and not user input +func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { + parser := resourceids.NewParserFromResourceIdType(&StreamingJobId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := StreamingJobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *StreamingJobId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.StreamingJobName, ok = input.Parsed["streamingJobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "streamingJobName", input) + } + + return nil +} + +// ValidateStreamingJobID checks that 'input' can be parsed as a Streaming Job ID +func ValidateStreamingJobID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseStreamingJobID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Streaming Job ID +func (id StreamingJobId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.StreamAnalytics/streamingJobs/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.StreamingJobName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Streaming Job ID +func (id StreamingJobId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftStreamAnalytics", "Microsoft.StreamAnalytics", "Microsoft.StreamAnalytics"), + resourceids.StaticSegment("staticStreamingJobs", "streamingJobs", "streamingJobs"), + resourceids.UserSpecifiedSegment("streamingJobName", "streamingJobValue"), + } +} + +// String returns a human-readable description of this Streaming Job ID +func (id StreamingJobId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Streaming Job Name: %q", id.StreamingJobName), + } + return fmt.Sprintf("Streaming Job (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace_autorest.go new file mode 100644 index 000000000000..3813ba884277 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace_autorest.go @@ -0,0 +1,114 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrReplaceOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response + Model *StreamingJob +} + +type CreateOrReplaceOperationOptions struct { + IfMatch *string + IfNoneMatch *string +} + +func DefaultCreateOrReplaceOperationOptions() CreateOrReplaceOperationOptions { + return CreateOrReplaceOperationOptions{} +} + +func (o CreateOrReplaceOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + if o.IfMatch != nil { + out["If-Match"] = *o.IfMatch + } + + if o.IfNoneMatch != nil { + out["If-None-Match"] = *o.IfNoneMatch + } + + return out +} + +func (o CreateOrReplaceOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +// CreateOrReplace ... +func (c StreamingJobsClient) CreateOrReplace(ctx context.Context, id StreamingJobId, input StreamingJob, options CreateOrReplaceOperationOptions) (result CreateOrReplaceOperationResponse, err error) { + req, err := c.preparerForCreateOrReplace(ctx, id, input, options) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "CreateOrReplace", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrReplace(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "CreateOrReplace", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrReplaceThenPoll performs CreateOrReplace then polls until it's completed +func (c StreamingJobsClient) CreateOrReplaceThenPoll(ctx context.Context, id StreamingJobId, input StreamingJob, options CreateOrReplaceOperationOptions) error { + result, err := c.CreateOrReplace(ctx, id, input, options) + if err != nil { + return fmt.Errorf("performing CreateOrReplace: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrReplace: %+v", err) + } + + return nil +} + +// preparerForCreateOrReplace prepares the CreateOrReplace request. +func (c StreamingJobsClient) preparerForCreateOrReplace(ctx context.Context, id StreamingJobId, input StreamingJob, options CreateOrReplaceOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrReplace sends the CreateOrReplace request. The method will close the +// http.Response Body if it receives an error. +func (c StreamingJobsClient) senderForCreateOrReplace(ctx context.Context, req *http.Request) (future CreateOrReplaceOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_delete_autorest.go new file mode 100644 index 000000000000..d619132add70 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_delete_autorest.go @@ -0,0 +1,78 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Delete ... +func (c StreamingJobsClient) Delete(ctx context.Context, id StreamingJobId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = c.senderForDelete(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c StreamingJobsClient) DeleteThenPoll(ctx context.Context, id StreamingJobId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} + +// preparerForDelete prepares the Delete request. +func (c StreamingJobsClient) preparerForDelete(ctx context.Context, id StreamingJobId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForDelete sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (c StreamingJobsClient) senderForDelete(ctx context.Context, req *http.Request) (future DeleteOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get_autorest.go new file mode 100644 index 000000000000..f50e1aaa9e8a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get_autorest.go @@ -0,0 +1,97 @@ +package streamingjobs + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *StreamingJob +} + +type GetOperationOptions struct { + Expand *string +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o GetOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// Get ... +func (c StreamingJobsClient) Get(ctx context.Context, id StreamingJobId, options GetOperationOptions) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c StreamingJobsClient) preparerForGet(ctx context.Context, id StreamingJobId, options GetOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c StreamingJobsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list_autorest.go new file mode 100644 index 000000000000..9c325f2f2216 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list_autorest.go @@ -0,0 +1,216 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]StreamingJob + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []StreamingJob +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Expand *string +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// List ... +func (c StreamingJobsClient) List(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c StreamingJobsClient) preparerForList(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.StreamAnalytics/streamingJobs", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c StreamingJobsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c StreamingJobsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []StreamingJob `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c StreamingJobsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, StreamingJobOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c StreamingJobsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate StreamingJobOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]StreamingJob, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..97037ff29751 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup_autorest.go @@ -0,0 +1,216 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]StreamingJob + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error) +} + +type ListByResourceGroupCompleteResult struct { + Items []StreamingJob +} + +func (r ListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListByResourceGroupOperationOptions struct { + Expand *string +} + +func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { + return ListByResourceGroupOperationOptions{} +} + +func (o ListByResourceGroupOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListByResourceGroupOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Expand != nil { + out["$expand"] = *o.Expand + } + + return out +} + +// ListByResourceGroup ... +func (c StreamingJobsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (resp ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "ListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "ListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c StreamingJobsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.StreamAnalytics/streamingJobs", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByResourceGroupWithNextLink prepares the ListByResourceGroup request with the given nextLink token. +func (c StreamingJobsClient) preparerForListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c StreamingJobsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + type page struct { + Values []StreamingJob `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c StreamingJobsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, StreamingJobOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c StreamingJobsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate StreamingJobOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]StreamingJob, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_scale_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_scale_autorest.go new file mode 100644 index 000000000000..5a54d0da2f4c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_scale_autorest.go @@ -0,0 +1,79 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScaleOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Scale ... +func (c StreamingJobsClient) Scale(ctx context.Context, id StreamingJobId, input ScaleStreamingJobParameters) (result ScaleOperationResponse, err error) { + req, err := c.preparerForScale(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Scale", nil, "Failure preparing request") + return + } + + result, err = c.senderForScale(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Scale", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// ScaleThenPoll performs Scale then polls until it's completed +func (c StreamingJobsClient) ScaleThenPoll(ctx context.Context, id StreamingJobId, input ScaleStreamingJobParameters) error { + result, err := c.Scale(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Scale: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Scale: %+v", err) + } + + return nil +} + +// preparerForScale prepares the Scale request. +func (c StreamingJobsClient) preparerForScale(ctx context.Context, id StreamingJobId, input ScaleStreamingJobParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/scale", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForScale sends the Scale request. The method will close the +// http.Response Body if it receives an error. +func (c StreamingJobsClient) senderForScale(ctx context.Context, req *http.Request) (future ScaleOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_skulist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_skulist_autorest.go new file mode 100644 index 000000000000..6e734cbe1d95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_skulist_autorest.go @@ -0,0 +1,186 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuListOperationResponse struct { + HttpResponse *http.Response + Model *[]GetStreamingJobSkuResult + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (SkuListOperationResponse, error) +} + +type SkuListCompleteResult struct { + Items []GetStreamingJobSkuResult +} + +func (r SkuListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r SkuListOperationResponse) LoadMore(ctx context.Context) (resp SkuListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// SkuList ... +func (c StreamingJobsClient) SkuList(ctx context.Context, id StreamingJobId) (resp SkuListOperationResponse, err error) { + req, err := c.preparerForSkuList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "SkuList", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "SkuList", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForSkuList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "SkuList", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForSkuList prepares the SkuList request. +func (c StreamingJobsClient) preparerForSkuList(ctx context.Context, id StreamingJobId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/skus", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForSkuListWithNextLink prepares the SkuList request with the given nextLink token. +func (c StreamingJobsClient) preparerForSkuListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForSkuList handles the response to the SkuList request. The method always +// closes the http.Response Body. +func (c StreamingJobsClient) responderForSkuList(resp *http.Response) (result SkuListOperationResponse, err error) { + type page struct { + Values []GetStreamingJobSkuResult `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result SkuListOperationResponse, err error) { + req, err := c.preparerForSkuListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "SkuList", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "SkuList", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForSkuList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "SkuList", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// SkuListComplete retrieves all of the results into a single object +func (c StreamingJobsClient) SkuListComplete(ctx context.Context, id StreamingJobId) (SkuListCompleteResult, error) { + return c.SkuListCompleteMatchingPredicate(ctx, id, GetStreamingJobSkuResultOperationPredicate{}) +} + +// SkuListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c StreamingJobsClient) SkuListCompleteMatchingPredicate(ctx context.Context, id StreamingJobId, predicate GetStreamingJobSkuResultOperationPredicate) (resp SkuListCompleteResult, err error) { + items := make([]GetStreamingJobSkuResult, 0) + + page, err := c.SkuList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := SkuListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_start_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_start_autorest.go new file mode 100644 index 000000000000..eb10a45f0983 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_start_autorest.go @@ -0,0 +1,79 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StartOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Start ... +func (c StreamingJobsClient) Start(ctx context.Context, id StreamingJobId, input StartStreamingJobParameters) (result StartOperationResponse, err error) { + req, err := c.preparerForStart(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Start", nil, "Failure preparing request") + return + } + + result, err = c.senderForStart(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Start", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// StartThenPoll performs Start then polls until it's completed +func (c StreamingJobsClient) StartThenPoll(ctx context.Context, id StreamingJobId, input StartStreamingJobParameters) error { + result, err := c.Start(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} + +// preparerForStart prepares the Start request. +func (c StreamingJobsClient) preparerForStart(ctx context.Context, id StreamingJobId, input StartStreamingJobParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/start", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForStart sends the Start request. The method will close the +// http.Response Body if it receives an error. +func (c StreamingJobsClient) senderForStart(ctx context.Context, req *http.Request) (future StartOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_stop_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_stop_autorest.go new file mode 100644 index 000000000000..1203d28307a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_stop_autorest.go @@ -0,0 +1,78 @@ +package streamingjobs + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Stop ... +func (c StreamingJobsClient) Stop(ctx context.Context, id StreamingJobId) (result StopOperationResponse, err error) { + req, err := c.preparerForStop(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Stop", nil, "Failure preparing request") + return + } + + result, err = c.senderForStop(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Stop", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// StopThenPoll performs Stop then polls until it's completed +func (c StreamingJobsClient) StopThenPoll(ctx context.Context, id StreamingJobId) error { + result, err := c.Stop(ctx, id) + if err != nil { + return fmt.Errorf("performing Stop: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Stop: %+v", err) + } + + return nil +} + +// preparerForStop prepares the Stop request. +func (c StreamingJobsClient) preparerForStop(ctx context.Context, id StreamingJobId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/stop", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForStop sends the Stop request. The method will close the +// http.Response Body if it receives an error. +func (c StreamingJobsClient) senderForStop(ctx context.Context, req *http.Request) (future StopOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update_autorest.go new file mode 100644 index 000000000000..863564082e15 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update_autorest.go @@ -0,0 +1,98 @@ +package streamingjobs + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + Model *StreamingJob +} + +type UpdateOperationOptions struct { + IfMatch *string +} + +func DefaultUpdateOperationOptions() UpdateOperationOptions { + return UpdateOperationOptions{} +} + +func (o UpdateOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + if o.IfMatch != nil { + out["If-Match"] = *o.IfMatch + } + + return out +} + +func (o UpdateOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +// Update ... +func (c StreamingJobsClient) Update(ctx context.Context, id StreamingJobId, input StreamingJob, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input, options) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Update", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "streamingjobs.StreamingJobsClient", "Update", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForUpdate prepares the Update request. +func (c StreamingJobsClient) preparerForUpdate(ctx context.Context, id StreamingJobId, input StreamingJob, options UpdateOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForUpdate handles the response to the Update request. The method always +// closes the http.Response Body. +func (c StreamingJobsClient) responderForUpdate(resp *http.Response) (result UpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go new file mode 100644 index 000000000000..0c646de6aa7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go @@ -0,0 +1,42 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FunctionProperties = AggregateFunctionProperties{} + +type AggregateFunctionProperties struct { + + // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` +} + +var _ json.Marshaler = AggregateFunctionProperties{} + +func (s AggregateFunctionProperties) MarshalJSON() ([]byte, error) { + type wrapper AggregateFunctionProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AggregateFunctionProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AggregateFunctionProperties: %+v", err) + } + decoded["type"] = "Aggregate" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AggregateFunctionProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go new file mode 100644 index 000000000000..2ee800b1446b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Serialization = AvroSerialization{} + +type AvroSerialization struct { + Properties *interface{} `json:"properties,omitempty"` + + // Fields inherited from Serialization +} + +var _ json.Marshaler = AvroSerialization{} + +func (s AvroSerialization) MarshalJSON() ([]byte, error) { + type wrapper AvroSerialization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AvroSerialization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) + } + decoded["type"] = "Avro" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AvroSerialization: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go new file mode 100644 index 000000000000..616c546f1eb0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = AzureDataExplorerOutputDataSource{} + +type AzureDataExplorerOutputDataSource struct { + Properties *AzureDataExplorerOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = AzureDataExplorerOutputDataSource{} + +func (s AzureDataExplorerOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureDataExplorerOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataExplorerOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataExplorerOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Kusto/clusters/databases" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataExplorerOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasourceproperties.go new file mode 100644 index 000000000000..64a7c2a842af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasourceproperties.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerOutputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Cluster *string `json:"cluster,omitempty"` + Database *string `json:"database,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go new file mode 100644 index 000000000000..b4972c83a448 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = AzureDataLakeStoreOutputDataSource{} + +type AzureDataLakeStoreOutputDataSource struct { + Properties *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = AzureDataLakeStoreOutputDataSource{} + +func (s AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureDataLakeStoreOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataLakeStoreOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.DataLake/Accounts" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataLakeStoreOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasourceproperties.go new file mode 100644 index 000000000000..69069fcc8ada --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasourceproperties.go @@ -0,0 +1,16 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreOutputDataSourceProperties struct { + AccountName *string `json:"accountName,omitempty"` + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + DateFormat *string `json:"dateFormat,omitempty"` + FilePathPrefix *string `json:"filePathPrefix,omitempty"` + RefreshToken *string `json:"refreshToken,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + TimeFormat *string `json:"timeFormat,omitempty"` + TokenUserDisplayName *string `json:"tokenUserDisplayName,omitempty"` + TokenUserPrincipalName *string `json:"tokenUserPrincipalName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go new file mode 100644 index 000000000000..659bcd759a45 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = AzureFunctionOutputDataSource{} + +type AzureFunctionOutputDataSource struct { + Properties *AzureFunctionOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = AzureFunctionOutputDataSource{} + +func (s AzureFunctionOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureFunctionOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFunctionOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFunctionOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.AzureFunction" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFunctionOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasourceproperties.go new file mode 100644 index 000000000000..b73fb94709b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasourceproperties.go @@ -0,0 +1,12 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFunctionOutputDataSourceProperties struct { + ApiKey *string `json:"apiKey,omitempty"` + FunctionAppName *string `json:"functionAppName,omitempty"` + FunctionName *string `json:"functionName,omitempty"` + MaxBatchCount *float64 `json:"maxBatchCount,omitempty"` + MaxBatchSize *float64 `json:"maxBatchSize,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go new file mode 100644 index 000000000000..20c14be3296e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FunctionBinding = AzureMachineLearningServiceFunctionBinding{} + +type AzureMachineLearningServiceFunctionBinding struct { + Properties *AzureMachineLearningServiceFunctionBindingProperties `json:"properties,omitempty"` + + // Fields inherited from FunctionBinding +} + +var _ json.Marshaler = AzureMachineLearningServiceFunctionBinding{} + +func (s AzureMachineLearningServiceFunctionBinding) MarshalJSON() ([]byte, error) { + type wrapper AzureMachineLearningServiceFunctionBinding + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMachineLearningServiceFunctionBinding: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMachineLearningServiceFunctionBinding: %+v", err) + } + decoded["type"] = "Microsoft.MachineLearningServices" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMachineLearningServiceFunctionBinding: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbindingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbindingproperties.go new file mode 100644 index 000000000000..92d0b87fedc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbindingproperties.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningServiceFunctionBindingProperties struct { + ApiKey *string `json:"apiKey,omitempty"` + BatchSize *int64 `json:"batchSize,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + InputRequestName *string `json:"inputRequestName,omitempty"` + Inputs *[]AzureMachineLearningServiceInputColumn `json:"inputs,omitempty"` + NumberOfParallelRequests *int64 `json:"numberOfParallelRequests,omitempty"` + OutputResponseName *string `json:"outputResponseName,omitempty"` + Outputs *[]AzureMachineLearningServiceOutputColumn `json:"outputs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningserviceinputcolumn.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningserviceinputcolumn.go new file mode 100644 index 000000000000..2a3d1e465b65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningserviceinputcolumn.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningServiceInputColumn struct { + DataType *string `json:"dataType,omitempty"` + MapTo *int64 `json:"mapTo,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningserviceoutputcolumn.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningserviceoutputcolumn.go new file mode 100644 index 000000000000..ae9fa02804e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningserviceoutputcolumn.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningServiceOutputColumn struct { + DataType *string `json:"dataType,omitempty"` + MapTo *int64 `json:"mapTo,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go new file mode 100644 index 000000000000..96f7218eb5a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FunctionBinding = AzureMachineLearningStudioFunctionBinding{} + +type AzureMachineLearningStudioFunctionBinding struct { + Properties *AzureMachineLearningStudioFunctionBindingProperties `json:"properties,omitempty"` + + // Fields inherited from FunctionBinding +} + +var _ json.Marshaler = AzureMachineLearningStudioFunctionBinding{} + +func (s AzureMachineLearningStudioFunctionBinding) MarshalJSON() ([]byte, error) { + type wrapper AzureMachineLearningStudioFunctionBinding + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMachineLearningStudioFunctionBinding: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMachineLearningStudioFunctionBinding: %+v", err) + } + decoded["type"] = "Microsoft.MachineLearning/WebService" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMachineLearningStudioFunctionBinding: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbindingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbindingproperties.go new file mode 100644 index 000000000000..38df0ea5e25f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbindingproperties.go @@ -0,0 +1,12 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningStudioFunctionBindingProperties struct { + ApiKey *string `json:"apiKey,omitempty"` + BatchSize *int64 `json:"batchSize,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + Inputs *AzureMachineLearningStudioInputs `json:"inputs,omitempty"` + Outputs *[]AzureMachineLearningStudioOutputColumn `json:"outputs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudioinputcolumn.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudioinputcolumn.go new file mode 100644 index 000000000000..c565144fc890 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudioinputcolumn.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningStudioInputColumn struct { + DataType *string `json:"dataType,omitempty"` + MapTo *int64 `json:"mapTo,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudioinputs.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudioinputs.go new file mode 100644 index 000000000000..5c542f3efdb1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudioinputs.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningStudioInputs struct { + ColumnNames *[]AzureMachineLearningStudioInputColumn `json:"columnNames,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiooutputcolumn.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiooutputcolumn.go new file mode 100644 index 000000000000..e5a0aa8a79f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiooutputcolumn.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMachineLearningStudioOutputColumn struct { + DataType *string `json:"dataType,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabasedatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabasedatasourceproperties.go new file mode 100644 index 000000000000..3b228484ce1a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabasedatasourceproperties.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlDatabaseDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Database *string `json:"database,omitempty"` + MaxBatchCount *float64 `json:"maxBatchCount,omitempty"` + MaxWriterCount *float64 `json:"maxWriterCount,omitempty"` + Password *string `json:"password,omitempty"` + Server *string `json:"server,omitempty"` + Table *string `json:"table,omitempty"` + User *string `json:"user,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go new file mode 100644 index 000000000000..586193d027a1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = AzureSqlDatabaseOutputDataSource{} + +type AzureSqlDatabaseOutputDataSource struct { + Properties *AzureSqlDatabaseDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = AzureSqlDatabaseOutputDataSource{} + +func (s AzureSqlDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlDatabaseOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlDatabaseOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Sql/Server/Database" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlDatabaseOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go new file mode 100644 index 000000000000..e0ced0b72072 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ReferenceInputDataSource = AzureSqlReferenceInputDataSource{} + +type AzureSqlReferenceInputDataSource struct { + Properties *AzureSqlReferenceInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from ReferenceInputDataSource +} + +var _ json.Marshaler = AzureSqlReferenceInputDataSource{} + +func (s AzureSqlReferenceInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlReferenceInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlReferenceInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlReferenceInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Sql/Server/Database" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlReferenceInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasourceproperties.go new file mode 100644 index 000000000000..f3e957accc10 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasourceproperties.go @@ -0,0 +1,16 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlReferenceInputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Database *string `json:"database,omitempty"` + DeltaSnapshotQuery *string `json:"deltaSnapshotQuery,omitempty"` + FullSnapshotQuery *string `json:"fullSnapshotQuery,omitempty"` + Password *string `json:"password,omitempty"` + RefreshRate *string `json:"refreshRate,omitempty"` + RefreshType *RefreshType `json:"refreshType,omitempty"` + Server *string `json:"server,omitempty"` + User *string `json:"user,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapsedatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapsedatasourceproperties.go new file mode 100644 index 000000000000..dcb18f0589c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapsedatasourceproperties.go @@ -0,0 +1,13 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSynapseDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Database *string `json:"database,omitempty"` + Password *string `json:"password,omitempty"` + Server *string `json:"server,omitempty"` + Table *string `json:"table,omitempty"` + User *string `json:"user,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go new file mode 100644 index 000000000000..903fb2032157 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = AzureSynapseOutputDataSource{} + +type AzureSynapseOutputDataSource struct { + Properties *AzureSynapseDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = AzureSynapseOutputDataSource{} + +func (s AzureSynapseOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureSynapseOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSynapseOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSynapseOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Sql/Server/DataWarehouse" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSynapseOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go new file mode 100644 index 000000000000..6fbde873ddcc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = AzureTableOutputDataSource{} + +type AzureTableOutputDataSource struct { + Properties *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = AzureTableOutputDataSource{} + +func (s AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper AzureTableOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureTableOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureTableOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Storage/Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureTableOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasourceproperties.go new file mode 100644 index 000000000000..38aa77d9be24 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasourceproperties.go @@ -0,0 +1,14 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureTableOutputDataSourceProperties struct { + AccountKey *string `json:"accountKey,omitempty"` + AccountName *string `json:"accountName,omitempty"` + BatchSize *int64 `json:"batchSize,omitempty"` + ColumnsToRemove *[]string `json:"columnsToRemove,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + RowKey *string `json:"rowKey,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go new file mode 100644 index 000000000000..97864687f916 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = BlobOutputDataSource{} + +type BlobOutputDataSource struct { + Properties *BlobOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = BlobOutputDataSource{} + +func (s BlobOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper BlobOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling BlobOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling BlobOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Storage/Blob" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling BlobOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasourceproperties.go new file mode 100644 index 000000000000..bf0ba2b224d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasourceproperties.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobOutputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + BlobPathPrefix *string `json:"blobPathPrefix,omitempty"` + BlobWriteMode *BlobWriteMode `json:"blobWriteMode,omitempty"` + Container *string `json:"container,omitempty"` + DateFormat *string `json:"dateFormat,omitempty"` + PathPattern *string `json:"pathPattern,omitempty"` + StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` + TimeFormat *string `json:"timeFormat,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go new file mode 100644 index 000000000000..3398a3d79add --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ReferenceInputDataSource = BlobReferenceInputDataSource{} + +type BlobReferenceInputDataSource struct { + Properties *BlobReferenceInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from ReferenceInputDataSource +} + +var _ json.Marshaler = BlobReferenceInputDataSource{} + +func (s BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper BlobReferenceInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling BlobReferenceInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling BlobReferenceInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Storage/Blob" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling BlobReferenceInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasourceproperties.go new file mode 100644 index 000000000000..fd4691b6d7c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasourceproperties.go @@ -0,0 +1,18 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobReferenceInputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + BlobName *string `json:"blobName,omitempty"` + Container *string `json:"container,omitempty"` + DateFormat *string `json:"dateFormat,omitempty"` + DeltaPathPattern *string `json:"deltaPathPattern,omitempty"` + DeltaSnapshotRefreshRate *string `json:"deltaSnapshotRefreshRate,omitempty"` + FullSnapshotRefreshRate *string `json:"fullSnapshotRefreshRate,omitempty"` + PathPattern *string `json:"pathPattern,omitempty"` + SourcePartitionCount *int64 `json:"sourcePartitionCount,omitempty"` + StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` + TimeFormat *string `json:"timeFormat,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go new file mode 100644 index 000000000000..38e280e54b6e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = BlobStreamInputDataSource{} + +type BlobStreamInputDataSource struct { + Properties *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = BlobStreamInputDataSource{} + +func (s BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper BlobStreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling BlobStreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling BlobStreamInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Storage/Blob" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling BlobStreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasourceproperties.go new file mode 100644 index 000000000000..ca1b3b4a7156 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasourceproperties.go @@ -0,0 +1,14 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobStreamInputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Container *string `json:"container,omitempty"` + DateFormat *string `json:"dateFormat,omitempty"` + PathPattern *string `json:"pathPattern,omitempty"` + SourcePartitionCount *int64 `json:"sourcePartitionCount,omitempty"` + StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` + TimeFormat *string `json:"timeFormat,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_clusterinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_clusterinfo.go new file mode 100644 index 000000000000..cc5d388f2f09 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_clusterinfo.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterInfo struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_compression.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_compression.go new file mode 100644 index 000000000000..e39a8efc2c6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_compression.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Compression struct { + Type CompressionType `json:"type"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go new file mode 100644 index 000000000000..3eec60380d41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FunctionBinding = CSharpFunctionBinding{} + +type CSharpFunctionBinding struct { + Properties *CSharpFunctionBindingProperties `json:"properties,omitempty"` + + // Fields inherited from FunctionBinding +} + +var _ json.Marshaler = CSharpFunctionBinding{} + +func (s CSharpFunctionBinding) MarshalJSON() ([]byte, error) { + type wrapper CSharpFunctionBinding + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CSharpFunctionBinding: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CSharpFunctionBinding: %+v", err) + } + decoded["type"] = "Microsoft.StreamAnalytics/CLRUdf" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CSharpFunctionBinding: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbindingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbindingproperties.go new file mode 100644 index 000000000000..fc30c851d2a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbindingproperties.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CSharpFunctionBindingProperties struct { + Class *string `json:"class,omitempty"` + DllPath *string `json:"dllPath,omitempty"` + Method *string `json:"method,omitempty"` + UpdateMode *UpdateMode `json:"updateMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go new file mode 100644 index 000000000000..ca3eacfc0714 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Serialization = CsvSerialization{} + +type CsvSerialization struct { + Properties *CsvSerializationProperties `json:"properties,omitempty"` + + // Fields inherited from Serialization +} + +var _ json.Marshaler = CsvSerialization{} + +func (s CsvSerialization) MarshalJSON() ([]byte, error) { + type wrapper CsvSerialization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CsvSerialization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) + } + decoded["type"] = "Csv" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CsvSerialization: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserializationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserializationproperties.go new file mode 100644 index 000000000000..af4352dafd9a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserializationproperties.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CsvSerializationProperties struct { + Encoding *Encoding `json:"encoding,omitempty"` + FieldDelimiter *string `json:"fieldDelimiter,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go new file mode 100644 index 000000000000..75a5f6c1659b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Serialization = CustomClrSerialization{} + +type CustomClrSerialization struct { + Properties *CustomClrSerializationProperties `json:"properties,omitempty"` + + // Fields inherited from Serialization +} + +var _ json.Marshaler = CustomClrSerialization{} + +func (s CustomClrSerialization) MarshalJSON() ([]byte, error) { + type wrapper CustomClrSerialization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CustomClrSerialization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CustomClrSerialization: %+v", err) + } + decoded["type"] = "CustomClr" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CustomClrSerialization: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserializationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserializationproperties.go new file mode 100644 index 000000000000..9a8c063a6e94 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserializationproperties.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomClrSerializationProperties struct { + SerializationClassName *string `json:"serializationClassName,omitempty"` + SerializationDllPath *string `json:"serializationDllPath,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go new file mode 100644 index 000000000000..ce3d60583738 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Serialization = DeltaSerialization{} + +type DeltaSerialization struct { + Properties *DeltaSerializationProperties `json:"properties,omitempty"` + + // Fields inherited from Serialization +} + +var _ json.Marshaler = DeltaSerialization{} + +func (s DeltaSerialization) MarshalJSON() ([]byte, error) { + type wrapper DeltaSerialization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeltaSerialization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeltaSerialization: %+v", err) + } + decoded["type"] = "Delta" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeltaSerialization: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserializationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserializationproperties.go new file mode 100644 index 000000000000..adec19f124bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserializationproperties.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeltaSerializationProperties struct { + DeltaTablePath string `json:"deltaTablePath"` + PartitionColumns *[]string `json:"partitionColumns,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_diagnosticcondition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_diagnosticcondition.go new file mode 100644 index 000000000000..0604396868e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_diagnosticcondition.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticCondition struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Since *string `json:"since,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_diagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_diagnostics.go new file mode 100644 index 000000000000..aca09fcef944 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_diagnostics.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Diagnostics struct { + Conditions *[]DiagnosticCondition `json:"conditions,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go new file mode 100644 index 000000000000..15079a002be4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = DocumentDbOutputDataSource{} + +type DocumentDbOutputDataSource struct { + Properties *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = DocumentDbOutputDataSource{} + +func (s DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper DocumentDbOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DocumentDbOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DocumentDbOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Storage/DocumentDB" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DocumentDbOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasourceproperties.go new file mode 100644 index 000000000000..c54f77861cae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasourceproperties.go @@ -0,0 +1,14 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DocumentDbOutputDataSourceProperties struct { + AccountId *string `json:"accountId,omitempty"` + AccountKey *string `json:"accountKey,omitempty"` + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + CollectionNamePattern *string `json:"collectionNamePattern,omitempty"` + Database *string `json:"database,omitempty"` + DocumentId *string `json:"documentId,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go new file mode 100644 index 000000000000..03e527105447 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = EventGridStreamInputDataSource{} + +type EventGridStreamInputDataSource struct { + Properties *EventGridStreamInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = EventGridStreamInputDataSource{} + +func (s EventGridStreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper EventGridStreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EventGridStreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EventGridStreamInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.EventGrid/EventSubscriptions" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EventGridStreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasourceproperties.go new file mode 100644 index 000000000000..88751f939cd2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasourceproperties.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EventGridStreamInputDataSourceProperties struct { + EventTypes *[]string `json:"eventTypes,omitempty"` + Schema *EventGridEventSchemaType `json:"schema,omitempty"` + StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` + Subscriber *EventHubV2StreamInputDataSource `json:"subscriber,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go new file mode 100644 index 000000000000..291857248825 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = EventHubOutputDataSource{} + +type EventHubOutputDataSource struct { + Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = EventHubOutputDataSource{} + +func (s EventHubOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper EventHubOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EventHubOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EventHubOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.ServiceBus/EventHub" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EventHubOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasourceproperties.go new file mode 100644 index 000000000000..efae5d3b8e47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasourceproperties.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EventHubOutputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + EventHubName *string `json:"eventHubName,omitempty"` + PartitionCount *int64 `json:"partitionCount,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + PropertyColumns *[]string `json:"propertyColumns,omitempty"` + ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + SharedAccessPolicyKey *string `json:"sharedAccessPolicyKey,omitempty"` + SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go new file mode 100644 index 000000000000..cacc6f7ee788 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = EventHubStreamInputDataSource{} + +type EventHubStreamInputDataSource struct { + Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = EventHubStreamInputDataSource{} + +func (s EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper EventHubStreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EventHubStreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EventHubStreamInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.ServiceBus/EventHub" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EventHubStreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasourceproperties.go new file mode 100644 index 000000000000..fb9e8bf0de9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasourceproperties.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EventHubStreamInputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + EventHubName *string `json:"eventHubName,omitempty"` + PartitionCount *int64 `json:"partitionCount,omitempty"` + PrefetchCount *int64 `json:"prefetchCount,omitempty"` + ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + SharedAccessPolicyKey *string `json:"sharedAccessPolicyKey,omitempty"` + SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go new file mode 100644 index 000000000000..eb9c2affe6ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = EventHubV2OutputDataSource{} + +type EventHubV2OutputDataSource struct { + Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = EventHubV2OutputDataSource{} + +func (s EventHubV2OutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper EventHubV2OutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EventHubV2OutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EventHubV2OutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.EventHub/EventHub" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EventHubV2OutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go new file mode 100644 index 000000000000..9236cbf7ed4f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = EventHubV2StreamInputDataSource{} + +type EventHubV2StreamInputDataSource struct { + Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = EventHubV2StreamInputDataSource{} + +func (s EventHubV2StreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper EventHubV2StreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EventHubV2StreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EventHubV2StreamInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.EventHub/EventHub" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EventHubV2StreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_external.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_external.go new file mode 100644 index 000000000000..ba141cce0b96 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_external.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type External struct { + Container *string `json:"container,omitempty"` + Path *string `json:"path,omitempty"` + RefreshConfiguration *RefreshConfiguration `json:"refreshConfiguration,omitempty"` + StorageAccount *StorageAccount `json:"storageAccount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go new file mode 100644 index 000000000000..1d09bf0cc6f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ReferenceInputDataSource = FileReferenceInputDataSource{} + +type FileReferenceInputDataSource struct { + Properties *FileReferenceInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from ReferenceInputDataSource +} + +var _ json.Marshaler = FileReferenceInputDataSource{} + +func (s FileReferenceInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper FileReferenceInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FileReferenceInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FileReferenceInputDataSource: %+v", err) + } + decoded["type"] = "File" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FileReferenceInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasourceproperties.go new file mode 100644 index 000000000000..610e6a0d1183 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasourceproperties.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileReferenceInputDataSourceProperties struct { + Path *string `json:"path,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go new file mode 100644 index 000000000000..c7a271194d06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go @@ -0,0 +1,44 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Function struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties FunctionProperties `json:"properties"` + Type *string `json:"type,omitempty"` +} + +var _ json.Unmarshaler = &Function{} + +func (s *Function) UnmarshalJSON(bytes []byte) error { + type alias Function + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into Function: %+v", err) + } + + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling Function into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalFunctionPropertiesImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'Function': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go new file mode 100644 index 000000000000..acae995c54d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go @@ -0,0 +1,77 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionBinding interface { +} + +// RawFunctionBindingImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawFunctionBindingImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling FunctionBinding into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Microsoft.MachineLearningServices") { + var out AzureMachineLearningServiceFunctionBinding + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMachineLearningServiceFunctionBinding: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.MachineLearning/WebService") { + var out AzureMachineLearningStudioFunctionBinding + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMachineLearningStudioFunctionBinding: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.StreamAnalytics/CLRUdf") { + var out CSharpFunctionBinding + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CSharpFunctionBinding: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.StreamAnalytics/JavascriptUdf") { + var out JavaScriptFunctionBinding + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JavaScriptFunctionBinding: %+v", err) + } + return out, nil + } + + out := RawFunctionBindingImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go new file mode 100644 index 000000000000..5216fe6262ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go @@ -0,0 +1,42 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionConfiguration struct { + Binding FunctionBinding `json:"binding"` + Inputs *[]FunctionInput `json:"inputs,omitempty"` + Output *FunctionOutput `json:"output,omitempty"` +} + +var _ json.Unmarshaler = &FunctionConfiguration{} + +func (s *FunctionConfiguration) UnmarshalJSON(bytes []byte) error { + type alias FunctionConfiguration + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FunctionConfiguration: %+v", err) + } + + s.Inputs = decoded.Inputs + s.Output = decoded.Output + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling FunctionConfiguration into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["binding"]; ok { + impl, err := unmarshalFunctionBindingImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Binding' for 'FunctionConfiguration': %+v", err) + } + s.Binding = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functioninput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functioninput.go new file mode 100644 index 000000000000..33c784c6688c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functioninput.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionInput struct { + DataType *string `json:"dataType,omitempty"` + IsConfigurationParameter *bool `json:"isConfigurationParameter,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionoutput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionoutput.go new file mode 100644 index 000000000000..b61c0863dfbf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionoutput.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionOutput struct { + DataType *string `json:"dataType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go new file mode 100644 index 000000000000..797d9ff51204 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go @@ -0,0 +1,61 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FunctionProperties interface { +} + +// RawFunctionPropertiesImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawFunctionPropertiesImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling FunctionProperties into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Aggregate") { + var out AggregateFunctionProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AggregateFunctionProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Scalar") { + var out ScalarFunctionProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ScalarFunctionProperties: %+v", err) + } + return out, nil + } + + out := RawFunctionPropertiesImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go new file mode 100644 index 000000000000..9f157cca9317 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = GatewayMessageBusOutputDataSource{} + +type GatewayMessageBusOutputDataSource struct { + Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = GatewayMessageBusOutputDataSource{} + +func (s GatewayMessageBusOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper GatewayMessageBusOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GatewayMessageBusOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GatewayMessageBusOutputDataSource: %+v", err) + } + decoded["type"] = "GatewayMessageBus" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GatewayMessageBusOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebussourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebussourceproperties.go new file mode 100644 index 000000000000..8b2e278dc588 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebussourceproperties.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GatewayMessageBusSourceProperties struct { + Topic *string `json:"topic,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go new file mode 100644 index 000000000000..5f9bcf69fcae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = GatewayMessageBusStreamInputDataSource{} + +type GatewayMessageBusStreamInputDataSource struct { + Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = GatewayMessageBusStreamInputDataSource{} + +func (s GatewayMessageBusStreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper GatewayMessageBusStreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GatewayMessageBusStreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GatewayMessageBusStreamInputDataSource: %+v", err) + } + decoded["type"] = "GatewayMessageBus" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GatewayMessageBusStreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_getstreamingjobskuresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_getstreamingjobskuresult.go new file mode 100644 index 000000000000..1c89be70f8f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_getstreamingjobskuresult.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetStreamingJobSkuResult struct { + Capacity *SkuCapacity `json:"capacity,omitempty"` + ResourceType *ResourceType `json:"resourceType,omitempty"` + Sku *GetStreamingJobSkuResultSku `json:"sku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_getstreamingjobskuresultsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_getstreamingjobskuresultsku.go new file mode 100644 index 000000000000..5b9b9ceb9382 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_getstreamingjobskuresultsku.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetStreamingJobSkuResultSku struct { + Name *SkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_identity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_identity.go new file mode 100644 index 000000000000..347328698b7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_identity.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Identity struct { + PrincipalId *string `json:"principalId,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities *map[string]interface{} `json:"userAssignedIdentities,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go new file mode 100644 index 000000000000..a68319e701f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go @@ -0,0 +1,44 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Input struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties InputProperties `json:"properties"` + Type *string `json:"type,omitempty"` +} + +var _ json.Unmarshaler = &Input{} + +func (s *Input) UnmarshalJSON(bytes []byte) error { + type alias Input + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into Input: %+v", err) + } + + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling Input into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalInputPropertiesImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'Input': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go new file mode 100644 index 000000000000..20140f3aa714 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go @@ -0,0 +1,61 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InputProperties interface { +} + +// RawInputPropertiesImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawInputPropertiesImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling InputProperties into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Reference") { + var out ReferenceInputProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ReferenceInputProperties: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Stream") { + var out StreamInputProperties + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into StreamInputProperties: %+v", err) + } + return out, nil + } + + out := RawInputPropertiesImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputwatermarkproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputwatermarkproperties.go new file mode 100644 index 000000000000..514f50d0063c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputwatermarkproperties.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InputWatermarkProperties struct { + WatermarkMode *InputWatermarkMode `json:"watermarkMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go new file mode 100644 index 000000000000..dd9c76103f20 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = IoTHubStreamInputDataSource{} + +type IoTHubStreamInputDataSource struct { + Properties *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = IoTHubStreamInputDataSource{} + +func (s IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper IoTHubStreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling IoTHubStreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling IoTHubStreamInputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.Devices/IotHubs" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling IoTHubStreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasourceproperties.go new file mode 100644 index 000000000000..cbf5a58df7a8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasourceproperties.go @@ -0,0 +1,12 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IoTHubStreamInputDataSourceProperties struct { + ConsumerGroupName *string `json:"consumerGroupName,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + IotHubNamespace *string `json:"iotHubNamespace,omitempty"` + SharedAccessPolicyKey *string `json:"sharedAccessPolicyKey,omitempty"` + SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go new file mode 100644 index 000000000000..72a1c06fd0a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FunctionBinding = JavaScriptFunctionBinding{} + +type JavaScriptFunctionBinding struct { + Properties *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` + + // Fields inherited from FunctionBinding +} + +var _ json.Marshaler = JavaScriptFunctionBinding{} + +func (s JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { + type wrapper JavaScriptFunctionBinding + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JavaScriptFunctionBinding: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JavaScriptFunctionBinding: %+v", err) + } + decoded["type"] = "Microsoft.StreamAnalytics/JavascriptUdf" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JavaScriptFunctionBinding: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbindingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbindingproperties.go new file mode 100644 index 000000000000..e6188434e02a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbindingproperties.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JavaScriptFunctionBindingProperties struct { + Script *string `json:"script,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jobstorageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jobstorageaccount.go new file mode 100644 index 000000000000..79335cf0ed88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jobstorageaccount.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobStorageAccount struct { + AccountKey *string `json:"accountKey,omitempty"` + AccountName *string `json:"accountName,omitempty"` + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go new file mode 100644 index 000000000000..e1e25c3058e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Serialization = JsonSerialization{} + +type JsonSerialization struct { + Properties *JsonSerializationProperties `json:"properties,omitempty"` + + // Fields inherited from Serialization +} + +var _ json.Marshaler = JsonSerialization{} + +func (s JsonSerialization) MarshalJSON() ([]byte, error) { + type wrapper JsonSerialization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JsonSerialization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) + } + decoded["type"] = "Json" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JsonSerialization: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserializationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserializationproperties.go new file mode 100644 index 000000000000..ee01fd28fd05 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserializationproperties.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonSerializationProperties struct { + Encoding *Encoding `json:"encoding,omitempty"` + Format *JsonOutputSerializationFormat `json:"format,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_lastoutputeventtimestamp.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_lastoutputeventtimestamp.go new file mode 100644 index 000000000000..58c9119a8175 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_lastoutputeventtimestamp.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LastOutputEventTimestamp struct { + LastOutputEventTime *string `json:"lastOutputEventTime,omitempty"` + LastUpdateTime *string `json:"lastUpdateTime,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_output.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_output.go new file mode 100644 index 000000000000..bb53d4ccbafb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_output.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Output struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *OutputProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go new file mode 100644 index 000000000000..c9123b7ea1c7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go @@ -0,0 +1,173 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutputDataSource interface { +} + +// RawOutputDataSourceImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawOutputDataSourceImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling OutputDataSource into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Microsoft.Kusto/clusters/databases") { + var out AzureDataExplorerOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataExplorerOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.DataLake/Accounts") { + var out AzureDataLakeStoreOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataLakeStoreOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.AzureFunction") { + var out AzureFunctionOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureFunctionOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Sql/Server/Database") { + var out AzureSqlDatabaseOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlDatabaseOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Sql/Server/DataWarehouse") { + var out AzureSynapseOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSynapseOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Storage/Table") { + var out AzureTableOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureTableOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Storage/Blob") { + var out BlobOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into BlobOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Storage/DocumentDB") { + var out DocumentDbOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DocumentDbOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.ServiceBus/EventHub") { + var out EventHubOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EventHubOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.EventHub/EventHub") { + var out EventHubV2OutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EventHubV2OutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GatewayMessageBus") { + var out GatewayMessageBusOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GatewayMessageBusOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.DBForPostgreSQL/servers/databases") { + var out PostgreSQLOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSQLOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PowerBI") { + var out PowerBIOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PowerBIOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Raw") { + var out RawOutputDatasource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RawOutputDatasource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.ServiceBus/Queue") { + var out ServiceBusQueueOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceBusQueueOutputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.ServiceBus/Topic") { + var out ServiceBusTopicOutputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceBusTopicOutputDataSource: %+v", err) + } + return out, nil + } + + out := RawOutputDataSourceImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go new file mode 100644 index 000000000000..8bb9c913faef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go @@ -0,0 +1,59 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutputProperties struct { + Datasource OutputDataSource `json:"datasource"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + LastOutputEventTimestamps *[]LastOutputEventTimestamp `json:"lastOutputEventTimestamps,omitempty"` + Serialization Serialization `json:"serialization"` + SizeWindow *int64 `json:"sizeWindow,omitempty"` + TimeWindow *string `json:"timeWindow,omitempty"` + WatermarkSettings *OutputWatermarkProperties `json:"watermarkSettings,omitempty"` +} + +var _ json.Unmarshaler = &OutputProperties{} + +func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { + type alias OutputProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OutputProperties: %+v", err) + } + + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.LastOutputEventTimestamps = decoded.LastOutputEventTimestamps + s.SizeWindow = decoded.SizeWindow + s.TimeWindow = decoded.TimeWindow + s.WatermarkSettings = decoded.WatermarkSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OutputProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["datasource"]; ok { + impl, err := unmarshalOutputDataSourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Datasource' for 'OutputProperties': %+v", err) + } + s.Datasource = impl + } + + if v, ok := temp["serialization"]; ok { + impl, err := unmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'OutputProperties': %+v", err) + } + s.Serialization = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputwatermarkproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputwatermarkproperties.go new file mode 100644 index 000000000000..3b1995a99209 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputwatermarkproperties.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OutputWatermarkProperties struct { + MaxWatermarkDifferenceAcrossPartitions *string `json:"maxWatermarkDifferenceAcrossPartitions,omitempty"` + WatermarkMode *OutputWatermarkMode `json:"watermarkMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go new file mode 100644 index 000000000000..2e44cd8b9095 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Serialization = ParquetSerialization{} + +type ParquetSerialization struct { + Properties *interface{} `json:"properties,omitempty"` + + // Fields inherited from Serialization +} + +var _ json.Marshaler = ParquetSerialization{} + +func (s ParquetSerialization) MarshalJSON() ([]byte, error) { + type wrapper ParquetSerialization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ParquetSerialization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) + } + decoded["type"] = "Parquet" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ParquetSerialization: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqldatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqldatasourceproperties.go new file mode 100644 index 000000000000..9c47cae3608e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqldatasourceproperties.go @@ -0,0 +1,14 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSQLDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Database *string `json:"database,omitempty"` + MaxWriterCount *float64 `json:"maxWriterCount,omitempty"` + Password *string `json:"password,omitempty"` + Server *string `json:"server,omitempty"` + Table *string `json:"table,omitempty"` + User *string `json:"user,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go new file mode 100644 index 000000000000..89ad0177e33d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = PostgreSQLOutputDataSource{} + +type PostgreSQLOutputDataSource struct { + Properties *PostgreSQLDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = PostgreSQLOutputDataSource{} + +func (s PostgreSQLOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper PostgreSQLOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSQLOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSQLOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.DBForPostgreSQL/servers/databases" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSQLOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go new file mode 100644 index 000000000000..2a64ef14547a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = PowerBIOutputDataSource{} + +type PowerBIOutputDataSource struct { + Properties *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = PowerBIOutputDataSource{} + +func (s PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper PowerBIOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PowerBIOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PowerBIOutputDataSource: %+v", err) + } + decoded["type"] = "PowerBI" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PowerBIOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasourceproperties.go new file mode 100644 index 000000000000..88be280fca5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasourceproperties.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PowerBIOutputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + Dataset *string `json:"dataset,omitempty"` + GroupId *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` + RefreshToken *string `json:"refreshToken,omitempty"` + Table *string `json:"table,omitempty"` + TokenUserDisplayName *string `json:"tokenUserDisplayName,omitempty"` + TokenUserPrincipalName *string `json:"tokenUserPrincipalName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawinputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawinputdatasourceproperties.go new file mode 100644 index 000000000000..82ad4a0dc82f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawinputdatasourceproperties.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RawInputDatasourceProperties struct { + Payload *string `json:"payload,omitempty"` + PayloadUri *string `json:"payloadUri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go new file mode 100644 index 000000000000..968e57d81cc5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = RawOutputDatasource{} + +type RawOutputDatasource struct { + Properties *RawOutputDatasourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = RawOutputDatasource{} + +func (s RawOutputDatasource) MarshalJSON() ([]byte, error) { + type wrapper RawOutputDatasource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RawOutputDatasource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RawOutputDatasource: %+v", err) + } + decoded["type"] = "Raw" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RawOutputDatasource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasourceproperties.go new file mode 100644 index 000000000000..ff2428f456f6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasourceproperties.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RawOutputDatasourceProperties struct { + PayloadUri *string `json:"payloadUri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go new file mode 100644 index 000000000000..734f2b5c47c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ReferenceInputDataSource = RawReferenceInputDataSource{} + +type RawReferenceInputDataSource struct { + Properties *RawInputDatasourceProperties `json:"properties,omitempty"` + + // Fields inherited from ReferenceInputDataSource +} + +var _ json.Marshaler = RawReferenceInputDataSource{} + +func (s RawReferenceInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper RawReferenceInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RawReferenceInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RawReferenceInputDataSource: %+v", err) + } + decoded["type"] = "Raw" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RawReferenceInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go new file mode 100644 index 000000000000..91aa55a3a0b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ StreamInputDataSource = RawStreamInputDataSource{} + +type RawStreamInputDataSource struct { + Properties *RawInputDatasourceProperties `json:"properties,omitempty"` + + // Fields inherited from StreamInputDataSource +} + +var _ json.Marshaler = RawStreamInputDataSource{} + +func (s RawStreamInputDataSource) MarshalJSON() ([]byte, error) { + type wrapper RawStreamInputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RawStreamInputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RawStreamInputDataSource: %+v", err) + } + decoded["type"] = "Raw" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RawStreamInputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go new file mode 100644 index 000000000000..5f55cc7f000f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go @@ -0,0 +1,77 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReferenceInputDataSource interface { +} + +// RawReferenceInputDataSourceImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawReferenceInputDataSourceImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling ReferenceInputDataSource into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Microsoft.Sql/Server/Database") { + var out AzureSqlReferenceInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlReferenceInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Storage/Blob") { + var out BlobReferenceInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into BlobReferenceInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "File") { + var out FileReferenceInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FileReferenceInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Raw") { + var out RawReferenceInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RawReferenceInputDataSource: %+v", err) + } + return out, nil + } + + out := RawReferenceInputDataSourceImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go new file mode 100644 index 000000000000..cf2f24a3aefc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go @@ -0,0 +1,85 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ InputProperties = ReferenceInputProperties{} + +type ReferenceInputProperties struct { + Datasource ReferenceInputDataSource `json:"datasource"` + + // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` +} + +var _ json.Marshaler = ReferenceInputProperties{} + +func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { + type wrapper ReferenceInputProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ReferenceInputProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ReferenceInputProperties: %+v", err) + } + decoded["type"] = "Reference" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ReferenceInputProperties: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &ReferenceInputProperties{} + +func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { + type alias ReferenceInputProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ReferenceInputProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.WatermarkSettings = decoded.WatermarkSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ReferenceInputProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["datasource"]; ok { + impl, err := unmarshalReferenceInputDataSourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Datasource' for 'ReferenceInputProperties': %+v", err) + } + s.Datasource = impl + } + + if v, ok := temp["serialization"]; ok { + impl, err := unmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'ReferenceInputProperties': %+v", err) + } + s.Serialization = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_refreshconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_refreshconfiguration.go new file mode 100644 index 000000000000..e7736f8751f8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_refreshconfiguration.go @@ -0,0 +1,12 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RefreshConfiguration struct { + DateFormat *string `json:"dateFormat,omitempty"` + PathPattern *string `json:"pathPattern,omitempty"` + RefreshInterval *string `json:"refreshInterval,omitempty"` + RefreshType *UpdatableUdfRefreshType `json:"refreshType,omitempty"` + TimeFormat *string `json:"timeFormat,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go new file mode 100644 index 000000000000..5804ccf9bcda --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go @@ -0,0 +1,42 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FunctionProperties = ScalarFunctionProperties{} + +type ScalarFunctionProperties struct { + + // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` +} + +var _ json.Marshaler = ScalarFunctionProperties{} + +func (s ScalarFunctionProperties) MarshalJSON() ([]byte, error) { + type wrapper ScalarFunctionProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ScalarFunctionProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ScalarFunctionProperties: %+v", err) + } + decoded["type"] = "Scalar" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ScalarFunctionProperties: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalestreamingjobparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalestreamingjobparameters.go new file mode 100644 index 000000000000..f90851d7a4ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalestreamingjobparameters.go @@ -0,0 +1,8 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScaleStreamingJobParameters struct { + StreamingUnits *int64 `json:"streamingUnits,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go new file mode 100644 index 000000000000..c83d8c218c97 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go @@ -0,0 +1,93 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Serialization interface { +} + +// RawSerializationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSerializationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSerializationImplementation(input []byte) (Serialization, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling Serialization into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Avro") { + var out AvroSerialization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AvroSerialization: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Csv") { + var out CsvSerialization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CsvSerialization: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CustomClr") { + var out CustomClrSerialization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CustomClrSerialization: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Delta") { + var out DeltaSerialization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeltaSerialization: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Json") { + var out JsonSerialization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JsonSerialization: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Parquet") { + var out ParquetSerialization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ParquetSerialization: %+v", err) + } + return out, nil + } + + out := RawSerializationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go new file mode 100644 index 000000000000..790e58f461bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = ServiceBusQueueOutputDataSource{} + +type ServiceBusQueueOutputDataSource struct { + Properties *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = ServiceBusQueueOutputDataSource{} + +func (s ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper ServiceBusQueueOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceBusQueueOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceBusQueueOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.ServiceBus/Queue" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceBusQueueOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasourceproperties.go new file mode 100644 index 000000000000..6043b3ac5144 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasourceproperties.go @@ -0,0 +1,14 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceBusQueueOutputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + PropertyColumns *[]string `json:"propertyColumns,omitempty"` + QueueName *string `json:"queueName,omitempty"` + ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + SharedAccessPolicyKey *string `json:"sharedAccessPolicyKey,omitempty"` + SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` + SystemPropertyColumns *interface{} `json:"systemPropertyColumns,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go new file mode 100644 index 000000000000..57f1938b5ee1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go @@ -0,0 +1,41 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OutputDataSource = ServiceBusTopicOutputDataSource{} + +type ServiceBusTopicOutputDataSource struct { + Properties *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` + + // Fields inherited from OutputDataSource +} + +var _ json.Marshaler = ServiceBusTopicOutputDataSource{} + +func (s ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { + type wrapper ServiceBusTopicOutputDataSource + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceBusTopicOutputDataSource: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceBusTopicOutputDataSource: %+v", err) + } + decoded["type"] = "Microsoft.ServiceBus/Topic" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceBusTopicOutputDataSource: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasourceproperties.go new file mode 100644 index 000000000000..aa19027e00f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasourceproperties.go @@ -0,0 +1,14 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceBusTopicOutputDataSourceProperties struct { + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` + PropertyColumns *[]string `json:"propertyColumns,omitempty"` + ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` + SharedAccessPolicyKey *string `json:"sharedAccessPolicyKey,omitempty"` + SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` + SystemPropertyColumns *map[string]string `json:"systemPropertyColumns,omitempty"` + TopicName *string `json:"topicName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_sku.go new file mode 100644 index 000000000000..d829107ca605 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_sku.go @@ -0,0 +1,9 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Capacity *int64 `json:"capacity,omitempty"` + Name *SkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_skucapacity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_skucapacity.go new file mode 100644 index 000000000000..bec2cd22bab7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_skucapacity.go @@ -0,0 +1,12 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuCapacity struct { + AllowedValues *[]int64 `json:"allowedValues,omitempty"` + Default *int64 `json:"default,omitempty"` + Maximum *int64 `json:"maximum,omitempty"` + Minimum *int64 `json:"minimum,omitempty"` + ScaleType *SkuCapacityScaleType `json:"scaleType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_startstreamingjobparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_startstreamingjobparameters.go new file mode 100644 index 000000000000..d16eab920d25 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_startstreamingjobparameters.go @@ -0,0 +1,27 @@ +package streamingjobs + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StartStreamingJobParameters struct { + OutputStartMode *OutputStartMode `json:"outputStartMode,omitempty"` + OutputStartTime *string `json:"outputStartTime,omitempty"` +} + +func (o *StartStreamingJobParameters) GetOutputStartTimeAsTime() (*time.Time, error) { + if o.OutputStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.OutputStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *StartStreamingJobParameters) SetOutputStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.OutputStartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_storageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_storageaccount.go new file mode 100644 index 000000000000..f92c932d3385 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_storageaccount.go @@ -0,0 +1,10 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageAccount struct { + AccountKey *string `json:"accountKey,omitempty"` + AccountName *string `json:"accountName,omitempty"` + AuthenticationMode *AuthenticationMode `json:"authenticationMode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streamingjob.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streamingjob.go new file mode 100644 index 000000000000..35070c9e70c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streamingjob.go @@ -0,0 +1,15 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StreamingJob struct { + Id *string `json:"id,omitempty"` + Identity *Identity `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *StreamingJobProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streamingjobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streamingjobproperties.go new file mode 100644 index 000000000000..73ef7ed3a4a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streamingjobproperties.go @@ -0,0 +1,73 @@ +package streamingjobs + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StreamingJobProperties struct { + Cluster *ClusterInfo `json:"cluster,omitempty"` + CompatibilityLevel *CompatibilityLevel `json:"compatibilityLevel,omitempty"` + ContentStoragePolicy *ContentStoragePolicy `json:"contentStoragePolicy,omitempty"` + CreatedDate *string `json:"createdDate,omitempty"` + DataLocale *string `json:"dataLocale,omitempty"` + Etag *string `json:"etag,omitempty"` + EventsLateArrivalMaxDelayInSeconds *int64 `json:"eventsLateArrivalMaxDelayInSeconds,omitempty"` + EventsOutOfOrderMaxDelayInSeconds *int64 `json:"eventsOutOfOrderMaxDelayInSeconds,omitempty"` + EventsOutOfOrderPolicy *EventsOutOfOrderPolicy `json:"eventsOutOfOrderPolicy,omitempty"` + Externals *External `json:"externals,omitempty"` + Functions *[]Function `json:"functions,omitempty"` + Inputs *[]Input `json:"inputs,omitempty"` + JobId *string `json:"jobId,omitempty"` + JobState *string `json:"jobState,omitempty"` + JobStorageAccount *JobStorageAccount `json:"jobStorageAccount,omitempty"` + JobType *JobType `json:"jobType,omitempty"` + LastOutputEventTime *string `json:"lastOutputEventTime,omitempty"` + OutputErrorPolicy *OutputErrorPolicy `json:"outputErrorPolicy,omitempty"` + OutputStartMode *OutputStartMode `json:"outputStartMode,omitempty"` + OutputStartTime *string `json:"outputStartTime,omitempty"` + Outputs *[]Output `json:"outputs,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Transformation *Transformation `json:"transformation,omitempty"` +} + +func (o *StreamingJobProperties) GetCreatedDateAsTime() (*time.Time, error) { + if o.CreatedDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *StreamingJobProperties) SetCreatedDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedDate = &formatted +} + +func (o *StreamingJobProperties) GetLastOutputEventTimeAsTime() (*time.Time, error) { + if o.LastOutputEventTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastOutputEventTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *StreamingJobProperties) SetLastOutputEventTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastOutputEventTime = &formatted +} + +func (o *StreamingJobProperties) GetOutputStartTimeAsTime() (*time.Time, error) { + if o.OutputStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.OutputStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *StreamingJobProperties) SetOutputStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.OutputStartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go new file mode 100644 index 000000000000..64c686c2badd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go @@ -0,0 +1,101 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StreamInputDataSource interface { +} + +// RawStreamInputDataSourceImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawStreamInputDataSourceImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling StreamInputDataSource into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Microsoft.Storage/Blob") { + var out BlobStreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into BlobStreamInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.EventGrid/EventSubscriptions") { + var out EventGridStreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EventGridStreamInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.ServiceBus/EventHub") { + var out EventHubStreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EventHubStreamInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.EventHub/EventHub") { + var out EventHubV2StreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EventHubV2StreamInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GatewayMessageBus") { + var out GatewayMessageBusStreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GatewayMessageBusStreamInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Microsoft.Devices/IotHubs") { + var out IoTHubStreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into IoTHubStreamInputDataSource: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Raw") { + var out RawStreamInputDataSource + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RawStreamInputDataSource: %+v", err) + } + return out, nil + } + + out := RawStreamInputDataSourceImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go new file mode 100644 index 000000000000..f59fa0ddb252 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go @@ -0,0 +1,85 @@ +package streamingjobs + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ InputProperties = StreamInputProperties{} + +type StreamInputProperties struct { + Datasource StreamInputDataSource `json:"datasource"` + + // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` +} + +var _ json.Marshaler = StreamInputProperties{} + +func (s StreamInputProperties) MarshalJSON() ([]byte, error) { + type wrapper StreamInputProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling StreamInputProperties: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling StreamInputProperties: %+v", err) + } + decoded["type"] = "Stream" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling StreamInputProperties: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &StreamInputProperties{} + +func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { + type alias StreamInputProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into StreamInputProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.WatermarkSettings = decoded.WatermarkSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling StreamInputProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["datasource"]; ok { + impl, err := unmarshalStreamInputDataSourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Datasource' for 'StreamInputProperties': %+v", err) + } + s.Datasource = impl + } + + if v, ok := temp["serialization"]; ok { + impl, err := unmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'StreamInputProperties': %+v", err) + } + s.Serialization = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_transformation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_transformation.go new file mode 100644 index 000000000000..9f12c85252fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_transformation.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Transformation struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *TransformationProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_transformationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_transformationproperties.go new file mode 100644 index 000000000000..383af40f4687 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_transformationproperties.go @@ -0,0 +1,11 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TransformationProperties struct { + Etag *string `json:"etag,omitempty"` + Query *string `json:"query,omitempty"` + StreamingUnits *int64 `json:"streamingUnits,omitempty"` + ValidStreamingUnits *[]int64 `json:"validStreamingUnits,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/predicates.go new file mode 100644 index 000000000000..a260e6fa2e75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/predicates.go @@ -0,0 +1,40 @@ +package streamingjobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetStreamingJobSkuResultOperationPredicate struct { +} + +func (p GetStreamingJobSkuResultOperationPredicate) Matches(input GetStreamingJobSkuResult) bool { + + return true +} + +type StreamingJobOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p StreamingJobOperationPredicate) Matches(input StreamingJob) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go new file mode 100644 index 000000000000..113aae30cabd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go @@ -0,0 +1,12 @@ +package streamingjobs + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2021-10-01-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/streamingjobs/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4cfcced1cd3f..d6b9c017caad 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -998,6 +998,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/pr github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs +github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15 github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies diff --git a/website/docs/d/stream_analytics_job.html.markdown b/website/docs/d/stream_analytics_job.html.markdown index fb55664e0297..27ba5911baff 100644 --- a/website/docs/d/stream_analytics_job.html.markdown +++ b/website/docs/d/stream_analytics_job.html.markdown @@ -58,6 +58,8 @@ output "job_id" { * `start_time` - The time at which this Stream Analytics Job was scheduled to start. +* `sku_name` - The SKU Name to use for the Stream Analytics Job. + * `streaming_units` - The number of streaming units that this Stream Analytics Job uses. * `transformation_query` - The query that will be run in this Stream Analytics Job, [written in Stream Analytics Query Language (SAQL)](https://msdn.microsoft.com/library/azure/dn834998). diff --git a/website/docs/r/stream_analytics_job.html.markdown b/website/docs/r/stream_analytics_job.html.markdown index 7743ea59a84c..3ff2087c59cc 100644 --- a/website/docs/r/stream_analytics_job.html.markdown +++ b/website/docs/r/stream_analytics_job.html.markdown @@ -78,6 +78,8 @@ The following arguments are supported: * `streaming_units` - (Optional) Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. -> **NOTE:** `streaming_units` must be set when `type` is `Cloud`. +* +* `sku_name` - (Optional) The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. * `content_storage_policy` - (Optional) The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`.