diff --git a/internal/services/datafactory/client/client.go b/internal/services/datafactory/client/client.go index 025fea4f9e73..3591d36416ce 100644 --- a/internal/services/datafactory/client/client.go +++ b/internal/services/datafactory/client/client.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/credentials" + "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets" "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories" "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints" "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks" @@ -17,6 +18,7 @@ import ( type Client struct { Factories *factories.FactoriesClient Credentials *credentials.CredentialsClient + DatasetClientGoAzureSDK *datasets.DatasetsClient ManagedPrivateEndpoints *managedprivateendpoints.ManagedPrivateEndpointsClient ManagedVirtualNetworks *managedvirtualnetworks.ManagedVirtualNetworksClient @@ -42,6 +44,12 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } o.Configure(credentialsClient.Client, o.Authorizers.ResourceManager) + datasetClientGoAzureSDK, err := datasets.NewDatasetsClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building Datasets client: %+v", err) + } + o.Configure(datasetClientGoAzureSDK.Client, o.Authorizers.ResourceManager) + managedPrivateEndpointsClient, err := managedprivateendpoints.NewManagedPrivateEndpointsClientWithBaseURI(o.Environment.ResourceManager) if err != nil { return nil, fmt.Errorf("building ManagedPrivateEndpoints client: %+v", err) @@ -76,6 +84,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) { return &Client{ Factories: factoriesClient, Credentials: credentialsClient, + DatasetClientGoAzureSDK: datasetClientGoAzureSDK, ManagedPrivateEndpoints: managedPrivateEndpointsClient, ManagedVirtualNetworks: managedVirtualNetworksClient, diff --git a/internal/services/datafactory/data_factory_dataset_cosmosdb_mongodbapi_resource.go b/internal/services/datafactory/data_factory_dataset_cosmosdb_mongodbapi_resource.go new file mode 100644 index 000000000000..3b2c23d498f6 --- /dev/null +++ b/internal/services/datafactory/data_factory_dataset_cosmosdb_mongodbapi_resource.go @@ -0,0 +1,317 @@ +package datafactory + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/pointer" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets" + "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories" + "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/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/utils" +) + +var _ sdk.Resource = DataFactoryDatasetCosmosDbMongoDbApiResource{} + +type DataFactoryDatasetCosmosDbMongoDbApiResource struct{} + +type DataFactoryDatasetCosmosDbMongoDbApiResourceModel struct { + Annotations []string `tfschema:"annotations"` + CollectionName string `tfschema:"collection_name"` + DataFactoryId string `tfschema:"data_factory_id"` + Description string `tfschema:"description"` + Folder string `tfschema:"folder"` + LinkedServiceName string `tfschema:"linked_service_name"` + Name string `tfschema:"name"` + Parameters map[string]string `tfschema:"parameters"` +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) Arguments() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{ + "name": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.LinkedServiceDatasetName, + }, + "data_factory_id": { + Type: pluginsdk.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: factories.ValidateFactoryID, + }, + "linked_service_name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "annotations": { + Type: pluginsdk.TypeList, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + "collection_name": { + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "description": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "folder": { + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validation.StringIsNotEmpty, + }, + "parameters": { + Type: pluginsdk.TypeMap, + Optional: true, + Elem: &pluginsdk.Schema{ + Type: pluginsdk.TypeString, + }, + }, + } +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) Attributes() map[string]*pluginsdk.Schema { + return map[string]*pluginsdk.Schema{} +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) ModelObject() interface{} { + return &DataFactoryDatasetCosmosDbMongoDbApiResourceModel{} +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) ResourceType() string { + return "azurerm_data_factory_dataset_cosmosdb_mongoapi" +} + +func (r DataFactoryDatasetCosmosDbMongoDbApiResource) Create() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.DataFactory.DatasetClientGoAzureSDK + subscriptionId := metadata.Client.Account.SubscriptionId + + var config DataFactoryDatasetCosmosDbMongoDbApiResourceModel + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + dataFactoryId, err := factories.ParseFactoryID(config.DataFactoryId) + if err != nil { + return err + } + + id := datasets.NewDatasetID(subscriptionId, dataFactoryId.ResourceGroupName, dataFactoryId.FactoryName, config.Name) + + existing, err := client.Get(ctx, id, datasets.DefaultGetOperationOptions()) + if err != nil && !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing %s: %+v", id, err) + } + if !response.WasNotFound(existing.HttpResponse) { + return metadata.ResourceRequiresImport(r.ResourceType(), id) + } + + dataset := datasets.CosmosDbMongoDbApiCollectionDataset{ + TypeProperties: datasets.CosmosDbMongoDbApiCollectionDatasetTypeProperties{ + Collection: config.CollectionName, + }, + LinkedServiceName: datasets.LinkedServiceReference{ + ReferenceName: config.LinkedServiceName, + Type: datasets.TypeLinkedServiceReference, + }, + } + + if config.Annotations != nil { + dataset.Annotations = pointer.To(utils.FlattenStringSlice(&config.Annotations)) + } + + if config.Description != "" { + dataset.Description = &config.Description + } + + if config.Folder != "" { + dataset.Folder = &datasets.DatasetFolder{ + Name: &config.Folder, + } + } + + if config.Parameters != nil { + dataset.Parameters = expandDataSetParametersGoAzureSdk(&config.Parameters) + } + + datasetResource := datasets.DatasetResource{ + Properties: &dataset, + Type: pointer.To("CosmosDbMongoDbApiCollection"), + } + + if _, err := client.CreateOrUpdate(ctx, id, datasetResource, datasets.DefaultCreateOrUpdateOperationOptions()); err != nil { + return fmt.Errorf("creating/updating %s: %+v", id, err) + } + + metadata.SetID(id) + return nil + }, + } +} + +func (r DataFactoryDatasetCosmosDbMongoDbApiResource) Update() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.DataFactory.DatasetClientGoAzureSDK + + var config DataFactoryDatasetCosmosDbMongoDbApiResourceModel + if err := metadata.Decode(&config); err != nil { + return fmt.Errorf("decoding: %+v", err) + } + + id, err := datasets.ParseDatasetID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id, datasets.DefaultGetOperationOptions()) + if err != nil { + return fmt.Errorf("checking for presence of existing %s: %+v", id, err) + } + + dataset, ok := resp.Model.Properties.(datasets.CosmosDbMongoDbApiCollectionDataset) + if !ok { + return fmt.Errorf("dataset %s is not a CosmosDbMongoDbAPICollectionDataset", id) + } + + if metadata.ResourceData.HasChange("annotations") { + dataset.Annotations = pointer.To(utils.FlattenStringSlice(&config.Annotations)) + } + + if metadata.ResourceData.HasChange("collection_name") { + dataset.TypeProperties.Collection = config.CollectionName + } + + if metadata.ResourceData.HasChange("description") { + dataset.Description = pointer.To(config.Description) + } + + if metadata.ResourceData.HasChange("folder") { + dataset.Folder = &datasets.DatasetFolder{ + Name: &config.Folder, + } + } + + if metadata.ResourceData.HasChange("linked_service_name") { + dataset.LinkedServiceName = datasets.LinkedServiceReference{ + ReferenceName: config.LinkedServiceName, + Type: datasets.TypeLinkedServiceReference, + } + } + + if metadata.ResourceData.HasChange("parameters") { + dataset.Parameters = expandDataSetParametersGoAzureSdk(&config.Parameters) + } + + resp.Model.Properties = dataset + + if _, err := client.CreateOrUpdate(ctx, *id, *resp.Model, datasets.DefaultCreateOrUpdateOperationOptions()); err != nil { + return fmt.Errorf("updating %s: %+v", id, err) + } + + return nil + }, + } +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) Read() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 5 * time.Minute, + + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.DataFactory.DatasetClientGoAzureSDK + + id, err := datasets.ParseDatasetID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + resp, err := client.Get(ctx, *id, datasets.DefaultGetOperationOptions()) + if err != nil { + if response.WasNotFound(resp.HttpResponse) { + return metadata.MarkAsGone(id) + } + + return fmt.Errorf("retrieving %s: %+v", id, err) + } + + dataset, ok := resp.Model.Properties.(datasets.CosmosDbMongoDbApiCollectionDataset) + if !ok { + return fmt.Errorf("dataset %s is not a CosmosDbMongoDbAPICollectionDataset", id) + } + + state := DataFactoryDatasetCosmosDbMongoDbApiResourceModel{} + + if dataset.Annotations != nil { + state.Annotations = flattenDataFactoryAnnotations(dataset.Annotations) + } + + state.CollectionName = dataset.TypeProperties.Collection + + state.DataFactoryId = datasets.NewFactoryID(id.SubscriptionId, id.ResourceGroupName, id.FactoryName).ID() + + if dataset.Description != nil { + state.Description = *dataset.Description + } + + if dataset.Folder != nil { + if dataset.Folder.Name != nil { + state.Folder = *dataset.Folder.Name + } + } + + state.LinkedServiceName = dataset.LinkedServiceName.ReferenceName + + state.Name = id.DatasetName + + if dataset.Parameters != nil { + state.Parameters = flattenDataSetParametersGoAzureSdk(dataset.Parameters) + } + + return metadata.Encode(&state) + }, + } +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) Delete() sdk.ResourceFunc { + return sdk.ResourceFunc{ + Timeout: 30 * time.Minute, + + Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { + client := metadata.Client.DataFactory.DatasetClientGoAzureSDK + + id, err := datasets.ParseDatasetID(metadata.ResourceData.Id()) + if err != nil { + return err + } + + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) + } + + return nil + }, + } +} + +func (DataFactoryDatasetCosmosDbMongoDbApiResource) IDValidationFunc() pluginsdk.SchemaValidateFunc { + return validate.LinkedServiceDatasetName +} diff --git a/internal/services/datafactory/data_factory_dataset_cosmosdb_mongodbapi_resource_test.go b/internal/services/datafactory/data_factory_dataset_cosmosdb_mongodbapi_resource_test.go new file mode 100644 index 000000000000..db69b659ad35 --- /dev/null +++ b/internal/services/datafactory/data_factory_dataset_cosmosdb_mongodbapi_resource_test.go @@ -0,0 +1,175 @@ +package datafactory_test + +import ( + "context" + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "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" + "github.com/hashicorp/terraform-provider-azurerm/internal/services/datafactory/parse" + "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" + "github.com/hashicorp/terraform-provider-azurerm/utils" +) + +type DatasetCosmosDbMongoDbApiResource struct{} + +func TestAccDataFactoryDatasetCosmosDbMongoDbApi_basic(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_factory_dataset_cosmosdb_mongoapi", "test") + r := DatasetCosmosDbMongoDbApiResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), + }) +} + +func TestAccDataFactoryDatasetCosmosDbMongoDbApi_requiresImport(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_factory_dataset_cosmosdb_mongoapi", "test") + r := DatasetCosmosDbMongoDbApiResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.RequiresImportErrorStep(r.requiresImport), + }) +} + +func TestAccDataFactoryDatasetCosmosDbMongoDbApi_complete(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_factory_dataset_cosmosdb_mongoapi", "test") + r := DatasetCosmosDbMongoDbApiResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.complete(data), + }, + data.ImportStep(), + }) +} + +func TestAccDataFactoryDatasetCosmosDbMongoDbApi_update(t *testing.T) { + data := acceptance.BuildTestData(t, "azurerm_data_factory_dataset_cosmosdb_mongoapi", "test") + r := DatasetCosmosDbMongoDbApiResource{} + + data.ResourceTest(t, r, []acceptance.TestStep{ + { + Config: r.basic(data), + }, + data.ImportStep(), + { + Config: r.complete(data), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("azurerm_data_factory_dataset_cosmosdb_mongoapi.test", plancheck.ResourceActionUpdate), + }, + }, + }, + data.ImportStep(), + { + Config: r.basic(data), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("azurerm_data_factory_dataset_cosmosdb_mongoapi.test", plancheck.ResourceActionUpdate), + }, + }, + }, + data.ImportStep(), + }) +} + +func (t DatasetCosmosDbMongoDbApiResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { + id, err := parse.DataSetID(state.ID) + if err != nil { + return nil, err + } + + resp, err := clients.DataFactory.DatasetClient.Get(ctx, id.ResourceGroup, id.FactoryName, id.Name, "") + if err != nil { + return nil, fmt.Errorf("reading %s: %+v", *id, err) + } + + return utils.Bool(resp.ID != nil), nil +} + +func commonConfig(data acceptance.TestData) string { + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-df-%d" + location = "%s" +} + +resource "azurerm_data_factory" "test" { + name = "acctestdf%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_data_factory_linked_service_cosmosdb_mongoapi" "test" { + connection_string = "mongodb://acc:pass@foobar.documents.azure.com:10255" + name = "ls-cosmosdb-mongoapi-%d" + data_factory_id = azurerm_data_factory.test.id + database = "mydbname" +} + `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) +} + +func (DatasetCosmosDbMongoDbApiResource) basic(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_data_factory_dataset_cosmosdb_mongoapi" "test" { + collection_name = "collection-1" + data_factory_id = azurerm_data_factory.test.id + linked_service_name = azurerm_data_factory_linked_service_cosmosdb_mongoapi.test.name + name = "name-1" +} + `, commonConfig(data)) +} + +func (r DatasetCosmosDbMongoDbApiResource) requiresImport(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_data_factory_dataset_cosmosdb_mongoapi" "import" { + collection_name = "collection-1" + data_factory_id = azurerm_data_factory.test.id + linked_service_name = azurerm_data_factory_linked_service_cosmosdb_mongoapi.test.name + name = "name-1" +} + `, r.basic(data)) +} + +func (DatasetCosmosDbMongoDbApiResource) complete(data acceptance.TestData) string { + return fmt.Sprintf(` +%s + +resource "azurerm_data_factory_dataset_cosmosdb_mongoapi" "test" { + annotations = ["annotation1"] + collection_name = "collection-1" + data_factory_id = azurerm_data_factory.test.id + description = "some-description" + folder = "folder-1" + linked_service_name = azurerm_data_factory_linked_service_cosmosdb_mongoapi.test.name + name = "name-1" + parameters = { + "param1" = "value1" + } +} + `, commonConfig(data)) +} diff --git a/internal/services/datafactory/data_set_common.go b/internal/services/datafactory/data_set_common.go index f2e3e169c096..8df7c2422563 100644 --- a/internal/services/datafactory/data_set_common.go +++ b/internal/services/datafactory/data_set_common.go @@ -6,6 +6,7 @@ package datafactory import ( "log" + "github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets" "github.com/jackofallops/kermit/sdk/datafactory/2018-06-01/datafactory" // nolint: staticcheck ) @@ -22,9 +23,27 @@ func expandDataSetParameters(input map[string]interface{}) map[string]*datafacto return output } +func expandDataSetParametersGoAzureSdk(input *map[string]string) *map[string]datasets.ParameterSpecification { + output := make(map[string]datasets.ParameterSpecification) + + for k, v := range *input { + var value interface{} = v + output[k] = datasets.ParameterSpecification{ + Type: datasets.ParameterTypeString, + DefaultValue: &value, + } + } + + return &output +} + func flattenDataSetParameters(input map[string]*datafactory.ParameterSpecification) map[string]interface{} { output := make(map[string]interface{}) + if input == nil { + return output + } + for k, v := range input { if v != nil { // we only support string parameters at this time @@ -39,3 +58,25 @@ func flattenDataSetParameters(input map[string]*datafactory.ParameterSpecificati return output } + +func flattenDataSetParametersGoAzureSdk(input *map[string]datasets.ParameterSpecification) map[string]string { + output := make(map[string]string) + + if input == nil { + return output + } + + for k, v := range *input { + if v.DefaultValue != nil { + val, ok := (*v.DefaultValue).(string) + if !ok { + log.Printf("[DEBUG] Skipping parameter %q since its default value is not a string", k) + continue + } + + output[k] = val + } + } + + return output +} diff --git a/internal/services/datafactory/registration.go b/internal/services/datafactory/registration.go index 97daf96f91a3..1b3ffe55785e 100644 --- a/internal/services/datafactory/registration.go +++ b/internal/services/datafactory/registration.go @@ -41,6 +41,7 @@ func (Registration) DataSources() []sdk.DataSource { func (Registration) Resources() []sdk.Resource { return []sdk.Resource{ DataFactoryDatasetAzureSQLTableResource{}, + DataFactoryDatasetCosmosDbMongoDbApiResource{}, DataFactoryCredentialServicePrincipalResource{}, DataFactoryCredentialUserAssignedManagedIdentityResource{}, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/README.md new file mode 100644 index 000000000000..dd900eeca985 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/README.md @@ -0,0 +1,90 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets` Documentation + +The `datasets` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). + +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/datafactory/2018-06-01/datasets" +``` + + +### Client Initialization + +```go +client := datasets.NewDatasetsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DatasetsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := datasets.NewDatasetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "factoryName", "datasetName") + +payload := datasets.DatasetResource{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload, datasets.DefaultCreateOrUpdateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatasetsClient.Delete` + +```go +ctx := context.TODO() +id := datasets.NewDatasetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "factoryName", "datasetName") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatasetsClient.Get` + +```go +ctx := context.TODO() +id := datasets.NewDatasetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "factoryName", "datasetName") + +read, err := client.Get(ctx, id, datasets.DefaultGetOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatasetsClient.ListByFactory` + +```go +ctx := context.TODO() +id := datasets.NewFactoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "factoryName") + +// alternatively `client.ListByFactory(ctx, id)` can be used to do batched pagination +items, err := client.ListByFactoryComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/client.go new file mode 100644 index 000000000000..addd7dcdf5c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/client.go @@ -0,0 +1,26 @@ +package datasets + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetsClient struct { + Client *resourcemanager.Client +} + +func NewDatasetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatasetsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "datasets", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating DatasetsClient: %+v", err) + } + + return &DatasetsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/constants.go new file mode 100644 index 000000000000..dd1b249570e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/constants.go @@ -0,0 +1,104 @@ +package datasets + +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 ParameterType string + +const ( + ParameterTypeArray ParameterType = "Array" + ParameterTypeBool ParameterType = "Bool" + ParameterTypeFloat ParameterType = "Float" + ParameterTypeInt ParameterType = "Int" + ParameterTypeObject ParameterType = "Object" + ParameterTypeSecureString ParameterType = "SecureString" + ParameterTypeString ParameterType = "String" +) + +func PossibleValuesForParameterType() []string { + return []string{ + string(ParameterTypeArray), + string(ParameterTypeBool), + string(ParameterTypeFloat), + string(ParameterTypeInt), + string(ParameterTypeObject), + string(ParameterTypeSecureString), + string(ParameterTypeString), + } +} + +func (s *ParameterType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseParameterType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseParameterType(input string) (*ParameterType, error) { + vals := map[string]ParameterType{ + "array": ParameterTypeArray, + "bool": ParameterTypeBool, + "float": ParameterTypeFloat, + "int": ParameterTypeInt, + "object": ParameterTypeObject, + "securestring": ParameterTypeSecureString, + "string": ParameterTypeString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ParameterType(input) + return &out, nil +} + +type Type string + +const ( + TypeLinkedServiceReference Type = "LinkedServiceReference" +) + +func PossibleValuesForType() []string { + return []string{ + string(TypeLinkedServiceReference), + } +} + +func (s *Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseType(input string) (*Type, error) { + vals := map[string]Type{ + "linkedservicereference": TypeLinkedServiceReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Type(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go new file mode 100644 index 000000000000..e4c1f95c15a4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go @@ -0,0 +1,139 @@ +package datasets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&DatasetId{}) +} + +var _ resourceids.ResourceId = &DatasetId{} + +// DatasetId is a struct representing the Resource ID for a Dataset +type DatasetId struct { + SubscriptionId string + ResourceGroupName string + FactoryName string + DatasetName string +} + +// NewDatasetID returns a new DatasetId struct +func NewDatasetID(subscriptionId string, resourceGroupName string, factoryName string, datasetName string) DatasetId { + return DatasetId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FactoryName: factoryName, + DatasetName: datasetName, + } +} + +// ParseDatasetID parses 'input' into a DatasetId +func ParseDatasetID(input string) (*DatasetId, error) { + parser := resourceids.NewParserFromResourceIdType(&DatasetId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatasetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDatasetIDInsensitively parses 'input' case-insensitively into a DatasetId +// note: this method should only be used for API response data and not user input +func ParseDatasetIDInsensitively(input string) (*DatasetId, error) { + parser := resourceids.NewParserFromResourceIdType(&DatasetId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatasetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DatasetId) 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.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) + } + + if id.DatasetName, ok = input.Parsed["datasetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "datasetName", input) + } + + return nil +} + +// ValidateDatasetID checks that 'input' can be parsed as a Dataset ID +func ValidateDatasetID(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 := ParseDatasetID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Dataset ID +func (id DatasetId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DataFactory/factories/%s/datasets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FactoryName, id.DatasetName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Dataset ID +func (id DatasetId) 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("staticMicrosoftDataFactory", "Microsoft.DataFactory", "Microsoft.DataFactory"), + resourceids.StaticSegment("staticFactories", "factories", "factories"), + resourceids.UserSpecifiedSegment("factoryName", "factoryName"), + resourceids.StaticSegment("staticDatasets", "datasets", "datasets"), + resourceids.UserSpecifiedSegment("datasetName", "datasetName"), + } +} + +// String returns a human-readable description of this Dataset ID +func (id DatasetId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Factory Name: %q", id.FactoryName), + fmt.Sprintf("Dataset Name: %q", id.DatasetName), + } + return fmt.Sprintf("Dataset (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/id_factory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/id_factory.go new file mode 100644 index 000000000000..6af4c7310270 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/id_factory.go @@ -0,0 +1,130 @@ +package datasets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "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. + +func init() { + recaser.RegisterResourceId(&FactoryId{}) +} + +var _ resourceids.ResourceId = &FactoryId{} + +// FactoryId is a struct representing the Resource ID for a Factory +type FactoryId struct { + SubscriptionId string + ResourceGroupName string + FactoryName string +} + +// NewFactoryID returns a new FactoryId struct +func NewFactoryID(subscriptionId string, resourceGroupName string, factoryName string) FactoryId { + return FactoryId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FactoryName: factoryName, + } +} + +// ParseFactoryID parses 'input' into a FactoryId +func ParseFactoryID(input string) (*FactoryId, error) { + parser := resourceids.NewParserFromResourceIdType(&FactoryId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FactoryId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFactoryIDInsensitively parses 'input' case-insensitively into a FactoryId +// note: this method should only be used for API response data and not user input +func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { + parser := resourceids.NewParserFromResourceIdType(&FactoryId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FactoryId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FactoryId) 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.FactoryName, ok = input.Parsed["factoryName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "factoryName", input) + } + + return nil +} + +// ValidateFactoryID checks that 'input' can be parsed as a Factory ID +func ValidateFactoryID(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 := ParseFactoryID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Factory ID +func (id FactoryId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DataFactory/factories/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FactoryName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Factory ID +func (id FactoryId) 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("staticMicrosoftDataFactory", "Microsoft.DataFactory", "Microsoft.DataFactory"), + resourceids.StaticSegment("staticFactories", "factories", "factories"), + resourceids.UserSpecifiedSegment("factoryName", "factoryName"), + } +} + +// String returns a human-readable description of this Factory ID +func (id FactoryId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Factory Name: %q", id.FactoryName), + } + return fmt.Sprintf("Factory (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go new file mode 100644 index 000000000000..1d4172e58264 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go @@ -0,0 +1,87 @@ +package datasets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *DatasetResource +} + +type CreateOrUpdateOperationOptions struct { + IfMatch *string +} + +func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { + return CreateOrUpdateOperationOptions{} +} + +func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.IfMatch != nil { + out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) + } + return &out +} + +func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// CreateOrUpdate ... +func (c DatasetsClient) CreateOrUpdate(ctx context.Context, id DatasetId, input DatasetResource, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPut, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model DatasetResource + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_delete.go new file mode 100644 index 000000000000..87bdd1b11d7e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_delete.go @@ -0,0 +1,47 @@ +package datasets + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// 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 { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c DatasetsClient) Delete(ctx context.Context, id DatasetId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_get.go new file mode 100644 index 000000000000..93a5abfa1ea4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_get.go @@ -0,0 +1,83 @@ +package datasets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// 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 + OData *odata.OData + Model *DatasetResource +} + +type GetOperationOptions struct { + IfNoneMatch *string +} + +func DefaultGetOperationOptions() GetOperationOptions { + return GetOperationOptions{} +} + +func (o GetOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + if o.IfNoneMatch != nil { + out.Append("If-None-Match", fmt.Sprintf("%v", *o.IfNoneMatch)) + } + return &out +} + +func (o GetOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o GetOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + + return &out +} + +// Get ... +func (c DatasetsClient) Get(ctx context.Context, id DatasetId, options GetOperationOptions) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model DatasetResource + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_listbyfactory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_listbyfactory.go new file mode 100644 index 000000000000..4ba54fcf6222 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/method_listbyfactory.go @@ -0,0 +1,105 @@ +package datasets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByFactoryOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]DatasetResource +} + +type ListByFactoryCompleteResult struct { + LatestHttpResponse *http.Response + Items []DatasetResource +} + +type ListByFactoryCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByFactoryCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByFactory ... +func (c DatasetsClient) ListByFactory(ctx context.Context, id FactoryId) (result ListByFactoryOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByFactoryCustomPager{}, + Path: fmt.Sprintf("%s/datasets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]DatasetResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByFactoryComplete retrieves all the results into a single object +func (c DatasetsClient) ListByFactoryComplete(ctx context.Context, id FactoryId) (ListByFactoryCompleteResult, error) { + return c.ListByFactoryCompleteMatchingPredicate(ctx, id, DatasetResourceOperationPredicate{}) +} + +// ListByFactoryCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c DatasetsClient) ListByFactoryCompleteMatchingPredicate(ctx context.Context, id FactoryId, predicate DatasetResourceOperationPredicate) (result ListByFactoryCompleteResult, err error) { + items := make([]DatasetResource, 0) + + resp, err := c.ListByFactory(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByFactoryCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go new file mode 100644 index 000000000000..447b36e3c649 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AmazonMWSObjectDataset{} + +type AmazonMWSObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonMWSObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonMWSObjectDataset{} + +func (s AmazonMWSObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonMWSObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonMWSObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonMWSObjectDataset: %+v", err) + } + + decoded["type"] = "AmazonMWSObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonMWSObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go new file mode 100644 index 000000000000..fc442ea0ee78 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AmazonRdsForOracleTableDataset{} + +type AmazonRdsForOracleTableDataset struct { + TypeProperties *AmazonRdsForOracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRdsForOracleTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonRdsForOracleTableDataset{} + +func (s AmazonRdsForOracleTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonRdsForOracleTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRdsForOracleTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRdsForOracleTableDataset: %+v", err) + } + + decoded["type"] = "AmazonRdsForOracleTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRdsForOracleTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledatasettypeproperties.go new file mode 100644 index 000000000000..a1316b3839b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForOracleTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go new file mode 100644 index 000000000000..de052fcf296f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AmazonRdsForSqlServerTableDataset{} + +type AmazonRdsForSqlServerTableDataset struct { + TypeProperties *AmazonRdsForSqlServerTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRdsForSqlServerTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonRdsForSqlServerTableDataset{} + +func (s AmazonRdsForSqlServerTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonRdsForSqlServerTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRdsForSqlServerTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRdsForSqlServerTableDataset: %+v", err) + } + + decoded["type"] = "AmazonRdsForSqlServerTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRdsForSqlServerTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledatasettypeproperties.go new file mode 100644 index 000000000000..6d44280a2a07 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForSqlServerTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go new file mode 100644 index 000000000000..b3751a1772b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AmazonRedshiftTableDataset{} + +type AmazonRedshiftTableDataset struct { + TypeProperties *AmazonRedshiftTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRedshiftTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonRedshiftTableDataset{} + +func (s AmazonRedshiftTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonRedshiftTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRedshiftTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRedshiftTableDataset: %+v", err) + } + + decoded["type"] = "AmazonRedshiftTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRedshiftTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledatasettypeproperties.go new file mode 100644 index 000000000000..920f5911967f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRedshiftTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go new file mode 100644 index 000000000000..8b2008fd7e79 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go @@ -0,0 +1,55 @@ +package datasets + +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 _ DatasetLocation = AmazonS3CompatibleLocation{} + +type AmazonS3CompatibleLocation struct { + BucketName *string `json:"bucketName,omitempty"` + Version *string `json:"version,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3CompatibleLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonS3CompatibleLocation{} + +func (s AmazonS3CompatibleLocation) MarshalJSON() ([]byte, error) { + type wrapper AmazonS3CompatibleLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonS3CompatibleLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonS3CompatibleLocation: %+v", err) + } + + decoded["type"] = "AmazonS3CompatibleLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonS3CompatibleLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go new file mode 100644 index 000000000000..582833053883 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AmazonS3Dataset{} + +type AmazonS3Dataset struct { + TypeProperties AmazonS3DatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3Dataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonS3Dataset{} + +func (s AmazonS3Dataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonS3Dataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonS3Dataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonS3Dataset: %+v", err) + } + + decoded["type"] = "AmazonS3Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonS3Dataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go new file mode 100644 index 000000000000..a26f186f6d06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go @@ -0,0 +1,60 @@ +package datasets + +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 AmazonS3DatasetTypeProperties struct { + BucketName string `json:"bucketName"` + Compression *DatasetCompression `json:"compression,omitempty"` + Format DatasetStorageFormat `json:"format"` + Key *string `json:"key,omitempty"` + ModifiedDatetimeEnd *string `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *string `json:"modifiedDatetimeStart,omitempty"` + Prefix *string `json:"prefix,omitempty"` + Version *string `json:"version,omitempty"` +} + +var _ json.Unmarshaler = &AmazonS3DatasetTypeProperties{} + +func (s *AmazonS3DatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + BucketName string `json:"bucketName"` + Compression *DatasetCompression `json:"compression,omitempty"` + Key *string `json:"key,omitempty"` + ModifiedDatetimeEnd *string `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *string `json:"modifiedDatetimeStart,omitempty"` + Prefix *string `json:"prefix,omitempty"` + Version *string `json:"version,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.BucketName = decoded.BucketName + s.Compression = decoded.Compression + s.Key = decoded.Key + s.ModifiedDatetimeEnd = decoded.ModifiedDatetimeEnd + s.ModifiedDatetimeStart = decoded.ModifiedDatetimeStart + s.Prefix = decoded.Prefix + s.Version = decoded.Version + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonS3DatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := UnmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AmazonS3DatasetTypeProperties': %+v", err) + } + s.Format = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go new file mode 100644 index 000000000000..22bec2a5723a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go @@ -0,0 +1,55 @@ +package datasets + +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 _ DatasetLocation = AmazonS3Location{} + +type AmazonS3Location struct { + BucketName *string `json:"bucketName,omitempty"` + Version *string `json:"version,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3Location) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = AmazonS3Location{} + +func (s AmazonS3Location) MarshalJSON() ([]byte, error) { + type wrapper AmazonS3Location + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonS3Location: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonS3Location: %+v", err) + } + + decoded["type"] = "AmazonS3Location" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonS3Location: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go new file mode 100644 index 000000000000..2c736a416da3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AvroDataset{} + +type AvroDataset struct { + TypeProperties *AvroDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AvroDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AvroDataset{} + +func (s AvroDataset) MarshalJSON() ([]byte, error) { + type wrapper AvroDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AvroDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AvroDataset: %+v", err) + } + + decoded["type"] = "Avro" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AvroDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go new file mode 100644 index 000000000000..5a9f224f51c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go @@ -0,0 +1,45 @@ +package datasets + +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 AvroDatasetTypeProperties struct { + AvroCompressionCodec *string `json:"avroCompressionCodec,omitempty"` + AvroCompressionLevel *int64 `json:"avroCompressionLevel,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &AvroDatasetTypeProperties{} + +func (s *AvroDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + AvroCompressionCodec *string `json:"avroCompressionCodec,omitempty"` + AvroCompressionLevel *int64 `json:"avroCompressionLevel,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.AvroCompressionCodec = decoded.AvroCompressionCodec + s.AvroCompressionLevel = decoded.AvroCompressionLevel + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AvroDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'AvroDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go new file mode 100644 index 000000000000..22764c496c32 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetStorageFormat = AvroFormat{} + +type AvroFormat struct { + + // Fields inherited from DatasetStorageFormat + + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s AvroFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } +} + +var _ json.Marshaler = AvroFormat{} + +func (s AvroFormat) MarshalJSON() ([]byte, error) { + type wrapper AvroFormat + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AvroFormat: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AvroFormat: %+v", err) + } + + decoded["type"] = "AvroFormat" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AvroFormat: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go new file mode 100644 index 000000000000..a8043d54fc33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureBlobDataset{} + +type AzureBlobDataset struct { + TypeProperties *AzureBlobDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureBlobDataset{} + +func (s AzureBlobDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobDataset: %+v", err) + } + + decoded["type"] = "AzureBlob" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go new file mode 100644 index 000000000000..ca091778c39d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go @@ -0,0 +1,57 @@ +package datasets + +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 AzureBlobDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` + ModifiedDatetimeEnd *string `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *string `json:"modifiedDatetimeStart,omitempty"` + TableRootLocation *string `json:"tableRootLocation,omitempty"` +} + +var _ json.Unmarshaler = &AzureBlobDatasetTypeProperties{} + +func (s *AzureBlobDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + ModifiedDatetimeEnd *string `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *string `json:"modifiedDatetimeStart,omitempty"` + TableRootLocation *string `json:"tableRootLocation,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + s.ModifiedDatetimeEnd = decoded.ModifiedDatetimeEnd + s.ModifiedDatetimeStart = decoded.ModifiedDatetimeStart + s.TableRootLocation = decoded.TableRootLocation + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBlobDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := UnmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AzureBlobDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go new file mode 100644 index 000000000000..b2b91bab06fb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureBlobFSDataset{} + +type AzureBlobFSDataset struct { + TypeProperties *AzureBlobFSDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureBlobFSDataset{} + +func (s AzureBlobFSDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobFSDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobFSDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobFSDataset: %+v", err) + } + + decoded["type"] = "AzureBlobFSFile" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobFSDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go new file mode 100644 index 000000000000..82febcbe1c73 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go @@ -0,0 +1,48 @@ +package datasets + +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 AzureBlobFSDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` +} + +var _ json.Unmarshaler = &AzureBlobFSDatasetTypeProperties{} + +func (s *AzureBlobFSDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBlobFSDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := UnmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AzureBlobFSDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go new file mode 100644 index 000000000000..209b4eb35321 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go @@ -0,0 +1,54 @@ +package datasets + +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 _ DatasetLocation = AzureBlobFSLocation{} + +type AzureBlobFSLocation struct { + FileSystem *string `json:"fileSystem,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureBlobFSLocation{} + +func (s AzureBlobFSLocation) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobFSLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobFSLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobFSLocation: %+v", err) + } + + decoded["type"] = "AzureBlobFSLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobFSLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go new file mode 100644 index 000000000000..11104f698719 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go @@ -0,0 +1,54 @@ +package datasets + +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 _ DatasetLocation = AzureBlobStorageLocation{} + +type AzureBlobStorageLocation struct { + Container *string `json:"container,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureBlobStorageLocation{} + +func (s AzureBlobStorageLocation) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobStorageLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobStorageLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobStorageLocation: %+v", err) + } + + decoded["type"] = "AzureBlobStorageLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobStorageLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go new file mode 100644 index 000000000000..966729d7d438 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureDatabricksDeltaLakeDataset{} + +type AzureDatabricksDeltaLakeDataset struct { + TypeProperties *AzureDatabricksDeltaLakeDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureDatabricksDeltaLakeDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureDatabricksDeltaLakeDataset{} + +func (s AzureDatabricksDeltaLakeDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureDatabricksDeltaLakeDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDatabricksDeltaLakeDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeDataset: %+v", err) + } + + decoded["type"] = "AzureDatabricksDeltaLakeDataset" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDatabricksDeltaLakeDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedatasettypeproperties.go new file mode 100644 index 000000000000..8bb393789225 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDeltaLakeDatasetTypeProperties struct { + Database *string `json:"database,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorerdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorerdatasettypeproperties.go new file mode 100644 index 000000000000..c0dc11b891c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorerdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerDatasetTypeProperties struct { + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go new file mode 100644 index 000000000000..42eb237c0bac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureDataExplorerTableDataset{} + +type AzureDataExplorerTableDataset struct { + TypeProperties AzureDataExplorerDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataExplorerTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureDataExplorerTableDataset{} + +func (s AzureDataExplorerTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureDataExplorerTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataExplorerTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataExplorerTableDataset: %+v", err) + } + + decoded["type"] = "AzureDataExplorerTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataExplorerTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go new file mode 100644 index 000000000000..9ff26004ac5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureDataLakeStoreDataset{} + +type AzureDataLakeStoreDataset struct { + TypeProperties *AzureDataLakeStoreDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureDataLakeStoreDataset{} + +func (s AzureDataLakeStoreDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureDataLakeStoreDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataLakeStoreDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreDataset: %+v", err) + } + + decoded["type"] = "AzureDataLakeStoreFile" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataLakeStoreDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go new file mode 100644 index 000000000000..b24fe724a887 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go @@ -0,0 +1,48 @@ +package datasets + +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 AzureDataLakeStoreDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` +} + +var _ json.Unmarshaler = &AzureDataLakeStoreDatasetTypeProperties{} + +func (s *AzureDataLakeStoreDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDataLakeStoreDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := UnmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AzureDataLakeStoreDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go new file mode 100644 index 000000000000..d2257490e9b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = AzureDataLakeStoreLocation{} + +type AzureDataLakeStoreLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureDataLakeStoreLocation{} + +func (s AzureDataLakeStoreLocation) MarshalJSON() ([]byte, error) { + type wrapper AzureDataLakeStoreLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataLakeStoreLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreLocation: %+v", err) + } + + decoded["type"] = "AzureDataLakeStoreLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataLakeStoreLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go new file mode 100644 index 000000000000..92ac6431bd34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = AzureFileStorageLocation{} + +type AzureFileStorageLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureFileStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureFileStorageLocation{} + +func (s AzureFileStorageLocation) MarshalJSON() ([]byte, error) { + type wrapper AzureFileStorageLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFileStorageLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFileStorageLocation: %+v", err) + } + + decoded["type"] = "AzureFileStorageLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFileStorageLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go new file mode 100644 index 000000000000..5c324de6b763 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureMariaDBTableDataset{} + +type AzureMariaDBTableDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureMariaDBTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureMariaDBTableDataset{} + +func (s AzureMariaDBTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureMariaDBTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMariaDBTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMariaDBTableDataset: %+v", err) + } + + decoded["type"] = "AzureMariaDBTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMariaDBTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go new file mode 100644 index 000000000000..e4a3e412b41b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureMySqlTableDataset{} + +type AzureMySqlTableDataset struct { + TypeProperties AzureMySqlTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureMySqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureMySqlTableDataset{} + +func (s AzureMySqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureMySqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMySqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMySqlTableDataset: %+v", err) + } + + decoded["type"] = "AzureMySqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMySqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledatasettypeproperties.go new file mode 100644 index 000000000000..5a27c3100378 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMySqlTableDatasetTypeProperties struct { + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go new file mode 100644 index 000000000000..aa60d0dec361 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzurePostgreSqlTableDataset{} + +type AzurePostgreSqlTableDataset struct { + TypeProperties *AzurePostgreSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzurePostgreSqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzurePostgreSqlTableDataset{} + +func (s AzurePostgreSqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzurePostgreSqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzurePostgreSqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzurePostgreSqlTableDataset: %+v", err) + } + + decoded["type"] = "AzurePostgreSqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzurePostgreSqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledatasettypeproperties.go new file mode 100644 index 000000000000..26c70ed3898f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzurePostgreSqlTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go new file mode 100644 index 000000000000..e91977acc31e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureSearchIndexDataset{} + +type AzureSearchIndexDataset struct { + TypeProperties AzureSearchIndexDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSearchIndexDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureSearchIndexDataset{} + +func (s AzureSearchIndexDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSearchIndexDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSearchIndexDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSearchIndexDataset: %+v", err) + } + + decoded["type"] = "AzureSearchIndex" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSearchIndexDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdatasettypeproperties.go new file mode 100644 index 000000000000..f35af5ae981a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSearchIndexDatasetTypeProperties struct { + IndexName string `json:"indexName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go new file mode 100644 index 000000000000..dfadf803bb34 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureSqlDWTableDataset{} + +type AzureSqlDWTableDataset struct { + TypeProperties *AzureSqlDWTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlDWTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureSqlDWTableDataset{} + +func (s AzureSqlDWTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlDWTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlDWTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlDWTableDataset: %+v", err) + } + + decoded["type"] = "AzureSqlDWTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlDWTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledatasettypeproperties.go new file mode 100644 index 000000000000..80c79c925fe3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlDWTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go new file mode 100644 index 000000000000..3f155ceeb90a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureSqlMITableDataset{} + +type AzureSqlMITableDataset struct { + TypeProperties *AzureSqlMITableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlMITableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureSqlMITableDataset{} + +func (s AzureSqlMITableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlMITableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlMITableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlMITableDataset: %+v", err) + } + + decoded["type"] = "AzureSqlMITable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlMITableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledatasettypeproperties.go new file mode 100644 index 000000000000..8c4d4e6f0528 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlMITableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go new file mode 100644 index 000000000000..87f767d3d329 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureSqlTableDataset{} + +type AzureSqlTableDataset struct { + TypeProperties *AzureSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureSqlTableDataset{} + +func (s AzureSqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlTableDataset: %+v", err) + } + + decoded["type"] = "AzureSqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledatasettypeproperties.go new file mode 100644 index 000000000000..3f7f47584510 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go new file mode 100644 index 000000000000..29ce208d1322 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = AzureTableDataset{} + +type AzureTableDataset struct { + TypeProperties AzureTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = AzureTableDataset{} + +func (s AzureTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureTableDataset: %+v", err) + } + + decoded["type"] = "AzureTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledatasettypeproperties.go new file mode 100644 index 000000000000..79aafd48f4bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureTableDatasetTypeProperties struct { + TableName string `json:"tableName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go new file mode 100644 index 000000000000..3106bfc22959 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = BinaryDataset{} + +type BinaryDataset struct { + TypeProperties *BinaryDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s BinaryDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = BinaryDataset{} + +func (s BinaryDataset) MarshalJSON() ([]byte, error) { + type wrapper BinaryDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling BinaryDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling BinaryDataset: %+v", err) + } + + decoded["type"] = "Binary" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling BinaryDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go new file mode 100644 index 000000000000..0795483d4896 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go @@ -0,0 +1,42 @@ +package datasets + +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 BinaryDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &BinaryDatasetTypeProperties{} + +func (s *BinaryDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BinaryDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'BinaryDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go new file mode 100644 index 000000000000..706b866c5a8a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = CassandraTableDataset{} + +type CassandraTableDataset struct { + TypeProperties *CassandraTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CassandraTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = CassandraTableDataset{} + +func (s CassandraTableDataset) MarshalJSON() ([]byte, error) { + type wrapper CassandraTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CassandraTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CassandraTableDataset: %+v", err) + } + + decoded["type"] = "CassandraTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CassandraTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledatasettypeproperties.go new file mode 100644 index 000000000000..ed98d0d69478 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CassandraTableDatasetTypeProperties struct { + Keyspace *string `json:"keyspace,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go new file mode 100644 index 000000000000..d1b1f81ef198 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = CommonDataServiceForAppsEntityDataset{} + +type CommonDataServiceForAppsEntityDataset struct { + TypeProperties *CommonDataServiceForAppsEntityDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CommonDataServiceForAppsEntityDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = CommonDataServiceForAppsEntityDataset{} + +func (s CommonDataServiceForAppsEntityDataset) MarshalJSON() ([]byte, error) { + type wrapper CommonDataServiceForAppsEntityDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CommonDataServiceForAppsEntityDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsEntityDataset: %+v", err) + } + + decoded["type"] = "CommonDataServiceForAppsEntity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CommonDataServiceForAppsEntityDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydatasettypeproperties.go new file mode 100644 index 000000000000..8cf4aaaa803c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CommonDataServiceForAppsEntityDatasetTypeProperties struct { + EntityName *string `json:"entityName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go new file mode 100644 index 000000000000..884ce7f69208 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ConcurObjectDataset{} + +type ConcurObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ConcurObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ConcurObjectDataset{} + +func (s ConcurObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ConcurObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ConcurObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ConcurObjectDataset: %+v", err) + } + + decoded["type"] = "ConcurObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ConcurObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go new file mode 100644 index 000000000000..ce8a7aa555e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = CosmosDbMongoDbApiCollectionDataset{} + +type CosmosDbMongoDbApiCollectionDataset struct { + TypeProperties CosmosDbMongoDbApiCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CosmosDbMongoDbApiCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = CosmosDbMongoDbApiCollectionDataset{} + +func (s CosmosDbMongoDbApiCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper CosmosDbMongoDbApiCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + + decoded["type"] = "CosmosDbMongoDbApiCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondatasettypeproperties.go new file mode 100644 index 000000000000..a4c43f4591dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbMongoDbApiCollectionDatasetTypeProperties struct { + Collection string `json:"collection"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go new file mode 100644 index 000000000000..5958b36e22a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = CosmosDbSqlApiCollectionDataset{} + +type CosmosDbSqlApiCollectionDataset struct { + TypeProperties CosmosDbSqlApiCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CosmosDbSqlApiCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = CosmosDbSqlApiCollectionDataset{} + +func (s CosmosDbSqlApiCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper CosmosDbSqlApiCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CosmosDbSqlApiCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CosmosDbSqlApiCollectionDataset: %+v", err) + } + + decoded["type"] = "CosmosDbSqlApiCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CosmosDbSqlApiCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondatasettypeproperties.go new file mode 100644 index 000000000000..1b47accc63a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbSqlApiCollectionDatasetTypeProperties struct { + CollectionName string `json:"collectionName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go new file mode 100644 index 000000000000..147acc0aef7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = CouchbaseTableDataset{} + +type CouchbaseTableDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CouchbaseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = CouchbaseTableDataset{} + +func (s CouchbaseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper CouchbaseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CouchbaseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CouchbaseTableDataset: %+v", err) + } + + decoded["type"] = "CouchbaseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CouchbaseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go new file mode 100644 index 000000000000..d81ba6be2888 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = CustomDataset{} + +type CustomDataset struct { + TypeProperties *interface{} `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CustomDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = CustomDataset{} + +func (s CustomDataset) MarshalJSON() ([]byte, error) { + type wrapper CustomDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CustomDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CustomDataset: %+v", err) + } + + decoded["type"] = "CustomDataset" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CustomDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go new file mode 100644 index 000000000000..067c806db2a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go @@ -0,0 +1,914 @@ +package datasets + +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 Dataset interface { + Dataset() BaseDatasetImpl +} + +var _ Dataset = BaseDatasetImpl{} + +type BaseDatasetImpl struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s BaseDatasetImpl) Dataset() BaseDatasetImpl { + return s +} + +var _ Dataset = RawDatasetImpl{} + +// RawDatasetImpl 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 RawDatasetImpl struct { + dataset BaseDatasetImpl + Type string + Values map[string]interface{} +} + +func (s RawDatasetImpl) Dataset() BaseDatasetImpl { + return s.dataset +} + +func UnmarshalDatasetImplementation(input []byte) (Dataset, 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 Dataset into map[string]interface: %+v", err) + } + + var value string + if v, ok := temp["type"]; ok { + value = fmt.Sprintf("%v", v) + } + + if strings.EqualFold(value, "AmazonMWSObject") { + var out AmazonMWSObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonMWSObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRdsForOracleTable") { + var out AmazonRdsForOracleTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRdsForOracleTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRdsForSqlServerTable") { + var out AmazonRdsForSqlServerTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRdsForSqlServerTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRedshiftTable") { + var out AmazonRedshiftTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRedshiftTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonS3Object") { + var out AmazonS3Dataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonS3Dataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Avro") { + var out AvroDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AvroDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlob") { + var out AzureBlobDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlobFSFile") { + var out AzureBlobFSDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobFSDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataExplorerTable") { + var out AzureDataExplorerTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataExplorerTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataLakeStoreFile") { + var out AzureDataLakeStoreDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataLakeStoreDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDatabricksDeltaLakeDataset") { + var out AzureDatabricksDeltaLakeDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDatabricksDeltaLakeDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMariaDBTable") { + var out AzureMariaDBTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMariaDBTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMySqlTable") { + var out AzureMySqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMySqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzurePostgreSqlTable") { + var out AzurePostgreSqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzurePostgreSqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSearchIndex") { + var out AzureSearchIndexDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSearchIndexDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlDWTable") { + var out AzureSqlDWTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlDWTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlMITable") { + var out AzureSqlMITableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlMITableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlTable") { + var out AzureSqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureTable") { + var out AzureTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Binary") { + var out BinaryDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into BinaryDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CassandraTable") { + var out CassandraTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CassandraTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CommonDataServiceForAppsEntity") { + var out CommonDataServiceForAppsEntityDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CommonDataServiceForAppsEntityDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ConcurObject") { + var out ConcurObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ConcurObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CosmosDbMongoDbApiCollection") { + var out CosmosDbMongoDbApiCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CosmosDbSqlApiCollection") { + var out CosmosDbSqlApiCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CosmosDbSqlApiCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CouchbaseTable") { + var out CouchbaseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CouchbaseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CustomDataset") { + var out CustomDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CustomDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Db2Table") { + var out Db2TableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Db2TableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DelimitedText") { + var out DelimitedTextDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DelimitedTextDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DocumentDbCollection") { + var out DocumentDbCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DocumentDbCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DrillTable") { + var out DrillTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DrillTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsAXResource") { + var out DynamicsAXResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsAXResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsCrmEntity") { + var out DynamicsCrmEntityDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsCrmEntityDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsEntity") { + var out DynamicsEntityDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsEntityDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "EloquaObject") { + var out EloquaObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EloquaObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Excel") { + var out ExcelDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExcelDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FileShare") { + var out FileShareDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FileShareDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleAdWordsObject") { + var out GoogleAdWordsObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleAdWordsObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleBigQueryObject") { + var out GoogleBigQueryObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleBigQueryObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleBigQueryV2Object") { + var out GoogleBigQueryV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleBigQueryV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GreenplumTable") { + var out GreenplumTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GreenplumTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HBaseObject") { + var out HBaseObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HBaseObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HttpFile") { + var out HTTPDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HTTPDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HiveObject") { + var out HiveObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HiveObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HubspotObject") { + var out HubspotObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HubspotObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Iceberg") { + var out IcebergDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into IcebergDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ImpalaObject") { + var out ImpalaObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ImpalaObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "InformixTable") { + var out InformixTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into InformixTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "JiraObject") { + var out JiraObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JiraObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Json") { + var out JsonDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JsonDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "LakeHouseTable") { + var out LakeHouseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LakeHouseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MagentoObject") { + var out MagentoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MagentoObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MariaDBTable") { + var out MariaDBTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MariaDBTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MarketoObject") { + var out MarketoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MarketoObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MicrosoftAccessTable") { + var out MicrosoftAccessTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MicrosoftAccessTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbAtlasCollection") { + var out MongoDbAtlasCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbAtlasCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbCollection") { + var out MongoDbCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbV2Collection") { + var out MongoDbV2CollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbV2CollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MySqlTable") { + var out MySqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MySqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "NetezzaTable") { + var out NetezzaTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into NetezzaTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ODataResource") { + var out ODataResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ODataResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OdbcTable") { + var out OdbcTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OdbcTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Office365Table") { + var out Office365Dataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Office365Dataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleServiceCloudObject") { + var out OracleServiceCloudObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleServiceCloudObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleTable") { + var out OracleTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Orc") { + var out OrcDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OrcDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Parquet") { + var out ParquetDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ParquetDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PaypalObject") { + var out PaypalObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PaypalObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PhoenixObject") { + var out PhoenixObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PhoenixObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostgreSqlTable") { + var out PostgreSqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostgreSqlV2Table") { + var out PostgreSqlV2TableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSqlV2TableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PrestoObject") { + var out PrestoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PrestoObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "QuickBooksObject") { + var out QuickBooksObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into QuickBooksObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RelationalTable") { + var out RelationalTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RelationalTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ResponsysObject") { + var out ResponsysObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ResponsysObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RestResource") { + var out RestResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RestResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceMarketingCloudObject") { + var out SalesforceMarketingCloudObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceMarketingCloudObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceObject") { + var out SalesforceObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceServiceCloudObject") { + var out SalesforceServiceCloudObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceServiceCloudObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceServiceCloudV2Object") { + var out SalesforceServiceCloudV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceV2Object") { + var out SalesforceV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapBwCube") { + var out SapBwCubeDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapBwCubeDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapCloudForCustomerResource") { + var out SapCloudForCustomerResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapCloudForCustomerResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapEccResource") { + var out SapEccResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapEccResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapHanaTable") { + var out SapHanaTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapHanaTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapOdpResource") { + var out SapOdpResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapOdpResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapOpenHubTable") { + var out SapOpenHubTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapOpenHubTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapTableResource") { + var out SapTableResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapTableResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceNowObject") { + var out ServiceNowObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceNowObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceNowV2Object") { + var out ServiceNowV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceNowV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SharePointOnlineListResource") { + var out SharePointOnlineListResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SharePointOnlineListResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ShopifyObject") { + var out ShopifyObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ShopifyObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SnowflakeTable") { + var out SnowflakeDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SnowflakeDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SnowflakeV2Table") { + var out SnowflakeV2Dataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SnowflakeV2Dataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SparkObject") { + var out SparkObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SparkObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SqlServerTable") { + var out SqlServerTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SqlServerTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SquareObject") { + var out SquareObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SquareObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SybaseTable") { + var out SybaseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SybaseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "TeradataTable") { + var out TeradataTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TeradataTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "VerticaTable") { + var out VerticaTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into VerticaTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WarehouseTable") { + var out WarehouseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WarehouseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WebTable") { + var out WebTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "XeroObject") { + var out XeroObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into XeroObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Xml") { + var out XmlDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into XmlDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ZohoObject") { + var out ZohoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ZohoObjectDataset: %+v", err) + } + return out, nil + } + + var parent BaseDatasetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatasetImpl: %+v", err) + } + + return RawDatasetImpl{ + dataset: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetcompression.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetcompression.go new file mode 100644 index 000000000000..1fe5033c68b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetcompression.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetCompression struct { + Level *string `json:"level,omitempty"` + Type string `json:"type"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetfolder.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetfolder.go new file mode 100644 index 000000000000..7f66d5a037ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetfolder.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetFolder struct { + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go new file mode 100644 index 000000000000..2cdad64ec0d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go @@ -0,0 +1,181 @@ +package datasets + +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 DatasetLocation interface { + DatasetLocation() BaseDatasetLocationImpl +} + +var _ DatasetLocation = BaseDatasetLocationImpl{} + +type BaseDatasetLocationImpl struct { + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s BaseDatasetLocationImpl) DatasetLocation() BaseDatasetLocationImpl { + return s +} + +var _ DatasetLocation = RawDatasetLocationImpl{} + +// RawDatasetLocationImpl 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 RawDatasetLocationImpl struct { + datasetLocation BaseDatasetLocationImpl + Type string + Values map[string]interface{} +} + +func (s RawDatasetLocationImpl) DatasetLocation() BaseDatasetLocationImpl { + return s.datasetLocation +} + +func UnmarshalDatasetLocationImplementation(input []byte) (DatasetLocation, 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 DatasetLocation into map[string]interface: %+v", err) + } + + var value string + if v, ok := temp["type"]; ok { + value = fmt.Sprintf("%v", v) + } + + if strings.EqualFold(value, "AmazonS3CompatibleLocation") { + var out AmazonS3CompatibleLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonS3CompatibleLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonS3Location") { + var out AmazonS3Location + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonS3Location: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlobFSLocation") { + var out AzureBlobFSLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobFSLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlobStorageLocation") { + var out AzureBlobStorageLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobStorageLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataLakeStoreLocation") { + var out AzureDataLakeStoreLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataLakeStoreLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureFileStorageLocation") { + var out AzureFileStorageLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureFileStorageLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FileServerLocation") { + var out FileServerLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FileServerLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FtpServerLocation") { + var out FtpServerLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FtpServerLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleCloudStorageLocation") { + var out GoogleCloudStorageLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleCloudStorageLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HttpServerLocation") { + var out HTTPServerLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HTTPServerLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HdfsLocation") { + var out HdfsLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HdfsLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "LakeHouseLocation") { + var out LakeHouseLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LakeHouseLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleCloudStorageLocation") { + var out OracleCloudStorageLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleCloudStorageLocation: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SftpLocation") { + var out SftpLocation + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SftpLocation: %+v", err) + } + return out, nil + } + + var parent BaseDatasetLocationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatasetLocationImpl: %+v", err) + } + + return RawDatasetLocationImpl{ + datasetLocation: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go new file mode 100644 index 000000000000..c718208e3dd4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go @@ -0,0 +1,51 @@ +package datasets + +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 DatasetResource struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties Dataset `json:"properties"` + Type *string `json:"type,omitempty"` +} + +var _ json.Unmarshaler = &DatasetResource{} + +func (s *DatasetResource) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Etag = decoded.Etag + 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 DatasetResource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := UnmarshalDatasetImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'DatasetResource': %+v", err) + } + s.Properties = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go new file mode 100644 index 000000000000..eee7e4cbd1dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go @@ -0,0 +1,109 @@ +package datasets + +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 DatasetStorageFormat interface { + DatasetStorageFormat() BaseDatasetStorageFormatImpl +} + +var _ DatasetStorageFormat = BaseDatasetStorageFormatImpl{} + +type BaseDatasetStorageFormatImpl struct { + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s BaseDatasetStorageFormatImpl) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return s +} + +var _ DatasetStorageFormat = RawDatasetStorageFormatImpl{} + +// RawDatasetStorageFormatImpl 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 RawDatasetStorageFormatImpl struct { + datasetStorageFormat BaseDatasetStorageFormatImpl + Type string + Values map[string]interface{} +} + +func (s RawDatasetStorageFormatImpl) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return s.datasetStorageFormat +} + +func UnmarshalDatasetStorageFormatImplementation(input []byte) (DatasetStorageFormat, 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 DatasetStorageFormat into map[string]interface: %+v", err) + } + + var value string + if v, ok := temp["type"]; ok { + value = fmt.Sprintf("%v", v) + } + + if strings.EqualFold(value, "AvroFormat") { + var out AvroFormat + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AvroFormat: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "JsonFormat") { + var out JsonFormat + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JsonFormat: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OrcFormat") { + var out OrcFormat + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OrcFormat: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ParquetFormat") { + var out ParquetFormat + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ParquetFormat: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "TextFormat") { + var out TextFormat + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TextFormat: %+v", err) + } + return out, nil + } + + var parent BaseDatasetStorageFormatImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatasetStorageFormatImpl: %+v", err) + } + + return RawDatasetStorageFormatImpl{ + datasetStorageFormat: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go new file mode 100644 index 000000000000..8d690c5363a2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = Db2TableDataset{} + +type Db2TableDataset struct { + TypeProperties *Db2TableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s Db2TableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = Db2TableDataset{} + +func (s Db2TableDataset) MarshalJSON() ([]byte, error) { + type wrapper Db2TableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Db2TableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Db2TableDataset: %+v", err) + } + + decoded["type"] = "Db2Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Db2TableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledatasettypeproperties.go new file mode 100644 index 000000000000..97443cfe4524 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Db2TableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go new file mode 100644 index 000000000000..e5b71f2eb417 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = DelimitedTextDataset{} + +type DelimitedTextDataset struct { + TypeProperties *DelimitedTextDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DelimitedTextDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = DelimitedTextDataset{} + +func (s DelimitedTextDataset) MarshalJSON() ([]byte, error) { + type wrapper DelimitedTextDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DelimitedTextDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DelimitedTextDataset: %+v", err) + } + + decoded["type"] = "DelimitedText" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DelimitedTextDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go new file mode 100644 index 000000000000..861b6da0ec7a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go @@ -0,0 +1,66 @@ +package datasets + +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 DelimitedTextDatasetTypeProperties struct { + ColumnDelimiter *string `json:"columnDelimiter,omitempty"` + CompressionCodec *string `json:"compressionCodec,omitempty"` + CompressionLevel *string `json:"compressionLevel,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + EscapeChar *string `json:"escapeChar,omitempty"` + FirstRowAsHeader *bool `json:"firstRowAsHeader,omitempty"` + Location DatasetLocation `json:"location"` + NullValue *string `json:"nullValue,omitempty"` + QuoteChar *string `json:"quoteChar,omitempty"` + RowDelimiter *string `json:"rowDelimiter,omitempty"` +} + +var _ json.Unmarshaler = &DelimitedTextDatasetTypeProperties{} + +func (s *DelimitedTextDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + ColumnDelimiter *string `json:"columnDelimiter,omitempty"` + CompressionCodec *string `json:"compressionCodec,omitempty"` + CompressionLevel *string `json:"compressionLevel,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + EscapeChar *string `json:"escapeChar,omitempty"` + FirstRowAsHeader *bool `json:"firstRowAsHeader,omitempty"` + NullValue *string `json:"nullValue,omitempty"` + QuoteChar *string `json:"quoteChar,omitempty"` + RowDelimiter *string `json:"rowDelimiter,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.ColumnDelimiter = decoded.ColumnDelimiter + s.CompressionCodec = decoded.CompressionCodec + s.CompressionLevel = decoded.CompressionLevel + s.EncodingName = decoded.EncodingName + s.EscapeChar = decoded.EscapeChar + s.FirstRowAsHeader = decoded.FirstRowAsHeader + s.NullValue = decoded.NullValue + s.QuoteChar = decoded.QuoteChar + s.RowDelimiter = decoded.RowDelimiter + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DelimitedTextDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'DelimitedTextDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go new file mode 100644 index 000000000000..a0aa4d9c346e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = DocumentDbCollectionDataset{} + +type DocumentDbCollectionDataset struct { + TypeProperties DocumentDbCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DocumentDbCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = DocumentDbCollectionDataset{} + +func (s DocumentDbCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper DocumentDbCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DocumentDbCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DocumentDbCollectionDataset: %+v", err) + } + + decoded["type"] = "DocumentDbCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DocumentDbCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondatasettypeproperties.go new file mode 100644 index 000000000000..d6cadbf8e6f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DocumentDbCollectionDatasetTypeProperties struct { + CollectionName string `json:"collectionName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_drilldatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_drilldatasettypeproperties.go new file mode 100644 index 000000000000..8ebdb7dad191 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_drilldatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DrillDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go new file mode 100644 index 000000000000..ad4ce222a0e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = DrillTableDataset{} + +type DrillTableDataset struct { + TypeProperties *DrillDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DrillTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = DrillTableDataset{} + +func (s DrillTableDataset) MarshalJSON() ([]byte, error) { + type wrapper DrillTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DrillTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DrillTableDataset: %+v", err) + } + + decoded["type"] = "DrillTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DrillTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go new file mode 100644 index 000000000000..6906408bf36f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = DynamicsAXResourceDataset{} + +type DynamicsAXResourceDataset struct { + TypeProperties DynamicsAXResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsAXResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = DynamicsAXResourceDataset{} + +func (s DynamicsAXResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper DynamicsAXResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsAXResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsAXResourceDataset: %+v", err) + } + + decoded["type"] = "DynamicsAXResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsAXResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedatasettypeproperties.go new file mode 100644 index 000000000000..acb6dd2bc0f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsAXResourceDatasetTypeProperties struct { + Path string `json:"path"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go new file mode 100644 index 000000000000..f813c9b6d253 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = DynamicsCrmEntityDataset{} + +type DynamicsCrmEntityDataset struct { + TypeProperties *DynamicsCrmEntityDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsCrmEntityDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = DynamicsCrmEntityDataset{} + +func (s DynamicsCrmEntityDataset) MarshalJSON() ([]byte, error) { + type wrapper DynamicsCrmEntityDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsCrmEntityDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsCrmEntityDataset: %+v", err) + } + + decoded["type"] = "DynamicsCrmEntity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsCrmEntityDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydatasettypeproperties.go new file mode 100644 index 000000000000..5f65c4166b39 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsCrmEntityDatasetTypeProperties struct { + EntityName *string `json:"entityName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go new file mode 100644 index 000000000000..d668fe8e5427 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = DynamicsEntityDataset{} + +type DynamicsEntityDataset struct { + TypeProperties *DynamicsEntityDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsEntityDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = DynamicsEntityDataset{} + +func (s DynamicsEntityDataset) MarshalJSON() ([]byte, error) { + type wrapper DynamicsEntityDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsEntityDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsEntityDataset: %+v", err) + } + + decoded["type"] = "DynamicsEntity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsEntityDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydatasettypeproperties.go new file mode 100644 index 000000000000..dc1346167be0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsEntityDatasetTypeProperties struct { + EntityName *string `json:"entityName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go new file mode 100644 index 000000000000..f43a905fe8e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = EloquaObjectDataset{} + +type EloquaObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s EloquaObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = EloquaObjectDataset{} + +func (s EloquaObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper EloquaObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EloquaObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EloquaObjectDataset: %+v", err) + } + + decoded["type"] = "EloquaObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EloquaObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go new file mode 100644 index 000000000000..1bf55a9d781e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ExcelDataset{} + +type ExcelDataset struct { + TypeProperties *ExcelDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ExcelDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ExcelDataset{} + +func (s ExcelDataset) MarshalJSON() ([]byte, error) { + type wrapper ExcelDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExcelDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExcelDataset: %+v", err) + } + + decoded["type"] = "Excel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExcelDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go new file mode 100644 index 000000000000..18a03c0cfa6f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go @@ -0,0 +1,57 @@ +package datasets + +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 ExcelDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FirstRowAsHeader *bool `json:"firstRowAsHeader,omitempty"` + Location DatasetLocation `json:"location"` + NullValue *string `json:"nullValue,omitempty"` + Range *string `json:"range,omitempty"` + SheetIndex *int64 `json:"sheetIndex,omitempty"` + SheetName *string `json:"sheetName,omitempty"` +} + +var _ json.Unmarshaler = &ExcelDatasetTypeProperties{} + +func (s *ExcelDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FirstRowAsHeader *bool `json:"firstRowAsHeader,omitempty"` + NullValue *string `json:"nullValue,omitempty"` + Range *string `json:"range,omitempty"` + SheetIndex *int64 `json:"sheetIndex,omitempty"` + SheetName *string `json:"sheetName,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.FirstRowAsHeader = decoded.FirstRowAsHeader + s.NullValue = decoded.NullValue + s.Range = decoded.Range + s.SheetIndex = decoded.SheetIndex + s.SheetName = decoded.SheetName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ExcelDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'ExcelDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go new file mode 100644 index 000000000000..5cc48d265987 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = FileServerLocation{} + +type FileServerLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s FileServerLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = FileServerLocation{} + +func (s FileServerLocation) MarshalJSON() ([]byte, error) { + type wrapper FileServerLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FileServerLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FileServerLocation: %+v", err) + } + + decoded["type"] = "FileServerLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FileServerLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go new file mode 100644 index 000000000000..0a1adbab340d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = FileShareDataset{} + +type FileShareDataset struct { + TypeProperties *FileShareDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s FileShareDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = FileShareDataset{} + +func (s FileShareDataset) MarshalJSON() ([]byte, error) { + type wrapper FileShareDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FileShareDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FileShareDataset: %+v", err) + } + + decoded["type"] = "FileShare" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FileShareDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go new file mode 100644 index 000000000000..536b036e34cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go @@ -0,0 +1,57 @@ +package datasets + +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 FileShareDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileFilter *string `json:"fileFilter,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` + ModifiedDatetimeEnd *string `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *string `json:"modifiedDatetimeStart,omitempty"` +} + +var _ json.Unmarshaler = &FileShareDatasetTypeProperties{} + +func (s *FileShareDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileFilter *string `json:"fileFilter,omitempty"` + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + ModifiedDatetimeEnd *string `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *string `json:"modifiedDatetimeStart,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.FileFilter = decoded.FileFilter + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + s.ModifiedDatetimeEnd = decoded.ModifiedDatetimeEnd + s.ModifiedDatetimeStart = decoded.ModifiedDatetimeStart + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling FileShareDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := UnmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'FileShareDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go new file mode 100644 index 000000000000..a693bd96179d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = FtpServerLocation{} + +type FtpServerLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s FtpServerLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = FtpServerLocation{} + +func (s FtpServerLocation) MarshalJSON() ([]byte, error) { + type wrapper FtpServerLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FtpServerLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FtpServerLocation: %+v", err) + } + + decoded["type"] = "FtpServerLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FtpServerLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_genericdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_genericdatasettypeproperties.go new file mode 100644 index 000000000000..2444a2aba434 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_genericdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GenericDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go new file mode 100644 index 000000000000..a9fca033b91e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = GoogleAdWordsObjectDataset{} + +type GoogleAdWordsObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GoogleAdWordsObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = GoogleAdWordsObjectDataset{} + +func (s GoogleAdWordsObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper GoogleAdWordsObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleAdWordsObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleAdWordsObjectDataset: %+v", err) + } + + decoded["type"] = "GoogleAdWordsObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleAdWordsObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigquerydatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigquerydatasettypeproperties.go new file mode 100644 index 000000000000..a8bbb9d35b60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigquerydatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryDatasetTypeProperties struct { + Dataset *string `json:"dataset,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go new file mode 100644 index 000000000000..cbef91be0c45 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = GoogleBigQueryObjectDataset{} + +type GoogleBigQueryObjectDataset struct { + TypeProperties *GoogleBigQueryDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GoogleBigQueryObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = GoogleBigQueryObjectDataset{} + +func (s GoogleBigQueryObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper GoogleBigQueryObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleBigQueryObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleBigQueryObjectDataset: %+v", err) + } + + decoded["type"] = "GoogleBigQueryObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleBigQueryObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2datasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2datasettypeproperties.go new file mode 100644 index 000000000000..344d9320a174 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2datasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryV2DatasetTypeProperties struct { + Dataset *string `json:"dataset,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go new file mode 100644 index 000000000000..c9ee1cdfdaa7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = GoogleBigQueryV2ObjectDataset{} + +type GoogleBigQueryV2ObjectDataset struct { + TypeProperties *GoogleBigQueryV2DatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GoogleBigQueryV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = GoogleBigQueryV2ObjectDataset{} + +func (s GoogleBigQueryV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper GoogleBigQueryV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleBigQueryV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleBigQueryV2ObjectDataset: %+v", err) + } + + decoded["type"] = "GoogleBigQueryV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleBigQueryV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go new file mode 100644 index 000000000000..c5f0b9b031ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go @@ -0,0 +1,55 @@ +package datasets + +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 _ DatasetLocation = GoogleCloudStorageLocation{} + +type GoogleCloudStorageLocation struct { + BucketName *string `json:"bucketName,omitempty"` + Version *string `json:"version,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s GoogleCloudStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = GoogleCloudStorageLocation{} + +func (s GoogleCloudStorageLocation) MarshalJSON() ([]byte, error) { + type wrapper GoogleCloudStorageLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleCloudStorageLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleCloudStorageLocation: %+v", err) + } + + decoded["type"] = "GoogleCloudStorageLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleCloudStorageLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_greenplumdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_greenplumdatasettypeproperties.go new file mode 100644 index 000000000000..fbb49af640b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_greenplumdatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GreenplumDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go new file mode 100644 index 000000000000..618e80b6e26b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = GreenplumTableDataset{} + +type GreenplumTableDataset struct { + TypeProperties *GreenplumDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GreenplumTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = GreenplumTableDataset{} + +func (s GreenplumTableDataset) MarshalJSON() ([]byte, error) { + type wrapper GreenplumTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GreenplumTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GreenplumTableDataset: %+v", err) + } + + decoded["type"] = "GreenplumTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GreenplumTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go new file mode 100644 index 000000000000..4328b31379fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = HBaseObjectDataset{} + +type HBaseObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HBaseObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = HBaseObjectDataset{} + +func (s HBaseObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper HBaseObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HBaseObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HBaseObjectDataset: %+v", err) + } + + decoded["type"] = "HBaseObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HBaseObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go new file mode 100644 index 000000000000..c7e9c17953af --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = HdfsLocation{} + +type HdfsLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s HdfsLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = HdfsLocation{} + +func (s HdfsLocation) MarshalJSON() ([]byte, error) { + type wrapper HdfsLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HdfsLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HdfsLocation: %+v", err) + } + + decoded["type"] = "HdfsLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HdfsLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hivedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hivedatasettypeproperties.go new file mode 100644 index 000000000000..89566c909885 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hivedatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HiveDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go new file mode 100644 index 000000000000..89b45af696f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = HiveObjectDataset{} + +type HiveObjectDataset struct { + TypeProperties *HiveDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HiveObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = HiveObjectDataset{} + +func (s HiveObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper HiveObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HiveObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HiveObjectDataset: %+v", err) + } + + decoded["type"] = "HiveObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HiveObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go new file mode 100644 index 000000000000..7ac55c3b5912 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = HTTPDataset{} + +type HTTPDataset struct { + TypeProperties *HTTPDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HTTPDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = HTTPDataset{} + +func (s HTTPDataset) MarshalJSON() ([]byte, error) { + type wrapper HTTPDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HTTPDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HTTPDataset: %+v", err) + } + + decoded["type"] = "HttpFile" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HTTPDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go new file mode 100644 index 000000000000..4c498ca5b5a4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go @@ -0,0 +1,54 @@ +package datasets + +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 HTTPDatasetTypeProperties struct { + AdditionalHeaders *string `json:"additionalHeaders,omitempty"` + Compression *DatasetCompression `json:"compression,omitempty"` + Format DatasetStorageFormat `json:"format"` + RelativeURL *string `json:"relativeUrl,omitempty"` + RequestBody *string `json:"requestBody,omitempty"` + RequestMethod *string `json:"requestMethod,omitempty"` +} + +var _ json.Unmarshaler = &HTTPDatasetTypeProperties{} + +func (s *HTTPDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + AdditionalHeaders *string `json:"additionalHeaders,omitempty"` + Compression *DatasetCompression `json:"compression,omitempty"` + RelativeURL *string `json:"relativeUrl,omitempty"` + RequestBody *string `json:"requestBody,omitempty"` + RequestMethod *string `json:"requestMethod,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.AdditionalHeaders = decoded.AdditionalHeaders + s.Compression = decoded.Compression + s.RelativeURL = decoded.RelativeURL + s.RequestBody = decoded.RequestBody + s.RequestMethod = decoded.RequestMethod + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HTTPDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := UnmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'HTTPDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go new file mode 100644 index 000000000000..f5d387d5a317 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go @@ -0,0 +1,54 @@ +package datasets + +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 _ DatasetLocation = HTTPServerLocation{} + +type HTTPServerLocation struct { + RelativeURL *string `json:"relativeUrl,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s HTTPServerLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = HTTPServerLocation{} + +func (s HTTPServerLocation) MarshalJSON() ([]byte, error) { + type wrapper HTTPServerLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HTTPServerLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HTTPServerLocation: %+v", err) + } + + decoded["type"] = "HttpServerLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HTTPServerLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go new file mode 100644 index 000000000000..a74dff6295fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = HubspotObjectDataset{} + +type HubspotObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HubspotObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = HubspotObjectDataset{} + +func (s HubspotObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper HubspotObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HubspotObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HubspotObjectDataset: %+v", err) + } + + decoded["type"] = "HubspotObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HubspotObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go new file mode 100644 index 000000000000..427ebe75925f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = IcebergDataset{} + +type IcebergDataset struct { + TypeProperties *IcebergDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s IcebergDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = IcebergDataset{} + +func (s IcebergDataset) MarshalJSON() ([]byte, error) { + type wrapper IcebergDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling IcebergDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling IcebergDataset: %+v", err) + } + + decoded["type"] = "Iceberg" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling IcebergDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go new file mode 100644 index 000000000000..4597b602006c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go @@ -0,0 +1,33 @@ +package datasets + +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 IcebergDatasetTypeProperties struct { + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &IcebergDatasetTypeProperties{} + +func (s *IcebergDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling IcebergDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'IcebergDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_impaladatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_impaladatasettypeproperties.go new file mode 100644 index 000000000000..805c2787659a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_impaladatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImpalaDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go new file mode 100644 index 000000000000..9a1354d52fef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ImpalaObjectDataset{} + +type ImpalaObjectDataset struct { + TypeProperties *ImpalaDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ImpalaObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ImpalaObjectDataset{} + +func (s ImpalaObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ImpalaObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ImpalaObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ImpalaObjectDataset: %+v", err) + } + + decoded["type"] = "ImpalaObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ImpalaObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go new file mode 100644 index 000000000000..4699821053c2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = InformixTableDataset{} + +type InformixTableDataset struct { + TypeProperties *InformixTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s InformixTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = InformixTableDataset{} + +func (s InformixTableDataset) MarshalJSON() ([]byte, error) { + type wrapper InformixTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling InformixTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling InformixTableDataset: %+v", err) + } + + decoded["type"] = "InformixTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling InformixTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledatasettypeproperties.go new file mode 100644 index 000000000000..744afe6f53f8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InformixTableDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go new file mode 100644 index 000000000000..8d5405935127 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = JiraObjectDataset{} + +type JiraObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s JiraObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = JiraObjectDataset{} + +func (s JiraObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper JiraObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JiraObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JiraObjectDataset: %+v", err) + } + + decoded["type"] = "JiraObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JiraObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go new file mode 100644 index 000000000000..54b8169e9a3c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = JsonDataset{} + +type JsonDataset struct { + TypeProperties *JsonDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s JsonDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = JsonDataset{} + +func (s JsonDataset) MarshalJSON() ([]byte, error) { + type wrapper JsonDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JsonDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JsonDataset: %+v", err) + } + + decoded["type"] = "Json" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JsonDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go new file mode 100644 index 000000000000..3bc9df9a8b7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go @@ -0,0 +1,45 @@ +package datasets + +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 JsonDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &JsonDatasetTypeProperties{} + +func (s *JsonDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.EncodingName = decoded.EncodingName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling JsonDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'JsonDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go new file mode 100644 index 000000000000..400d4ae38580 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go @@ -0,0 +1,58 @@ +package datasets + +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 _ DatasetStorageFormat = JsonFormat{} + +type JsonFormat struct { + EncodingName *string `json:"encodingName,omitempty"` + FilePattern *interface{} `json:"filePattern,omitempty"` + JsonNodeReference *string `json:"jsonNodeReference,omitempty"` + JsonPathDefinition *interface{} `json:"jsonPathDefinition,omitempty"` + NestingSeparator *string `json:"nestingSeparator,omitempty"` + + // Fields inherited from DatasetStorageFormat + + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s JsonFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } +} + +var _ json.Marshaler = JsonFormat{} + +func (s JsonFormat) MarshalJSON() ([]byte, error) { + type wrapper JsonFormat + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JsonFormat: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JsonFormat: %+v", err) + } + + decoded["type"] = "JsonFormat" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JsonFormat: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go new file mode 100644 index 000000000000..03dbc0cd4f61 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = LakeHouseLocation{} + +type LakeHouseLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = LakeHouseLocation{} + +func (s LakeHouseLocation) MarshalJSON() ([]byte, error) { + type wrapper LakeHouseLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LakeHouseLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LakeHouseLocation: %+v", err) + } + + decoded["type"] = "LakeHouseLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LakeHouseLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go new file mode 100644 index 000000000000..6428ef65e3b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = LakeHouseTableDataset{} + +type LakeHouseTableDataset struct { + TypeProperties *LakeHouseTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = LakeHouseTableDataset{} + +func (s LakeHouseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper LakeHouseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LakeHouseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LakeHouseTableDataset: %+v", err) + } + + decoded["type"] = "LakeHouseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LakeHouseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledatasettypeproperties.go new file mode 100644 index 000000000000..470a5890330e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_linkedservicereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_linkedservicereference.go new file mode 100644 index 000000000000..93c5cf3e3fc2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_linkedservicereference.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedServiceReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type Type `json:"type"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go new file mode 100644 index 000000000000..eae8e80be803 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MagentoObjectDataset{} + +type MagentoObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MagentoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MagentoObjectDataset{} + +func (s MagentoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper MagentoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MagentoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MagentoObjectDataset: %+v", err) + } + + decoded["type"] = "MagentoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MagentoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go new file mode 100644 index 000000000000..9e30628b6c56 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MariaDBTableDataset{} + +type MariaDBTableDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MariaDBTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MariaDBTableDataset{} + +func (s MariaDBTableDataset) MarshalJSON() ([]byte, error) { + type wrapper MariaDBTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MariaDBTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MariaDBTableDataset: %+v", err) + } + + decoded["type"] = "MariaDBTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MariaDBTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go new file mode 100644 index 000000000000..da9648f4f162 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MarketoObjectDataset{} + +type MarketoObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MarketoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MarketoObjectDataset{} + +func (s MarketoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper MarketoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MarketoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MarketoObjectDataset: %+v", err) + } + + decoded["type"] = "MarketoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MarketoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go new file mode 100644 index 000000000000..29668f5be07b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MicrosoftAccessTableDataset{} + +type MicrosoftAccessTableDataset struct { + TypeProperties *MicrosoftAccessTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MicrosoftAccessTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MicrosoftAccessTableDataset{} + +func (s MicrosoftAccessTableDataset) MarshalJSON() ([]byte, error) { + type wrapper MicrosoftAccessTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MicrosoftAccessTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MicrosoftAccessTableDataset: %+v", err) + } + + decoded["type"] = "MicrosoftAccessTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MicrosoftAccessTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledatasettypeproperties.go new file mode 100644 index 000000000000..9f8b6a270b07 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MicrosoftAccessTableDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go new file mode 100644 index 000000000000..0af9117a1f06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MongoDbAtlasCollectionDataset{} + +type MongoDbAtlasCollectionDataset struct { + TypeProperties MongoDbAtlasCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbAtlasCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MongoDbAtlasCollectionDataset{} + +func (s MongoDbAtlasCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper MongoDbAtlasCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbAtlasCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbAtlasCollectionDataset: %+v", err) + } + + decoded["type"] = "MongoDbAtlasCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbAtlasCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondatasettypeproperties.go new file mode 100644 index 000000000000..63ab2a34217a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbAtlasCollectionDatasetTypeProperties struct { + Collection string `json:"collection"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go new file mode 100644 index 000000000000..bc286348347a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MongoDbCollectionDataset{} + +type MongoDbCollectionDataset struct { + TypeProperties MongoDbCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MongoDbCollectionDataset{} + +func (s MongoDbCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper MongoDbCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbCollectionDataset: %+v", err) + } + + decoded["type"] = "MongoDbCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondatasettypeproperties.go new file mode 100644 index 000000000000..e090e4aff9d0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbCollectionDatasetTypeProperties struct { + CollectionName string `json:"collectionName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go new file mode 100644 index 000000000000..be6b16677aa0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MongoDbV2CollectionDataset{} + +type MongoDbV2CollectionDataset struct { + TypeProperties MongoDbV2CollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbV2CollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MongoDbV2CollectionDataset{} + +func (s MongoDbV2CollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper MongoDbV2CollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbV2CollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbV2CollectionDataset: %+v", err) + } + + decoded["type"] = "MongoDbV2Collection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbV2CollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondatasettypeproperties.go new file mode 100644 index 000000000000..42b69e1d2a99 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbV2CollectionDatasetTypeProperties struct { + Collection string `json:"collection"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go new file mode 100644 index 000000000000..b99223212a5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = MySqlTableDataset{} + +type MySqlTableDataset struct { + TypeProperties *MySqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MySqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = MySqlTableDataset{} + +func (s MySqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper MySqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MySqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MySqlTableDataset: %+v", err) + } + + decoded["type"] = "MySqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MySqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledatasettypeproperties.go new file mode 100644 index 000000000000..4cff06dc0032 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySqlTableDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go new file mode 100644 index 000000000000..2755e44f3dc6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = NetezzaTableDataset{} + +type NetezzaTableDataset struct { + TypeProperties *NetezzaTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s NetezzaTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = NetezzaTableDataset{} + +func (s NetezzaTableDataset) MarshalJSON() ([]byte, error) { + type wrapper NetezzaTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling NetezzaTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling NetezzaTableDataset: %+v", err) + } + + decoded["type"] = "NetezzaTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling NetezzaTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledatasettypeproperties.go new file mode 100644 index 000000000000..d378d24eda89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetezzaTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go new file mode 100644 index 000000000000..a8524d06ca87 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ODataResourceDataset{} + +type ODataResourceDataset struct { + TypeProperties *ODataResourceDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ODataResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ODataResourceDataset{} + +func (s ODataResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper ODataResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ODataResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ODataResourceDataset: %+v", err) + } + + decoded["type"] = "ODataResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ODataResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedatasettypeproperties.go new file mode 100644 index 000000000000..44e3971ffaaa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ODataResourceDatasetTypeProperties struct { + Path *string `json:"path,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go new file mode 100644 index 000000000000..788838d219c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = OdbcTableDataset{} + +type OdbcTableDataset struct { + TypeProperties *OdbcTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OdbcTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = OdbcTableDataset{} + +func (s OdbcTableDataset) MarshalJSON() ([]byte, error) { + type wrapper OdbcTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OdbcTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OdbcTableDataset: %+v", err) + } + + decoded["type"] = "OdbcTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OdbcTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledatasettypeproperties.go new file mode 100644 index 000000000000..3968899b98d1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OdbcTableDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go new file mode 100644 index 000000000000..d406c079a1bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = Office365Dataset{} + +type Office365Dataset struct { + TypeProperties Office365DatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s Office365Dataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = Office365Dataset{} + +func (s Office365Dataset) MarshalJSON() ([]byte, error) { + type wrapper Office365Dataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Office365Dataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Office365Dataset: %+v", err) + } + + decoded["type"] = "Office365Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Office365Dataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_office365datasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_office365datasettypeproperties.go new file mode 100644 index 000000000000..51771f2b7bac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_office365datasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Office365DatasetTypeProperties struct { + Predicate *string `json:"predicate,omitempty"` + TableName string `json:"tableName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go new file mode 100644 index 000000000000..d4a73c8e72f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go @@ -0,0 +1,55 @@ +package datasets + +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 _ DatasetLocation = OracleCloudStorageLocation{} + +type OracleCloudStorageLocation struct { + BucketName *string `json:"bucketName,omitempty"` + Version *string `json:"version,omitempty"` + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s OracleCloudStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = OracleCloudStorageLocation{} + +func (s OracleCloudStorageLocation) MarshalJSON() ([]byte, error) { + type wrapper OracleCloudStorageLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleCloudStorageLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleCloudStorageLocation: %+v", err) + } + + decoded["type"] = "OracleCloudStorageLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleCloudStorageLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go new file mode 100644 index 000000000000..e1591eb9fc67 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = OracleServiceCloudObjectDataset{} + +type OracleServiceCloudObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OracleServiceCloudObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = OracleServiceCloudObjectDataset{} + +func (s OracleServiceCloudObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper OracleServiceCloudObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleServiceCloudObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleServiceCloudObjectDataset: %+v", err) + } + + decoded["type"] = "OracleServiceCloudObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleServiceCloudObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go new file mode 100644 index 000000000000..352b1cd31c92 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = OracleTableDataset{} + +type OracleTableDataset struct { + TypeProperties *OracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OracleTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = OracleTableDataset{} + +func (s OracleTableDataset) MarshalJSON() ([]byte, error) { + type wrapper OracleTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleTableDataset: %+v", err) + } + + decoded["type"] = "OracleTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledatasettypeproperties.go new file mode 100644 index 000000000000..98d74f5df02e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go new file mode 100644 index 000000000000..61faaf19b492 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = OrcDataset{} + +type OrcDataset struct { + TypeProperties *OrcDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OrcDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = OrcDataset{} + +func (s OrcDataset) MarshalJSON() ([]byte, error) { + type wrapper OrcDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OrcDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OrcDataset: %+v", err) + } + + decoded["type"] = "Orc" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OrcDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go new file mode 100644 index 000000000000..72336833023d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go @@ -0,0 +1,42 @@ +package datasets + +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 OrcDatasetTypeProperties struct { + Location DatasetLocation `json:"location"` + OrcCompressionCodec *string `json:"orcCompressionCodec,omitempty"` +} + +var _ json.Unmarshaler = &OrcDatasetTypeProperties{} + +func (s *OrcDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + OrcCompressionCodec *string `json:"orcCompressionCodec,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.OrcCompressionCodec = decoded.OrcCompressionCodec + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OrcDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'OrcDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go new file mode 100644 index 000000000000..2b550bf5a374 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetStorageFormat = OrcFormat{} + +type OrcFormat struct { + + // Fields inherited from DatasetStorageFormat + + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s OrcFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } +} + +var _ json.Marshaler = OrcFormat{} + +func (s OrcFormat) MarshalJSON() ([]byte, error) { + type wrapper OrcFormat + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OrcFormat: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OrcFormat: %+v", err) + } + + decoded["type"] = "OrcFormat" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OrcFormat: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parameterspecification.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parameterspecification.go new file mode 100644 index 000000000000..75b3e7850248 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parameterspecification.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParameterSpecification struct { + DefaultValue *interface{} `json:"defaultValue,omitempty"` + Type ParameterType `json:"type"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go new file mode 100644 index 000000000000..5ae3255b1ed0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ParquetDataset{} + +type ParquetDataset struct { + TypeProperties *ParquetDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ParquetDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ParquetDataset{} + +func (s ParquetDataset) MarshalJSON() ([]byte, error) { + type wrapper ParquetDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ParquetDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ParquetDataset: %+v", err) + } + + decoded["type"] = "Parquet" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ParquetDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go new file mode 100644 index 000000000000..9f01193f2399 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go @@ -0,0 +1,42 @@ +package datasets + +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 ParquetDatasetTypeProperties struct { + CompressionCodec *string `json:"compressionCodec,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &ParquetDatasetTypeProperties{} + +func (s *ParquetDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + CompressionCodec *string `json:"compressionCodec,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.CompressionCodec = decoded.CompressionCodec + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ParquetDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'ParquetDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go new file mode 100644 index 000000000000..aeb8d2a224c9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetStorageFormat = ParquetFormat{} + +type ParquetFormat struct { + + // Fields inherited from DatasetStorageFormat + + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s ParquetFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } +} + +var _ json.Marshaler = ParquetFormat{} + +func (s ParquetFormat) MarshalJSON() ([]byte, error) { + type wrapper ParquetFormat + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ParquetFormat: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ParquetFormat: %+v", err) + } + + decoded["type"] = "ParquetFormat" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ParquetFormat: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go new file mode 100644 index 000000000000..2a8224b967e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = PaypalObjectDataset{} + +type PaypalObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PaypalObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = PaypalObjectDataset{} + +func (s PaypalObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper PaypalObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PaypalObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PaypalObjectDataset: %+v", err) + } + + decoded["type"] = "PaypalObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PaypalObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_phoenixdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_phoenixdatasettypeproperties.go new file mode 100644 index 000000000000..a5ea7b91d309 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_phoenixdatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PhoenixDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go new file mode 100644 index 000000000000..983eb481ffd1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = PhoenixObjectDataset{} + +type PhoenixObjectDataset struct { + TypeProperties *PhoenixDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PhoenixObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = PhoenixObjectDataset{} + +func (s PhoenixObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper PhoenixObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PhoenixObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PhoenixObjectDataset: %+v", err) + } + + decoded["type"] = "PhoenixObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PhoenixObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go new file mode 100644 index 000000000000..f61d34574a98 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = PostgreSqlTableDataset{} + +type PostgreSqlTableDataset struct { + TypeProperties *PostgreSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PostgreSqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = PostgreSqlTableDataset{} + +func (s PostgreSqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper PostgreSqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSqlTableDataset: %+v", err) + } + + decoded["type"] = "PostgreSqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledatasettypeproperties.go new file mode 100644 index 000000000000..f326e547bd18 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go new file mode 100644 index 000000000000..77e6c17cc0be --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = PostgreSqlV2TableDataset{} + +type PostgreSqlV2TableDataset struct { + TypeProperties *PostgreSqlV2TableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PostgreSqlV2TableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = PostgreSqlV2TableDataset{} + +func (s PostgreSqlV2TableDataset) MarshalJSON() ([]byte, error) { + type wrapper PostgreSqlV2TableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSqlV2TableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSqlV2TableDataset: %+v", err) + } + + decoded["type"] = "PostgreSqlV2Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSqlV2TableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledatasettypeproperties.go new file mode 100644 index 000000000000..e9c6b68fc9ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlV2TableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_prestodatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_prestodatasettypeproperties.go new file mode 100644 index 000000000000..c04fa29adf54 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_prestodatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrestoDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go new file mode 100644 index 000000000000..937dca38c89f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = PrestoObjectDataset{} + +type PrestoObjectDataset struct { + TypeProperties *PrestoDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PrestoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = PrestoObjectDataset{} + +func (s PrestoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper PrestoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PrestoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PrestoObjectDataset: %+v", err) + } + + decoded["type"] = "PrestoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PrestoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go new file mode 100644 index 000000000000..e9885cfba0d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = QuickBooksObjectDataset{} + +type QuickBooksObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s QuickBooksObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = QuickBooksObjectDataset{} + +func (s QuickBooksObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper QuickBooksObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling QuickBooksObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling QuickBooksObjectDataset: %+v", err) + } + + decoded["type"] = "QuickBooksObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling QuickBooksObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go new file mode 100644 index 000000000000..4b2bf736440d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = RelationalTableDataset{} + +type RelationalTableDataset struct { + TypeProperties *RelationalTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s RelationalTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = RelationalTableDataset{} + +func (s RelationalTableDataset) MarshalJSON() ([]byte, error) { + type wrapper RelationalTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RelationalTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RelationalTableDataset: %+v", err) + } + + decoded["type"] = "RelationalTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RelationalTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledatasettypeproperties.go new file mode 100644 index 000000000000..a46c1c74b293 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RelationalTableDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go new file mode 100644 index 000000000000..72e37e3d158f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ResponsysObjectDataset{} + +type ResponsysObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ResponsysObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ResponsysObjectDataset{} + +func (s ResponsysObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ResponsysObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ResponsysObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ResponsysObjectDataset: %+v", err) + } + + decoded["type"] = "ResponsysObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ResponsysObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go new file mode 100644 index 000000000000..ca3cc639f1cb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = RestResourceDataset{} + +type RestResourceDataset struct { + TypeProperties *RestResourceDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s RestResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = RestResourceDataset{} + +func (s RestResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper RestResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RestResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RestResourceDataset: %+v", err) + } + + decoded["type"] = "RestResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RestResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedatasettypeproperties.go new file mode 100644 index 000000000000..292ce7a1142e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedatasettypeproperties.go @@ -0,0 +1,12 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestResourceDatasetTypeProperties struct { + AdditionalHeaders *map[string]string `json:"additionalHeaders,omitempty"` + PaginationRules *map[string]string `json:"paginationRules,omitempty"` + RelativeURL *string `json:"relativeUrl,omitempty"` + RequestBody *string `json:"requestBody,omitempty"` + RequestMethod *string `json:"requestMethod,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go new file mode 100644 index 000000000000..45c5f3b7cce7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SalesforceMarketingCloudObjectDataset{} + +type SalesforceMarketingCloudObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceMarketingCloudObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SalesforceMarketingCloudObjectDataset{} + +func (s SalesforceMarketingCloudObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceMarketingCloudObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceMarketingCloudObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceMarketingCloudObjectDataset: %+v", err) + } + + decoded["type"] = "SalesforceMarketingCloudObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceMarketingCloudObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go new file mode 100644 index 000000000000..1f3aa31fefc6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SalesforceObjectDataset{} + +type SalesforceObjectDataset struct { + TypeProperties *SalesforceObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SalesforceObjectDataset{} + +func (s SalesforceObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceObjectDataset: %+v", err) + } + + decoded["type"] = "SalesforceObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdatasettypeproperties.go new file mode 100644 index 000000000000..06f218bc72a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceObjectDatasetTypeProperties struct { + ObjectApiName *string `json:"objectApiName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go new file mode 100644 index 000000000000..4b5142ba544b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SalesforceServiceCloudObjectDataset{} + +type SalesforceServiceCloudObjectDataset struct { + TypeProperties *SalesforceServiceCloudObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceServiceCloudObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SalesforceServiceCloudObjectDataset{} + +func (s SalesforceServiceCloudObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceServiceCloudObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceServiceCloudObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudObjectDataset: %+v", err) + } + + decoded["type"] = "SalesforceServiceCloudObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceServiceCloudObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdatasettypeproperties.go new file mode 100644 index 000000000000..f16d0f2c8c05 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudObjectDatasetTypeProperties struct { + ObjectApiName *string `json:"objectApiName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go new file mode 100644 index 000000000000..490859db731e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SalesforceServiceCloudV2ObjectDataset{} + +type SalesforceServiceCloudV2ObjectDataset struct { + TypeProperties *SalesforceServiceCloudV2ObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceServiceCloudV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SalesforceServiceCloudV2ObjectDataset{} + +func (s SalesforceServiceCloudV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceServiceCloudV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + + decoded["type"] = "SalesforceServiceCloudV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdatasettypeproperties.go new file mode 100644 index 000000000000..fd3212d4f663 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudV2ObjectDatasetTypeProperties struct { + ObjectApiName *string `json:"objectApiName,omitempty"` + ReportId *string `json:"reportId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go new file mode 100644 index 000000000000..1cc0ff1fc0bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SalesforceV2ObjectDataset{} + +type SalesforceV2ObjectDataset struct { + TypeProperties *SalesforceV2ObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SalesforceV2ObjectDataset{} + +func (s SalesforceV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceV2ObjectDataset: %+v", err) + } + + decoded["type"] = "SalesforceV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdatasettypeproperties.go new file mode 100644 index 000000000000..2f4fed44c683 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceV2ObjectDatasetTypeProperties struct { + ObjectApiName *string `json:"objectApiName,omitempty"` + ReportId *string `json:"reportId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go new file mode 100644 index 000000000000..6d0a62eb77cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go @@ -0,0 +1,63 @@ +package datasets + +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 _ Dataset = SapBwCubeDataset{} + +type SapBwCubeDataset struct { + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapBwCubeDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapBwCubeDataset{} + +func (s SapBwCubeDataset) MarshalJSON() ([]byte, error) { + type wrapper SapBwCubeDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapBwCubeDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapBwCubeDataset: %+v", err) + } + + decoded["type"] = "SapBwCube" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapBwCubeDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go new file mode 100644 index 000000000000..48b3af7c10b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SapCloudForCustomerResourceDataset{} + +type SapCloudForCustomerResourceDataset struct { + TypeProperties SapCloudForCustomerResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapCloudForCustomerResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapCloudForCustomerResourceDataset{} + +func (s SapCloudForCustomerResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapCloudForCustomerResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapCloudForCustomerResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapCloudForCustomerResourceDataset: %+v", err) + } + + decoded["type"] = "SapCloudForCustomerResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapCloudForCustomerResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedatasettypeproperties.go new file mode 100644 index 000000000000..c50b4775e4a4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapCloudForCustomerResourceDatasetTypeProperties struct { + Path string `json:"path"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go new file mode 100644 index 000000000000..7c33dd9e3877 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SapEccResourceDataset{} + +type SapEccResourceDataset struct { + TypeProperties SapEccResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapEccResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapEccResourceDataset{} + +func (s SapEccResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapEccResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapEccResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapEccResourceDataset: %+v", err) + } + + decoded["type"] = "SapEccResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapEccResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedatasettypeproperties.go new file mode 100644 index 000000000000..4f022a94803b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapEccResourceDatasetTypeProperties struct { + Path string `json:"path"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go new file mode 100644 index 000000000000..a2a76461dac3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SapHanaTableDataset{} + +type SapHanaTableDataset struct { + TypeProperties *SapHanaTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapHanaTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapHanaTableDataset{} + +func (s SapHanaTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SapHanaTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapHanaTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapHanaTableDataset: %+v", err) + } + + decoded["type"] = "SapHanaTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapHanaTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledatasettypeproperties.go new file mode 100644 index 000000000000..062402f678b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapHanaTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go new file mode 100644 index 000000000000..77b9c2821884 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SapOdpResourceDataset{} + +type SapOdpResourceDataset struct { + TypeProperties SapOdpResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapOdpResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapOdpResourceDataset{} + +func (s SapOdpResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapOdpResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapOdpResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapOdpResourceDataset: %+v", err) + } + + decoded["type"] = "SapOdpResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapOdpResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedatasettypeproperties.go new file mode 100644 index 000000000000..d670e7ad4fa0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOdpResourceDatasetTypeProperties struct { + Context string `json:"context"` + ObjectName string `json:"objectName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go new file mode 100644 index 000000000000..b82133e51332 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SapOpenHubTableDataset{} + +type SapOpenHubTableDataset struct { + TypeProperties SapOpenHubTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapOpenHubTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapOpenHubTableDataset{} + +func (s SapOpenHubTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SapOpenHubTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapOpenHubTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapOpenHubTableDataset: %+v", err) + } + + decoded["type"] = "SapOpenHubTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapOpenHubTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledatasettypeproperties.go new file mode 100644 index 000000000000..0c3b959b8d6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOpenHubTableDatasetTypeProperties struct { + BaseRequestId *int64 `json:"baseRequestId,omitempty"` + ExcludeLastRequest *bool `json:"excludeLastRequest,omitempty"` + OpenHubDestinationName string `json:"openHubDestinationName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go new file mode 100644 index 000000000000..1564b32afe2c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SapTableResourceDataset{} + +type SapTableResourceDataset struct { + TypeProperties SapTableResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapTableResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SapTableResourceDataset{} + +func (s SapTableResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapTableResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapTableResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapTableResourceDataset: %+v", err) + } + + decoded["type"] = "SapTableResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapTableResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedatasettypeproperties.go new file mode 100644 index 000000000000..0fdf801e93ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapTableResourceDatasetTypeProperties struct { + TableName string `json:"tableName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go new file mode 100644 index 000000000000..9a1770b54dfc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ServiceNowObjectDataset{} + +type ServiceNowObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ServiceNowObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ServiceNowObjectDataset{} + +func (s ServiceNowObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ServiceNowObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceNowObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceNowObjectDataset: %+v", err) + } + + decoded["type"] = "ServiceNowObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceNowObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go new file mode 100644 index 000000000000..c8adc0f91d28 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ServiceNowV2ObjectDataset{} + +type ServiceNowV2ObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ServiceNowV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ServiceNowV2ObjectDataset{} + +func (s ServiceNowV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ServiceNowV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceNowV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceNowV2ObjectDataset: %+v", err) + } + + decoded["type"] = "ServiceNowV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceNowV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go new file mode 100644 index 000000000000..2f187f66f143 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go @@ -0,0 +1,53 @@ +package datasets + +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 _ DatasetLocation = SftpLocation{} + +type SftpLocation struct { + + // Fields inherited from DatasetLocation + + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s SftpLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } +} + +var _ json.Marshaler = SftpLocation{} + +func (s SftpLocation) MarshalJSON() ([]byte, error) { + type wrapper SftpLocation + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SftpLocation: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SftpLocation: %+v", err) + } + + decoded["type"] = "SftpLocation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SftpLocation: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistdatasettypeproperties.go new file mode 100644 index 000000000000..a5b5b545e488 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SharePointOnlineListDatasetTypeProperties struct { + ListName *string `json:"listName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go new file mode 100644 index 000000000000..0d546daf3ef3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SharePointOnlineListResourceDataset{} + +type SharePointOnlineListResourceDataset struct { + TypeProperties *SharePointOnlineListDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SharePointOnlineListResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SharePointOnlineListResourceDataset{} + +func (s SharePointOnlineListResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SharePointOnlineListResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SharePointOnlineListResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SharePointOnlineListResourceDataset: %+v", err) + } + + decoded["type"] = "SharePointOnlineListResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SharePointOnlineListResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go new file mode 100644 index 000000000000..ebd3e4bd0fb3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ShopifyObjectDataset{} + +type ShopifyObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ShopifyObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ShopifyObjectDataset{} + +func (s ShopifyObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ShopifyObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ShopifyObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ShopifyObjectDataset: %+v", err) + } + + decoded["type"] = "ShopifyObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ShopifyObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go new file mode 100644 index 000000000000..a6eeb2548309 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SnowflakeDataset{} + +type SnowflakeDataset struct { + TypeProperties SnowflakeDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SnowflakeDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SnowflakeDataset{} + +func (s SnowflakeDataset) MarshalJSON() ([]byte, error) { + type wrapper SnowflakeDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SnowflakeDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SnowflakeDataset: %+v", err) + } + + decoded["type"] = "SnowflakeTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SnowflakeDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedatasettypeproperties.go new file mode 100644 index 000000000000..488840a6add3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go new file mode 100644 index 000000000000..e6a11f830fd6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SnowflakeV2Dataset{} + +type SnowflakeV2Dataset struct { + TypeProperties SnowflakeDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SnowflakeV2Dataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SnowflakeV2Dataset{} + +func (s SnowflakeV2Dataset) MarshalJSON() ([]byte, error) { + type wrapper SnowflakeV2Dataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SnowflakeV2Dataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SnowflakeV2Dataset: %+v", err) + } + + decoded["type"] = "SnowflakeV2Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SnowflakeV2Dataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sparkdatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sparkdatasettypeproperties.go new file mode 100644 index 000000000000..dbb9efc09ab2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sparkdatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SparkDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go new file mode 100644 index 000000000000..7562371e33d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SparkObjectDataset{} + +type SparkObjectDataset struct { + TypeProperties *SparkDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SparkObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SparkObjectDataset{} + +func (s SparkObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SparkObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SparkObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SparkObjectDataset: %+v", err) + } + + decoded["type"] = "SparkObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SparkObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go new file mode 100644 index 000000000000..bc8c4d4836bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SqlServerTableDataset{} + +type SqlServerTableDataset struct { + TypeProperties *SqlServerTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SqlServerTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SqlServerTableDataset{} + +func (s SqlServerTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SqlServerTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SqlServerTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SqlServerTableDataset: %+v", err) + } + + decoded["type"] = "SqlServerTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SqlServerTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledatasettypeproperties.go new file mode 100644 index 000000000000..71c88781311f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlServerTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go new file mode 100644 index 000000000000..48a5421db893 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SquareObjectDataset{} + +type SquareObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SquareObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SquareObjectDataset{} + +func (s SquareObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SquareObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SquareObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SquareObjectDataset: %+v", err) + } + + decoded["type"] = "SquareObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SquareObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go new file mode 100644 index 000000000000..b9031548d453 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = SybaseTableDataset{} + +type SybaseTableDataset struct { + TypeProperties *SybaseTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SybaseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = SybaseTableDataset{} + +func (s SybaseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SybaseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SybaseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SybaseTableDataset: %+v", err) + } + + decoded["type"] = "SybaseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SybaseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledatasettypeproperties.go new file mode 100644 index 000000000000..6102ea4de16e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SybaseTableDatasetTypeProperties struct { + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go new file mode 100644 index 000000000000..01c8be23f9dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = TeradataTableDataset{} + +type TeradataTableDataset struct { + TypeProperties *TeradataTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s TeradataTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = TeradataTableDataset{} + +func (s TeradataTableDataset) MarshalJSON() ([]byte, error) { + type wrapper TeradataTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TeradataTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TeradataTableDataset: %+v", err) + } + + decoded["type"] = "TeradataTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TeradataTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledatasettypeproperties.go new file mode 100644 index 000000000000..2d80800030f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TeradataTableDatasetTypeProperties struct { + Database *string `json:"database,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go new file mode 100644 index 000000000000..858732fa985a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go @@ -0,0 +1,62 @@ +package datasets + +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 _ DatasetStorageFormat = TextFormat{} + +type TextFormat struct { + ColumnDelimiter *string `json:"columnDelimiter,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + EscapeChar *string `json:"escapeChar,omitempty"` + FirstRowAsHeader *bool `json:"firstRowAsHeader,omitempty"` + NullValue *string `json:"nullValue,omitempty"` + QuoteChar *string `json:"quoteChar,omitempty"` + RowDelimiter *string `json:"rowDelimiter,omitempty"` + SkipLineCount *int64 `json:"skipLineCount,omitempty"` + TreatEmptyAsNull *bool `json:"treatEmptyAsNull,omitempty"` + + // Fields inherited from DatasetStorageFormat + + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s TextFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } +} + +var _ json.Marshaler = TextFormat{} + +func (s TextFormat) MarshalJSON() ([]byte, error) { + type wrapper TextFormat + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TextFormat: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TextFormat: %+v", err) + } + + decoded["type"] = "TextFormat" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TextFormat: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_verticadatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_verticadatasettypeproperties.go new file mode 100644 index 000000000000..fb5bf9c63154 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_verticadatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VerticaDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go new file mode 100644 index 000000000000..1b4008c034f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = VerticaTableDataset{} + +type VerticaTableDataset struct { + TypeProperties *VerticaDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s VerticaTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = VerticaTableDataset{} + +func (s VerticaTableDataset) MarshalJSON() ([]byte, error) { + type wrapper VerticaTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling VerticaTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling VerticaTableDataset: %+v", err) + } + + decoded["type"] = "VerticaTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling VerticaTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go new file mode 100644 index 000000000000..c844313d05d3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = WarehouseTableDataset{} + +type WarehouseTableDataset struct { + TypeProperties *WarehouseTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s WarehouseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = WarehouseTableDataset{} + +func (s WarehouseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper WarehouseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WarehouseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WarehouseTableDataset: %+v", err) + } + + decoded["type"] = "WarehouseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WarehouseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledatasettypeproperties.go new file mode 100644 index 000000000000..5018d9ad1749 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WarehouseTableDatasetTypeProperties struct { + Schema *string `json:"schema,omitempty"` + Table *string `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go new file mode 100644 index 000000000000..9b8452e03caf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = WebTableDataset{} + +type WebTableDataset struct { + TypeProperties WebTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s WebTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = WebTableDataset{} + +func (s WebTableDataset) MarshalJSON() ([]byte, error) { + type wrapper WebTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebTableDataset: %+v", err) + } + + decoded["type"] = "WebTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_webtabledatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_webtabledatasettypeproperties.go new file mode 100644 index 000000000000..e6bb12f338bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_webtabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebTableDatasetTypeProperties struct { + Index int64 `json:"index"` + Path *string `json:"path,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go new file mode 100644 index 000000000000..649f70cf1088 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = XeroObjectDataset{} + +type XeroObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s XeroObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = XeroObjectDataset{} + +func (s XeroObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper XeroObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling XeroObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling XeroObjectDataset: %+v", err) + } + + decoded["type"] = "XeroObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling XeroObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go new file mode 100644 index 000000000000..3b5b5fd134bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = XmlDataset{} + +type XmlDataset struct { + TypeProperties *XmlDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s XmlDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = XmlDataset{} + +func (s XmlDataset) MarshalJSON() ([]byte, error) { + type wrapper XmlDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling XmlDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling XmlDataset: %+v", err) + } + + decoded["type"] = "Xml" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling XmlDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go new file mode 100644 index 000000000000..c2a915db64ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go @@ -0,0 +1,48 @@ +package datasets + +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 XmlDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + Location DatasetLocation `json:"location"` + NullValue *string `json:"nullValue,omitempty"` +} + +var _ json.Unmarshaler = &XmlDatasetTypeProperties{} + +func (s *XmlDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + var decoded struct { + Compression *DatasetCompression `json:"compression,omitempty"` + EncodingName *string `json:"encodingName,omitempty"` + NullValue *string `json:"nullValue,omitempty"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.Compression = decoded.Compression + s.EncodingName = decoded.EncodingName + s.NullValue = decoded.NullValue + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling XmlDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := UnmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'XmlDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go new file mode 100644 index 000000000000..ac118afdf16e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go @@ -0,0 +1,64 @@ +package datasets + +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 _ Dataset = ZohoObjectDataset{} + +type ZohoObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ZohoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } +} + +var _ json.Marshaler = ZohoObjectDataset{} + +func (s ZohoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ZohoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ZohoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ZohoObjectDataset: %+v", err) + } + + decoded["type"] = "ZohoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ZohoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/predicates.go new file mode 100644 index 000000000000..43c702bafaf7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/predicates.go @@ -0,0 +1,32 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetResourceOperationPredicate struct { + Etag *string + Id *string + Name *string + Type *string +} + +func (p DatasetResourceOperationPredicate) Matches(input DatasetResource) bool { + + if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + 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/datafactory/2018-06-01/datasets/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/version.go new file mode 100644 index 000000000000..852bb3b75760 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets/version.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2018-06-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/datasets/2018-06-01" +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 434e92d526e9..bde95216a6b9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -438,6 +438,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/refreshset github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/credentials +github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks diff --git a/website/docs/r/data_factory_dataset_cosmosdb_mongoapi.html.markdown b/website/docs/r/data_factory_dataset_cosmosdb_mongoapi.html.markdown new file mode 100644 index 000000000000..d61b33c95079 --- /dev/null +++ b/website/docs/r/data_factory_dataset_cosmosdb_mongoapi.html.markdown @@ -0,0 +1,85 @@ +--- +subcategory: "Data Factory" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_data_factory_dataset_cosmosdb_mongoapi" +description: |- + Manages an Azure Cosmos DB Mongo API Dataset inside an Azure Data Factory. +--- + +# azurerm_data_factory_dataset_cosmosdb_mongoapi + +Manages an Azure Cosmos DB Mongo API Dataset inside an Azure Data Factory. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_data_factory" "example" { + name = "example" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name +} + +resource "azurerm_data_factory_linked_service_cosmosdb_mongoapi" "example" { + name = "example" + data_factory_id = azurerm_data_factory.example.id + connection_string = "mongodb://accname:secretpass@foobar.documents.azure.com:10255" + database = "foo" +} + +resource "azurerm_data_factory_dataset_cosmosdb_mongoapi" "example" { + name = "example" + collection_name = "bar" + data_factory_id = azurerm_data_factory.example.id + linked_service_name = azurerm_data_factory_linked_service_cosmosdb_mongoapi.example.name +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `collection_name` - (Required) The collection name of the Data Factory Dataset Azure Cosmos DB Mongo API. + +* `data_factory_id` - (Required) The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource. + +* `linked_service_name` - (Required) The Data Factory Linked Service name in which to associate the Dataset with. + +* `name` - (Required) Specifies the name of the Data Factory Dataset. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. + +--- + +* `annotations` - (Optional) List of tags that can be used for describing the Data Factory Dataset. + +* `description` - (Optional) The description for the Data Factory Dataset. + +* `folder` - (Optional) The folder that this Dataset is in. If not specified, the Dataset will appear at the root level. + +* `parameters` - (Optional) A map of string key-value pairs of parameters to associate with the Data Factory Dataset. Only string parameter type is supported at the moment. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Data Factory Dataset CosmosDB Mongo API. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions: + +* `create` - (Defaults to 30 minutes) Used when creating the Data Factory Dataset CosmosDB Mongo API. +* `read` - (Defaults to 30 minutes) Used when retrieving the Data Factory Dataset CosmosDB Mongo API. +* `update` - (Defaults to 5 minutes) Used when updating the Data Factory Dataset CosmosDB Mongo API. +* `delete` - (Defaults to 30 minutes) Used when deleting the Data Factory Dataset CosmosDB Mongo API. + +## Import + +Data Factory Dataset CosmosDB Mongo APIs can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_data_factory_dataset_cosmosdb_mongoapi.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/datasets/example +```