diff --git a/internal/services/logic/client/client.go b/internal/services/logic/client/client.go index a93288b8f94d..a10c1e0bbfcc 100644 --- a/internal/services/logic/client/client.go +++ b/internal/services/logic/client/client.go @@ -1,60 +1,71 @@ package client import ( - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - IntegrationAccountClient *logic.IntegrationAccountsClient - IntegrationAccountAgreementClient *logic.IntegrationAccountAgreementsClient - IntegrationAccountAssemblyClient *logic.IntegrationAccountAssembliesClient - IntegrationAccountBatchConfigurationClient *logic.IntegrationAccountBatchConfigurationsClient - IntegrationAccountCertificateClient *logic.IntegrationAccountCertificatesClient - IntegrationAccountMapClient *logic.IntegrationAccountMapsClient - IntegrationAccountPartnerClient *logic.IntegrationAccountPartnersClient - IntegrationAccountSchemaClient *logic.IntegrationAccountSchemasClient - IntegrationAccountSessionClient *logic.IntegrationAccountSessionsClient - IntegrationServiceEnvironmentClient *logic.IntegrationServiceEnvironmentsClient - WorkflowClient *logic.WorkflowsClient - TriggersClient *logic.WorkflowTriggersClient + IntegrationAccountClient *integrationaccounts.IntegrationAccountsClient + IntegrationAccountAgreementClient *integrationaccountagreements.IntegrationAccountAgreementsClient + IntegrationAccountAssemblyClient *integrationaccountassemblies.IntegrationAccountAssembliesClient + IntegrationAccountBatchConfigurationClient *integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient + IntegrationAccountCertificateClient *integrationaccountcertificates.IntegrationAccountCertificatesClient + IntegrationAccountMapClient *integrationaccountmaps.IntegrationAccountMapsClient + IntegrationAccountPartnerClient *integrationaccountpartners.IntegrationAccountPartnersClient + IntegrationAccountSchemaClient *integrationaccountschemas.IntegrationAccountSchemasClient + IntegrationAccountSessionClient *integrationaccountsessions.IntegrationAccountSessionsClient + IntegrationServiceEnvironmentClient *integrationserviceenvironments.IntegrationServiceEnvironmentsClient + WorkflowClient *workflows.WorkflowsClient + TriggersClient *workflowtriggers.WorkflowTriggersClient } func NewClient(o *common.ClientOptions) *Client { - integrationAccountClient := logic.NewIntegrationAccountsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountClient := integrationaccounts.NewIntegrationAccountsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountClient.Client, o.ResourceManagerAuthorizer) - integrationAccountAgreementClient := logic.NewIntegrationAccountAgreementsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountAgreementClient := integrationaccountagreements.NewIntegrationAccountAgreementsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountAgreementClient.Client, o.ResourceManagerAuthorizer) - integrationAccountAssemblyClient := logic.NewIntegrationAccountAssembliesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountAssemblyClient := integrationaccountassemblies.NewIntegrationAccountAssembliesClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountAssemblyClient.Client, o.ResourceManagerAuthorizer) - integrationAccountBatchConfigurationClient := logic.NewIntegrationAccountBatchConfigurationsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountBatchConfigurationClient := integrationaccountbatchconfigurations.NewIntegrationAccountBatchConfigurationsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountBatchConfigurationClient.Client, o.ResourceManagerAuthorizer) - integrationAccountCertificateClient := logic.NewIntegrationAccountCertificatesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountCertificateClient := integrationaccountcertificates.NewIntegrationAccountCertificatesClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountCertificateClient.Client, o.ResourceManagerAuthorizer) - integrationAccountMapClient := logic.NewIntegrationAccountMapsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountMapClient := integrationaccountmaps.NewIntegrationAccountMapsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountMapClient.Client, o.ResourceManagerAuthorizer) - integrationAccountPartnerClient := logic.NewIntegrationAccountPartnersClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountPartnerClient := integrationaccountpartners.NewIntegrationAccountPartnersClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountPartnerClient.Client, o.ResourceManagerAuthorizer) - integrationAccountSchemaClient := logic.NewIntegrationAccountSchemasClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountSchemaClient := integrationaccountschemas.NewIntegrationAccountSchemasClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountSchemaClient.Client, o.ResourceManagerAuthorizer) - integrationAccountSessionClient := logic.NewIntegrationAccountSessionsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationAccountSessionClient := integrationaccountsessions.NewIntegrationAccountSessionsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationAccountSessionClient.Client, o.ResourceManagerAuthorizer) - integrationServiceEnvironmentClient := logic.NewIntegrationServiceEnvironmentsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + integrationServiceEnvironmentClient := integrationserviceenvironments.NewIntegrationServiceEnvironmentsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&integrationServiceEnvironmentClient.Client, o.ResourceManagerAuthorizer) - workflowClient := logic.NewWorkflowsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + workflowClient := workflows.NewWorkflowsClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&workflowClient.Client, o.ResourceManagerAuthorizer) - triggersClient := logic.NewWorkflowTriggersClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + triggersClient := workflowtriggers.NewWorkflowTriggersClientWithBaseURI(o.ResourceManagerEndpoint) o.ConfigureClient(&triggersClient.Client, o.ResourceManagerAuthorizer) return &Client{ diff --git a/internal/services/logic/integration_service_environment.go b/internal/services/logic/integration_service_environment.go index 24119e6752b3..106877cb49ec 100644 --- a/internal/services/logic/integration_service_environment.go +++ b/internal/services/logic/integration_service_environment.go @@ -8,17 +8,17 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" networkParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/parse" networkValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -35,7 +35,7 @@ func resourceIntegrationServiceEnvironment() *pluginsdk.Resource { DeprecationMessage: "The \"azurerm_integrated_service_environment\" resource is deprecated and will be removed in v4.0 of the Azure Provider. The underlying Azure Service is being retired on 2024-08-31 and new instances cannot be provisioned by default after 2022-11-01. More information on the retirement and how to migrate to Logic Apps Standard (\"azurerm_logic_app_standard\") can be found here: https://aka.ms/isedeprecation.", Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationServiceEnvironmentID(id) + _, err := integrationserviceenvironments.ParseIntegrationServiceEnvironmentID(id) return err }), @@ -85,8 +85,8 @@ func resourceIntegrationServiceEnvironment() *pluginsdk.Resource { Required: true, ForceNew: true, // The access end point type cannot be changed once the integration service environment is provisioned. ValidateFunc: validation.StringInSlice([]string{ - string(logic.IntegrationServiceEnvironmentAccessEndpointTypeInternal), - string(logic.IntegrationServiceEnvironmentAccessEndpointTypeExternal), + string(integrationserviceenvironments.IntegrationServiceEnvironmentAccessEndpointTypeInternal), + string(integrationserviceenvironments.IntegrationServiceEnvironmentAccessEndpointTypeExternal), }, false), }, @@ -126,7 +126,7 @@ func resourceIntegrationServiceEnvironment() *pluginsdk.Resource { Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, }, - "tags": tags.Schema(), + "tags": commonschema.Tags(), }, CustomizeDiff: pluginsdk.CustomDiffWithAll( @@ -148,23 +148,23 @@ func resourceIntegrationServiceEnvironmentCreateUpdate(d *pluginsdk.ResourceData log.Printf("[INFO] preparing arguments for Azure ARM Integration Service Environment creation.") - id := parse.NewIntegrationServiceEnvironmentID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + id := integrationserviceenvironments.NewIntegrationServiceEnvironmentID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for existing %s: %s", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_integration_service_environment", id.ID()) } } location := azure.NormalizeLocation(d.Get("location").(string)) - accessEndpointType := d.Get("access_endpoint_type").(string) + accessEndpointType := integrationserviceenvironments.IntegrationServiceEnvironmentAccessEndpointType(d.Get("access_endpoint_type").(string)) virtualNetworkSubnetIds := d.Get("virtual_network_subnet_ids").(*pluginsdk.Set).List() t := d.Get("tags").(map[string]interface{}) @@ -173,13 +173,13 @@ func resourceIntegrationServiceEnvironmentCreateUpdate(d *pluginsdk.ResourceData return fmt.Errorf("expanding `sku_name` for %s: %v", id, err) } - integrationServiceEnvironment := logic.IntegrationServiceEnvironment{ - Name: &id.Name, + integrationServiceEnvironment := integrationserviceenvironments.IntegrationServiceEnvironment{ + Name: &id.IntegrationServiceEnvironmentName, Location: &location, - Properties: &logic.IntegrationServiceEnvironmentProperties{ - NetworkConfiguration: &logic.NetworkConfiguration{ - AccessEndpoint: &logic.IntegrationServiceEnvironmentAccessEndpoint{ - Type: logic.IntegrationServiceEnvironmentAccessEndpointType(accessEndpointType), + Properties: &integrationserviceenvironments.IntegrationServiceEnvironmentProperties{ + NetworkConfiguration: &integrationserviceenvironments.NetworkConfiguration{ + AccessEndpoint: &integrationserviceenvironments.IntegrationServiceEnvironmentAccessEndpoint{ + Type: &accessEndpointType, }, Subnets: expandSubnetResourceID(virtualNetworkSubnetIds), }, @@ -188,15 +188,10 @@ func resourceIntegrationServiceEnvironmentCreateUpdate(d *pluginsdk.ResourceData Tags: tags.Expand(t), } - future, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, integrationServiceEnvironment) - if err != nil { + if err = client.CreateOrUpdateThenPoll(ctx, id, integrationServiceEnvironment); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } - if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { - return fmt.Errorf("waiting for completion of %s: %+v", id, err) - } - d.SetId(id.ID()) return resourceIntegrationServiceEnvironmentRead(d, meta) @@ -207,58 +202,60 @@ func resourceIntegrationServiceEnvironmentRead(d *pluginsdk.ResourceData, meta i ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationServiceEnvironmentID(d.Id()) + id, err := integrationserviceenvironments.ParseIntegrationServiceEnvironmentID(d.Id()) if err != nil { return err } - name := id.Name - resourceGroup := id.ResourceGroup - - resp, err := client.Get(ctx, resourceGroup, name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { d.SetId("") return nil } - return fmt.Errorf("retrieving Integration Service Environment %q (Resource Group %q): %+v", name, resourceGroup, err) + return fmt.Errorf("retrieving %s: %+v", id.ID(), err) } - d.Set("name", name) - d.Set("resource_group_name", resourceGroup) - d.Set("location", location.NormalizeNilable(resp.Location)) + d.Set("name", id.IntegrationServiceEnvironmentName) + d.Set("resource_group_name", id.ResourceGroup) - if err := d.Set("sku_name", flattenIntegrationServiceEnvironmentSkuName(resp.Sku)); err != nil { - return fmt.Errorf("setting `sku_name`: %+v", err) - } + if model := resp.Model; model != nil { + d.Set("location", location.NormalizeNilable(model.Location)) - if props := resp.Properties; props != nil { - if netCfg := props.NetworkConfiguration; netCfg != nil { - if accessEndpoint := netCfg.AccessEndpoint; accessEndpoint != nil { - d.Set("access_endpoint_type", accessEndpoint.Type) + if err := d.Set("sku_name", flattenIntegrationServiceEnvironmentSkuName(model.Sku)); err != nil { + return fmt.Errorf("setting `sku_name`: %+v", err) + } + + if props := model.Properties; props != nil { + if netCfg := props.NetworkConfiguration; netCfg != nil { + if accessEndpoint := netCfg.AccessEndpoint; accessEndpoint != nil { + d.Set("access_endpoint_type", accessEndpoint.Type) + } + + d.Set("virtual_network_subnet_ids", flattenSubnetResourceID(netCfg.Subnets)) } - d.Set("virtual_network_subnet_ids", flattenSubnetResourceID(netCfg.Subnets)) - } + if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Connector == nil { + d.Set("connector_endpoint_ip_addresses", []interface{}{}) + d.Set("connector_outbound_ip_addresses", []interface{}{}) + } else { + d.Set("connector_endpoint_ip_addresses", flattenServiceEnvironmentIPAddresses(props.EndpointsConfiguration.Connector.AccessEndpointIPAddresses)) + d.Set("connector_outbound_ip_addresses", flattenServiceEnvironmentIPAddresses(props.EndpointsConfiguration.Connector.OutgoingIPAddresses)) + } - if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Connector == nil { - d.Set("connector_endpoint_ip_addresses", []interface{}{}) - d.Set("connector_outbound_ip_addresses", []interface{}{}) - } else { - d.Set("connector_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.AccessEndpointIPAddresses)) - d.Set("connector_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.OutgoingIPAddresses)) + if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Workflow == nil { + d.Set("workflow_endpoint_ip_addresses", []interface{}{}) + d.Set("workflow_outbound_ip_addresses", []interface{}{}) + } else { + d.Set("workflow_endpoint_ip_addresses", flattenServiceEnvironmentIPAddresses(props.EndpointsConfiguration.Workflow.AccessEndpointIPAddresses)) + d.Set("workflow_outbound_ip_addresses", flattenServiceEnvironmentIPAddresses(props.EndpointsConfiguration.Workflow.OutgoingIPAddresses)) + } } - if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Workflow == nil { - d.Set("workflow_endpoint_ip_addresses", []interface{}{}) - d.Set("workflow_outbound_ip_addresses", []interface{}{}) - } else { - d.Set("workflow_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.AccessEndpointIPAddresses)) - d.Set("workflow_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.OutgoingIPAddresses)) - } + return tags.FlattenAndSet(d, model.Tags) } - return tags.FlattenAndSet(d, resp.Tags) + return nil } func resourceIntegrationServiceEnvironmentDelete(d *pluginsdk.ResourceData, meta interface{}) error { @@ -266,24 +263,21 @@ func resourceIntegrationServiceEnvironmentDelete(d *pluginsdk.ResourceData, meta ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationServiceEnvironmentID(d.Id()) + id, err := integrationserviceenvironments.ParseIntegrationServiceEnvironmentID(d.Id()) if err != nil { return fmt.Errorf("parsing Integration Service Environment ID `%q`: %+v", d.Id(), err) } - name := id.Name - resourceGroup := id.ResourceGroup - - resp, err := client.Get(ctx, resourceGroup, name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return nil } - return fmt.Errorf("retrieving Integration Service Environment %q (Resource Group %q): %+v", name, resourceGroup, err) + return fmt.Errorf("retrieving %s: %+v", id.ID(), err) } // Get subnet IDs before delete - subnetIDs := getSubnetIDs(&resp) + subnetIDs := getSubnetIDs(resp.Model) // Not optimal behaviour for now // It deletes synchronously and resource is not available anymore after return from delete operation @@ -292,17 +286,17 @@ func resourceIntegrationServiceEnvironmentDelete(d *pluginsdk.ResourceData, meta // If the operation fails we are lost. We do not have original resource and we cannot resume delete operation. // User has to wait for completion of delete operation in the background. // It would be great to have async call with future struct - if resp, err := client.Delete(ctx, resourceGroup, name); err != nil { - if utils.ResponseWasNotFound(resp) { + if resp, err := client.Delete(ctx, *id); err != nil { + if response.WasNotFound(resp.HttpResponse) { return nil } - return fmt.Errorf("deleting Integration Service Environment %q (Resource Group %q): %+v", name, resourceGroup, err) + return fmt.Errorf("deleting %s: %+v", id.ID(), err) } stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{string(logic.WorkflowProvisioningStateDeleting)}, - Target: []string{string(logic.WorkflowProvisioningStateDeleted)}, + Pending: []string{string(integrationserviceenvironments.WorkflowProvisioningStateDeleting)}, + Target: []string{string(integrationserviceenvironments.WorkflowProvisioningStateDeleted)}, MinTimeout: 5 * time.Minute, Refresh: integrationServiceEnvironmentDeleteStateRefreshFunc(ctx, meta.(*clients.Client), d.Id(), subnetIDs), Timeout: d.Timeout(pluginsdk.TimeoutDelete), @@ -311,32 +305,37 @@ func resourceIntegrationServiceEnvironmentDelete(d *pluginsdk.ResourceData, meta } if _, err := stateConf.WaitForStateContext(ctx); err != nil { - return fmt.Errorf("waiting for deletion of Integration Service Environment %q (Resource Group %q): %+v", name, resourceGroup, err) + return fmt.Errorf("waiting for deletion of %s: %+v", id.ID(), err) } return nil } -func flattenIntegrationServiceEnvironmentSkuName(input *logic.IntegrationServiceEnvironmentSku) string { +func flattenIntegrationServiceEnvironmentSkuName(input *integrationserviceenvironments.IntegrationServiceEnvironmentSku) string { if input == nil { return "" } - return fmt.Sprintf("%s_%d", string(input.Name), *input.Capacity) + name := "" + if input.Name != nil { + name = string(*input.Name) + } + + return fmt.Sprintf("%s_%d", name, *input.Capacity) } -func expandIntegrationServiceEnvironmentSkuName(skuName string) (*logic.IntegrationServiceEnvironmentSku, error) { +func expandIntegrationServiceEnvironmentSkuName(skuName string) (*integrationserviceenvironments.IntegrationServiceEnvironmentSku, error) { parts := strings.Split(skuName, "_") if len(parts) != 2 { return nil, fmt.Errorf("sku_name (%s) has the wrong number of parts (%d) after splitting on _", skuName, len(parts)) } - var sku logic.IntegrationServiceEnvironmentSkuName + var sku integrationserviceenvironments.IntegrationServiceEnvironmentSkuName switch parts[0] { - case string(logic.IntegrationServiceEnvironmentSkuNameDeveloper): - sku = logic.IntegrationServiceEnvironmentSkuNameDeveloper - case string(logic.IntegrationServiceEnvironmentSkuNamePremium): - sku = logic.IntegrationServiceEnvironmentSkuNamePremium + case string(integrationserviceenvironments.IntegrationServiceEnvironmentSkuNameDeveloper): + sku = integrationserviceenvironments.IntegrationServiceEnvironmentSkuNameDeveloper + case string(integrationserviceenvironments.IntegrationServiceEnvironmentSkuNamePremium): + sku = integrationserviceenvironments.IntegrationServiceEnvironmentSkuNamePremium default: return nil, fmt.Errorf("sku_name %s has unknown sku %s", skuName, parts[0]) } @@ -346,44 +345,44 @@ func expandIntegrationServiceEnvironmentSkuName(skuName string) (*logic.Integrat return nil, fmt.Errorf("cannot convert sku_name %s capacity %s to int", skuName, parts[1]) } - if sku != logic.IntegrationServiceEnvironmentSkuNamePremium && capacity > 0 { + if sku != integrationserviceenvironments.IntegrationServiceEnvironmentSkuNamePremium && capacity > 0 { return nil, fmt.Errorf("`capacity` can only be greater than zero for `sku_name` `Premium`") } - return &logic.IntegrationServiceEnvironmentSku{ - Name: sku, - Capacity: utils.Int32(int32(capacity)), + return &integrationserviceenvironments.IntegrationServiceEnvironmentSku{ + Name: &sku, + Capacity: utils.Int64(int64(capacity)), }, nil } -func expandSubnetResourceID(input []interface{}) *[]logic.ResourceReference { - results := make([]logic.ResourceReference, 0) +func expandSubnetResourceID(input []interface{}) *[]integrationserviceenvironments.ResourceReference { + results := make([]integrationserviceenvironments.ResourceReference, 0) for _, item := range input { - results = append(results, logic.ResourceReference{ - ID: utils.String(item.(string)), + results = append(results, integrationserviceenvironments.ResourceReference{ + Id: utils.String(item.(string)), }) } return &results } -func flattenSubnetResourceID(input *[]logic.ResourceReference) []interface{} { +func flattenSubnetResourceID(input *[]integrationserviceenvironments.ResourceReference) []interface{} { subnetIDs := make([]interface{}, 0) if input == nil { return subnetIDs } for _, resourceRef := range *input { - if resourceRef.ID == nil || *resourceRef.ID == "" { + if resourceRef.Id == nil || *resourceRef.Id == "" { continue } - subnetIDs = append(subnetIDs, resourceRef.ID) + subnetIDs = append(subnetIDs, resourceRef.Id) } return subnetIDs } -func getSubnetIDs(input *logic.IntegrationServiceEnvironment) []interface{} { +func getSubnetIDs(input *integrationserviceenvironments.IntegrationServiceEnvironment) []interface{} { results := make([]interface{}, 0) if input == nil { return results @@ -402,14 +401,14 @@ func integrationServiceEnvironmentDeleteStateRefreshFunc(ctx context.Context, cl return func() (interface{}, string, error) { linkExists, err := linkExists(ctx, client, iseID, subnetIDs) if err != nil { - return string(logic.WorkflowProvisioningStateDeleting), string(logic.WorkflowProvisioningStateDeleting), err + return string(integrationserviceenvironments.WorkflowProvisioningStateDeleting), string(integrationserviceenvironments.WorkflowProvisioningStateDeleting), err } if linkExists { - return string(logic.WorkflowProvisioningStateDeleting), string(logic.WorkflowProvisioningStateDeleting), nil + return string(integrationserviceenvironments.WorkflowProvisioningStateDeleting), string(integrationserviceenvironments.WorkflowProvisioningStateDeleting), nil } - return string(logic.WorkflowProvisioningStateDeleted), string(logic.WorkflowProvisioningStateDeleted), nil + return string(integrationserviceenvironments.WorkflowProvisioningStateDeleted), string(integrationserviceenvironments.WorkflowProvisioningStateDeleted), nil } } @@ -495,3 +494,15 @@ func resourceNavigationLinkExists(ctx context.Context, client *network.ResourceN return false, nil } + +func flattenServiceEnvironmentIPAddresses(input *[]integrationserviceenvironments.IPAddress) []interface{} { + if input == nil { + return []interface{}{} + } + + var addresses []interface{} + for _, addr := range *input { + addresses = append(addresses, *addr.Address) + } + return addresses +} diff --git a/internal/services/logic/integration_service_environment_resource_test.go b/internal/services/logic/integration_service_environment_resource_test.go index e65d0779e396..427cc7809cd7 100644 --- a/internal/services/logic/integration_service_environment_resource_test.go +++ b/internal/services/logic/integration_service_environment_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -184,17 +184,17 @@ func TestAccIntegrationServiceEnvironment_requiresImport(t *testing.T) { } func (IntegrationServiceEnvironmentResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationServiceEnvironmentID(state.ID) + id, err := integrationserviceenvironments.ParseIntegrationServiceEnvironmentID(state.ID) if err != nil { return nil, err } - resp, err := clients.Logic.IntegrationServiceEnvironmentClient.Get(ctx, id.ResourceGroup, id.Name) + resp, err := clients.Logic.IntegrationServiceEnvironmentClient.Get(ctx, *id) if err != nil { - return nil, fmt.Errorf("retrieving Integration Service Environment %s (resource group: %s): %v", id.Name, id.ResourceGroup, err) + return nil, fmt.Errorf("retrieving %s: %v", id.ID(), err) } - return utils.Bool(resp.Properties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (IntegrationServiceEnvironmentResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_action_custom_resource.go b/internal/services/logic/logic_app_action_custom_resource.go index 26a9b09dfc4b..0d03a57391af 100644 --- a/internal/services/logic/logic_app_action_custom_resource.go +++ b/internal/services/logic/logic_app_action_custom_resource.go @@ -6,6 +6,7 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -56,12 +57,12 @@ func resourceLogicAppActionCustom() *pluginsdk.Resource { } func resourceLogicAppActionCustomCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - workflowId, err := parse.WorkflowID(d.Get("logic_app_id").(string)) + workflowId, err := workflows.ParseWorkflowID(d.Get("logic_app_id").(string)) if err != nil { return err } - id := parse.NewActionID(workflowId.SubscriptionId, workflowId.ResourceGroup, workflowId.Name, d.Get("name").(string)) + id := parse.NewActionID(workflowId.SubscriptionId, workflowId.ResourceGroupName, workflowId.WorkflowName, d.Get("name").(string)) bodyRaw := d.Get("body").(string) @@ -83,7 +84,9 @@ func resourceLogicAppActionCustomRead(d *pluginsdk.ResourceData, meta interface{ return err } - t, app, err := retrieveLogicAppAction(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroup, id.WorkflowName) + + t, app, err := retrieveLogicAppAction(d, meta, workflowId, id.Name) if err != nil { return err } @@ -97,7 +100,7 @@ func resourceLogicAppActionCustomRead(d *pluginsdk.ResourceData, meta interface{ action := *t d.Set("name", id.Name) - d.Set("logic_app_id", app.ID) + d.Set("logic_app_id", app.Id) body, err := json.Marshal(action) if err != nil { @@ -117,7 +120,9 @@ func resourceLogicAppActionCustomDelete(d *pluginsdk.ResourceData, meta interfac return err } - err = resourceLogicAppActionRemove(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroup, id.WorkflowName) + + err = resourceLogicAppActionRemove(d, meta, workflowId, id.Name) if err != nil { return fmt.Errorf("removing Action %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_action_http_resource.go b/internal/services/logic/logic_app_action_http_resource.go index 25b763b2429e..dafe2426db6d 100644 --- a/internal/services/logic/logic_app_action_http_resource.go +++ b/internal/services/logic/logic_app_action_http_resource.go @@ -8,7 +8,8 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" @@ -108,10 +109,10 @@ func resourceLogicAppActionHTTP() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(logic.WorkflowStatusSucceeded), - string(logic.WorkflowStatusFailed), - string(logic.WorkflowStatusSkipped), - string(logic.WorkflowStatusTimedOut), + string(workflowrunactions.WorkflowStatusSucceeded), + string(workflowrunactions.WorkflowStatusFailed), + string(workflowrunactions.WorkflowStatusSkipped), + string(workflowrunactions.WorkflowStatusTimedOut), }, false), }, }, @@ -122,12 +123,12 @@ func resourceLogicAppActionHTTP() *pluginsdk.Resource { } func resourceLogicAppActionHTTPCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - workflowId, err := parse.WorkflowID(d.Get("logic_app_id").(string)) + workflowId, err := workflows.ParseWorkflowID(d.Get("logic_app_id").(string)) if err != nil { return err } - id := parse.NewActionID(workflowId.SubscriptionId, workflowId.ResourceGroup, workflowId.Name, d.Get("name").(string)) + id := parse.NewActionID(workflowId.SubscriptionId, workflowId.ResourceGroupName, workflowId.WorkflowName, d.Get("name").(string)) headersRaw := d.Get("headers").(map[string]interface{}) headers, err := expandLogicAppActionHttpHeaders(headersRaw) @@ -185,7 +186,9 @@ func resourceLogicAppActionHTTPRead(d *pluginsdk.ResourceData, meta interface{}) return err } - t, app, err := retrieveLogicAppAction(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroup, id.WorkflowName) + + t, app, err := retrieveLogicAppAction(d, meta, workflowId, id.Name) if err != nil { return err } @@ -199,7 +202,7 @@ func resourceLogicAppActionHTTPRead(d *pluginsdk.ResourceData, meta interface{}) action := *t d.Set("name", id.Name) - d.Set("logic_app_id", app.ID) + d.Set("logic_app_id", app.Id) actionType := action["type"].(string) if !strings.EqualFold(actionType, "http") { @@ -272,7 +275,9 @@ func resourceLogicAppActionHTTPDelete(d *pluginsdk.ResourceData, meta interface{ return err } - err = resourceLogicAppActionRemove(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroup, id.WorkflowName) + + err = resourceLogicAppActionRemove(d, meta, workflowId, id.Name) if err != nil { return fmt.Errorf("removing Action %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_integration_account_agreement_resource.go b/internal/services/logic/logic_app_integration_account_agreement_resource.go index 13973e85dbdc..7cf2b1ba4c03 100644 --- a/internal/services/logic/logic_app_integration_account_agreement_resource.go +++ b/internal/services/logic/logic_app_integration_account_agreement_resource.go @@ -6,16 +6,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceLogicAppIntegrationAccountAgreement() *pluginsdk.Resource { @@ -33,7 +32,7 @@ func resourceLogicAppIntegrationAccountAgreement() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountAgreementID(id) + _, err := integrationaccountagreements.ParseAgreementID(id) return err }), @@ -58,9 +57,9 @@ func resourceLogicAppIntegrationAccountAgreement() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(logic.AgreementTypeAS2), - string(logic.AgreementTypeX12), - string(logic.AgreementTypeEdifact), + string(integrationaccountagreements.AgreementTypeASTwo), + string(integrationaccountagreements.AgreementTypeXOneTwo), + string(integrationaccountagreements.AgreementTypeEdifact), }, false), }, @@ -143,43 +142,42 @@ func resourceLogicAppIntegrationAccountAgreementCreateUpdate(d *pluginsdk.Resour ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountAgreementID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountagreements.NewAgreementID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AgreementName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_agreement", id.ID()) } } - agreementContent := logic.AgreementContent{} + agreementContent := integrationaccountagreements.AgreementContent{} content := d.Get("content").(string) if err := json.Unmarshal([]byte(content), &agreementContent); err != nil { return fmt.Errorf("parsing JSON: %+v", err) } - parameters := logic.IntegrationAccountAgreement{ - IntegrationAccountAgreementProperties: &logic.IntegrationAccountAgreementProperties{ - AgreementType: logic.AgreementType(d.Get("agreement_type").(string)), + parameters := integrationaccountagreements.IntegrationAccountAgreement{ + Properties: integrationaccountagreements.IntegrationAccountAgreementProperties{ + AgreementType: integrationaccountagreements.AgreementType(d.Get("agreement_type").(string)), GuestIdentity: expandIntegrationAccountAgreementBusinessIdentity(d.Get("guest_identity").([]interface{})), - GuestPartner: utils.String(d.Get("guest_partner_name").(string)), + GuestPartner: d.Get("guest_partner_name").(string), HostIdentity: expandIntegrationAccountAgreementBusinessIdentity(d.Get("host_identity").([]interface{})), - HostPartner: utils.String(d.Get("host_partner_name").(string)), - Content: &agreementContent, + HostPartner: d.Get("host_partner_name").(string), + Content: agreementContent, }, } if v, ok := d.GetOk("metadata"); ok { - metadata := v.(map[string]interface{}) - parameters.IntegrationAccountAgreementProperties.Metadata = &metadata + parameters.Properties.Metadata = &v } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AgreementName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -192,14 +190,14 @@ func resourceLogicAppIntegrationAccountAgreementRead(d *pluginsdk.ResourceData, ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountAgreementID(d.Id()) + id, err := integrationaccountagreements.ParseAgreementID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AgreementName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -208,21 +206,21 @@ func resourceLogicAppIntegrationAccountAgreementRead(d *pluginsdk.ResourceData, } d.Set("name", id.AgreementName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.IntegrationAccountAgreementProperties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties + d.Set("agreement_type", props.AgreementType) d.Set("guest_partner_name", props.GuestPartner) d.Set("host_partner_name", props.HostPartner) - if props.Content != nil { - content, err := json.Marshal(props.Content) - if err != nil { - return err - } - d.Set("content", string(content)) + content, err := json.Marshal(props.Content) + if err != nil { + return err } + d.Set("content", string(content)) if err := d.Set("guest_identity", flattenIntegrationAccountAgreementBusinessIdentity(props.GuestIdentity)); err != nil { return fmt.Errorf("setting `guest_identity`: %+v", err) @@ -233,10 +231,11 @@ func resourceLogicAppIntegrationAccountAgreementRead(d *pluginsdk.ResourceData, } if props.Metadata != nil { - metadata := props.Metadata.(map[string]interface{}) - d.Set("metadata", metadata) + d.Set("metadata", props.Metadata) } + } + return nil } @@ -245,49 +244,35 @@ func resourceLogicAppIntegrationAccountAgreementDelete(d *pluginsdk.ResourceData ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountAgreementID(d.Id()) + id, err := integrationaccountagreements.ParseAgreementID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AgreementName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } return nil } -func expandIntegrationAccountAgreementBusinessIdentity(input []interface{}) *logic.BusinessIdentity { +func expandIntegrationAccountAgreementBusinessIdentity(input []interface{}) integrationaccountagreements.BusinessIdentity { if len(input) == 0 { - return nil + return integrationaccountagreements.BusinessIdentity{} } v := input[0].(map[string]interface{}) - return &logic.BusinessIdentity{ - Qualifier: utils.String(v["qualifier"].(string)), - Value: utils.String(v["value"].(string)), + return integrationaccountagreements.BusinessIdentity{ + Qualifier: v["qualifier"].(string), + Value: v["value"].(string), } } -func flattenIntegrationAccountAgreementBusinessIdentity(input *logic.BusinessIdentity) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var qualifier string - if input.Qualifier != nil { - qualifier = *input.Qualifier - } - - var value string - if input.Value != nil { - value = *input.Value - } - +func flattenIntegrationAccountAgreementBusinessIdentity(input integrationaccountagreements.BusinessIdentity) []interface{} { return []interface{}{ map[string]interface{}{ - "qualifier": qualifier, - "value": value, + "qualifier": input.Qualifier, + "value": input.Value, }, } } diff --git a/internal/services/logic/logic_app_integration_account_agreement_resource_test.go b/internal/services/logic/logic_app_integration_account_agreement_resource_test.go index abac029ed948..f8a93db7fd13 100644 --- a/internal/services/logic/logic_app_integration_account_agreement_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_agreement_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -83,18 +84,18 @@ func TestAccLogicAppIntegrationAccountAgreement_update(t *testing.T) { } func (r LogicAppIntegrationAccountAgreementResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountAgreementID(state.ID) + id, err := integrationaccountagreements.ParseAgreementID(state.ID) if err != nil { return nil, err } - resp, err := client.Logic.IntegrationAccountAgreementClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AgreementName) + resp, err := client.Logic.IntegrationAccountAgreementClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %q %+v", id, err) } - return utils.Bool(resp.IntegrationAccountAgreementProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountAgreementResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_assembly_resource.go b/internal/services/logic/logic_app_integration_account_assembly_resource.go index 6085ab57cdc4..66e61815c897 100644 --- a/internal/services/logic/logic_app_integration_account_assembly_resource.go +++ b/internal/services/logic/logic_app_integration_account_assembly_resource.go @@ -5,11 +5,11 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -32,7 +32,7 @@ func resourceLogicAppIntegrationAccountAssembly() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountAssemblyID(id) + _, err := integrationaccountassemblies.ParseAssemblyID(id) return err }), @@ -98,44 +98,43 @@ func resourceLogicAppIntegrationAccountAssemblyCreateUpdate(d *pluginsdk.Resourc ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountAssemblyID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountassemblies.NewAssemblyID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AssemblyName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_assembly", id.ID()) } } - parameters := logic.AssemblyDefinition{ - Properties: &logic.AssemblyProperties{ - AssemblyName: utils.String(d.Get("assembly_name").(string)), + parameters := integrationaccountassemblies.AssemblyDefinition{ + Properties: integrationaccountassemblies.AssemblyProperties{ + AssemblyName: d.Get("assembly_name").(string), AssemblyVersion: utils.String(d.Get("assembly_version").(string)), ContentType: utils.String("application/octet-stream"), }, } if v, ok := d.GetOk("content"); ok { - parameters.Properties.Content = utils.String(v.(string)) + parameters.Properties.Content = &v } if v, ok := d.GetOk("content_link_uri"); ok { - parameters.Properties.ContentLink = &logic.ContentLink{ - URI: utils.String(v.(string)), + parameters.Properties.ContentLink = &integrationaccountassemblies.ContentLink{ + Uri: utils.String(v.(string)), } } if v, ok := d.GetOk("metadata"); ok { - metadata := v.(map[string]interface{}) - parameters.Properties.Metadata = &metadata + parameters.Properties.Metadata = &v } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AssemblyName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -148,14 +147,14 @@ func resourceLogicAppIntegrationAccountAssemblyRead(d *pluginsdk.ResourceData, m ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountAssemblyID(d.Id()) + id, err := integrationaccountassemblies.ParseAssemblyID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AssemblyName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -164,19 +163,20 @@ func resourceLogicAppIntegrationAccountAssemblyRead(d *pluginsdk.ResourceData, m } d.Set("name", id.AssemblyName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.Properties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties d.Set("assembly_name", props.AssemblyName) d.Set("assembly_version", props.AssemblyVersion) d.Set("content_link_uri", d.Get("content_link_uri").(string)) d.Set("content", d.Get("content").(string)) if props.Metadata != nil { - metadata := props.Metadata.(map[string]interface{}) - d.Set("metadata", metadata) + d.Set("metadata", props.Metadata) } + } return nil @@ -187,12 +187,12 @@ func resourceLogicAppIntegrationAccountAssemblyDelete(d *pluginsdk.ResourceData, ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountAssemblyID(d.Id()) + id, err := integrationaccountassemblies.ParseAssemblyID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AssemblyName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_integration_account_assembly_resource_test.go b/internal/services/logic/logic_app_integration_account_assembly_resource_test.go index a87ca1a75384..c2b1b0b70483 100644 --- a/internal/services/logic/logic_app_integration_account_assembly_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_assembly_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -83,18 +84,18 @@ func TestAccLogicAppIntegrationAccountAssembly_update(t *testing.T) { } func (r LogicAppIntegrationAccountAssemblyResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountAssemblyID(state.ID) + id, err := integrationaccountassemblies.ParseAssemblyID(state.ID) if err != nil { return nil, err } - resp, err := client.Logic.IntegrationAccountAssemblyClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.AssemblyName) + resp, err := client.Logic.IntegrationAccountAssemblyClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %q %+v", id, err) } - return utils.Bool(resp.Properties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountAssemblyResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_batch_configuration_resource.go b/internal/services/logic/logic_app_integration_account_batch_configuration_resource.go index 489116c770c7..0b495e75671e 100644 --- a/internal/services/logic/logic_app_integration_account_batch_configuration_resource.go +++ b/internal/services/logic/logic_app_integration_account_batch_configuration_resource.go @@ -7,11 +7,11 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress" @@ -35,7 +35,7 @@ func resourceLogicAppIntegrationAccountBatchConfiguration() *pluginsdk.Resource }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountBatchConfigurationID(id) + _, err := integrationaccountbatchconfigurations.ParseBatchConfigurationID(id) return err }), @@ -91,17 +91,9 @@ func resourceLogicAppIntegrationAccountBatchConfiguration() *pluginsdk.Resource Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "frequency": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(logic.RecurrenceFrequencySecond), - string(logic.RecurrenceFrequencyMinute), - string(logic.RecurrenceFrequencyHour), - string(logic.RecurrenceFrequencyDay), - string(logic.RecurrenceFrequencyWeek), - string(logic.RecurrenceFrequencyMonth), - string(logic.RecurrenceFrequencyYear), - }, false), + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice(integrationaccountbatchconfigurations.PossibleValuesForRecurrenceFrequency(), false), }, "interval": { @@ -160,17 +152,9 @@ func resourceLogicAppIntegrationAccountBatchConfiguration() *pluginsdk.Resource Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "weekday": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(logic.DayOfWeekMonday), - string(logic.DayOfWeekTuesday), - string(logic.DayOfWeekWednesday), - string(logic.DayOfWeekThursday), - string(logic.DayOfWeekFriday), - string(logic.DayOfWeekSaturday), - string(logic.DayOfWeekSunday), - }, false), + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice(integrationaccountbatchconfigurations.PossibleValuesForDayOfWeek(), false), }, "week": { @@ -190,16 +174,8 @@ func resourceLogicAppIntegrationAccountBatchConfiguration() *pluginsdk.Resource Type: pluginsdk.TypeSet, Optional: true, Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - ValidateFunc: validation.StringInSlice([]string{ - string(logic.DaysOfWeekMonday), - string(logic.DaysOfWeekTuesday), - string(logic.DaysOfWeekWednesday), - string(logic.DaysOfWeekThursday), - string(logic.DaysOfWeekFriday), - string(logic.DaysOfWeekSaturday), - string(logic.DaysOfWeekSunday), - }, false), + Type: pluginsdk.TypeString, + ValidateFunc: validation.StringInSlice(integrationaccountbatchconfigurations.PossibleValuesForDaysOfWeek(), false), }, ConflictsWith: []string{"release_criteria.0.recurrence.0.schedule.0.month_days", "release_criteria.0.recurrence.0.schedule.0.monthly"}, }, @@ -265,33 +241,32 @@ func resourceLogicAppIntegrationAccountBatchConfigurationCreateUpdate(d *plugins ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountBatchConfigurationID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountbatchconfigurations.NewBatchConfigurationID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.BatchConfigurationName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_batch_configuration", id.ID()) } } - parameters := logic.BatchConfiguration{ - Properties: &logic.BatchConfigurationProperties{ - BatchGroupName: utils.String(d.Get("batch_group_name").(string)), + parameters := integrationaccountbatchconfigurations.BatchConfiguration{ + Properties: integrationaccountbatchconfigurations.BatchConfigurationProperties{ + BatchGroupName: d.Get("batch_group_name").(string), ReleaseCriteria: expandIntegrationAccountBatchConfigurationBatchReleaseCriteria(d.Get("release_criteria").([]interface{})), }, } if v, ok := d.GetOk("metadata"); ok { - metadata := v.(map[string]interface{}) - parameters.Properties.Metadata = &metadata + parameters.Properties.Metadata = &v } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.BatchConfigurationName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -304,14 +279,14 @@ func resourceLogicAppIntegrationAccountBatchConfigurationRead(d *pluginsdk.Resou ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountBatchConfigurationID(d.Id()) + id, err := integrationaccountbatchconfigurations.ParseBatchConfigurationID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.BatchConfigurationName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -320,10 +295,11 @@ func resourceLogicAppIntegrationAccountBatchConfigurationRead(d *pluginsdk.Resou } d.Set("name", id.BatchConfigurationName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.Properties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties d.Set("batch_group_name", props.BatchGroupName) if err := d.Set("release_criteria", flattenIntegrationAccountBatchConfigurationBatchReleaseCriteria(props.ReleaseCriteria)); err != nil { @@ -331,8 +307,7 @@ func resourceLogicAppIntegrationAccountBatchConfigurationRead(d *pluginsdk.Resou } if props.Metadata != nil { - metadata := props.Metadata.(map[string]interface{}) - d.Set("metadata", metadata) + d.Set("metadata", props.Metadata) } } @@ -344,50 +319,50 @@ func resourceLogicAppIntegrationAccountBatchConfigurationDelete(d *pluginsdk.Res ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountBatchConfigurationID(d.Id()) + id, err := integrationaccountbatchconfigurations.ParseBatchConfigurationID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.BatchConfigurationName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } return nil } -func expandIntegrationAccountBatchConfigurationBatchReleaseCriteria(input []interface{}) *logic.BatchReleaseCriteria { +func expandIntegrationAccountBatchConfigurationBatchReleaseCriteria(input []interface{}) integrationaccountbatchconfigurations.BatchReleaseCriteria { + result := integrationaccountbatchconfigurations.BatchReleaseCriteria{} if len(input) == 0 { - return nil + return result } v := input[0].(map[string]interface{}) - result := logic.BatchReleaseCriteria{} - if batchSize := v["batch_size"].(int); batchSize != 0 { - result.BatchSize = utils.Int32(int32(batchSize)) + result.BatchSize = utils.Int64(int64(batchSize)) } if messageCount := v["message_count"].(int); messageCount != 0 { - result.MessageCount = utils.Int32(int32(messageCount)) + result.MessageCount = utils.Int64(int64(messageCount)) } if recurrence := v["recurrence"].([]interface{}); len(recurrence) != 0 { result.Recurrence = expandIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(recurrence) } - return &result + return result } -func expandIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input []interface{}) *logic.WorkflowTriggerRecurrence { +func expandIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input []interface{}) *integrationaccountbatchconfigurations.WorkflowTriggerRecurrence { if len(input) == 0 { return nil } v := input[0].(map[string]interface{}) - result := logic.WorkflowTriggerRecurrence{ - Frequency: logic.RecurrenceFrequency(v["frequency"].(string)), - Interval: utils.Int32(int32(v["interval"].(int))), + frequency := integrationaccountbatchconfigurations.RecurrenceFrequency(v["frequency"].(string)) + result := integrationaccountbatchconfigurations.WorkflowTriggerRecurrence{ + Frequency: &frequency, + Interval: utils.Int64(int64(v["interval"].(int))), } if startTime := v["start_time"].(string); startTime != "" { @@ -409,32 +384,32 @@ func expandIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input [ return &result } -func expandIntegrationAccountBatchConfigurationRecurrenceSchedule(input []interface{}) *logic.RecurrenceSchedule { +func expandIntegrationAccountBatchConfigurationRecurrenceSchedule(input []interface{}) *integrationaccountbatchconfigurations.RecurrenceSchedule { if len(input) == 0 { return nil } v := input[0].(map[string]interface{}) - result := logic.RecurrenceSchedule{} + result := integrationaccountbatchconfigurations.RecurrenceSchedule{} if hours := v["hours"].(*pluginsdk.Set).List(); len(hours) != 0 { - result.Hours = utils.ExpandInt32Slice(hours) + result.Hours = utils.ExpandInt64Slice(hours) } if minutes := v["minutes"].(*pluginsdk.Set).List(); len(minutes) != 0 { - result.Minutes = utils.ExpandInt32Slice(minutes) + result.Minutes = utils.ExpandInt64Slice(minutes) } if rawWeekDays := v["week_days"].(*pluginsdk.Set).List(); len(rawWeekDays) != 0 { - weekDays := make([]logic.DaysOfWeek, 0) + weekDays := make([]integrationaccountbatchconfigurations.DaysOfWeek, 0) for _, item := range *(utils.ExpandStringSlice(rawWeekDays)) { - weekDays = append(weekDays, (logic.DaysOfWeek)(item)) + weekDays = append(weekDays, (integrationaccountbatchconfigurations.DaysOfWeek)(item)) } result.WeekDays = &weekDays } if monthDays := v["month_days"].(*pluginsdk.Set).List(); len(monthDays) != 0 { - result.MonthDays = utils.ExpandInt32Slice(monthDays) + result.MonthDays = utils.ExpandInt64Slice(monthDays) } if monthlyOccurrence := v["monthly"].(*pluginsdk.Set).List(); len(monthlyOccurrence) != 0 { @@ -444,32 +419,29 @@ func expandIntegrationAccountBatchConfigurationRecurrenceSchedule(input []interf return &result } -func expandIntegrationAccountBatchConfigurationRecurrenceScheduleOccurrences(input []interface{}) *[]logic.RecurrenceScheduleOccurrence { - results := make([]logic.RecurrenceScheduleOccurrence, 0) +func expandIntegrationAccountBatchConfigurationRecurrenceScheduleOccurrences(input []interface{}) *[]integrationaccountbatchconfigurations.RecurrenceScheduleOccurrence { + results := make([]integrationaccountbatchconfigurations.RecurrenceScheduleOccurrence, 0) for _, item := range input { v := item.(map[string]interface{}) - results = append(results, logic.RecurrenceScheduleOccurrence{ - Day: logic.DayOfWeek(v["weekday"].(string)), - Occurrence: utils.Int32(int32(v["week"].(int))), + day := integrationaccountbatchconfigurations.DayOfWeek(v["weekday"].(string)) + results = append(results, integrationaccountbatchconfigurations.RecurrenceScheduleOccurrence{ + Day: &day, + Occurrence: utils.Int64(int64(v["week"].(int))), }) } return &results } -func flattenIntegrationAccountBatchConfigurationBatchReleaseCriteria(input *logic.BatchReleaseCriteria) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - var batchSize int32 +func flattenIntegrationAccountBatchConfigurationBatchReleaseCriteria(input integrationaccountbatchconfigurations.BatchReleaseCriteria) []interface{} { + var batchSize int64 if input.BatchSize != nil { batchSize = *input.BatchSize } - var messageCount int32 + var messageCount int64 if input.MessageCount != nil { messageCount = *input.MessageCount } @@ -483,7 +455,7 @@ func flattenIntegrationAccountBatchConfigurationBatchReleaseCriteria(input *logi } } -func flattenIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input *logic.WorkflowTriggerRecurrence) []interface{} { +func flattenIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input *integrationaccountbatchconfigurations.WorkflowTriggerRecurrence) []interface{} { if input == nil { return make([]interface{}, 0) } @@ -493,12 +465,12 @@ func flattenIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input endTime = *input.EndTime } - var frequency logic.RecurrenceFrequency - if input.Frequency != "" { - frequency = input.Frequency + var frequency integrationaccountbatchconfigurations.RecurrenceFrequency + if input.Frequency != nil && *input.Frequency != "" { + frequency = *input.Frequency } - var interval int32 + var interval int64 if input.Interval != nil { interval = *input.Interval } @@ -525,7 +497,7 @@ func flattenIntegrationAccountBatchConfigurationWorkflowTriggerRecurrence(input } } -func flattenIntegrationAccountBatchConfigurationRecurrenceSchedule(input *logic.RecurrenceSchedule) []interface{} { +func flattenIntegrationAccountBatchConfigurationRecurrenceSchedule(input *integrationaccountbatchconfigurations.RecurrenceSchedule) []interface{} { if input == nil { return make([]interface{}, 0) } @@ -541,28 +513,28 @@ func flattenIntegrationAccountBatchConfigurationRecurrenceSchedule(input *logic. return []interface{}{ map[string]interface{}{ - "hours": utils.FlattenInt32Slice(input.Hours), - "minutes": utils.FlattenInt32Slice(input.Minutes), - "month_days": utils.FlattenInt32Slice(input.MonthDays), + "hours": utils.FlattenInt64Slice(input.Hours), + "minutes": utils.FlattenInt64Slice(input.Minutes), + "month_days": utils.FlattenInt64Slice(input.MonthDays), "monthly": flattenIntegrationAccountBatchConfigurationRecurrenceScheduleOccurrence(input.MonthlyOccurrences), "week_days": weekDays, }, } } -func flattenIntegrationAccountBatchConfigurationRecurrenceScheduleOccurrence(input *[]logic.RecurrenceScheduleOccurrence) []interface{} { +func flattenIntegrationAccountBatchConfigurationRecurrenceScheduleOccurrence(input *[]integrationaccountbatchconfigurations.RecurrenceScheduleOccurrence) []interface{} { results := make([]interface{}, 0) if input == nil { return results } for _, item := range *input { - var day logic.DayOfWeek - if item.Day != "" { - day = item.Day + var day integrationaccountbatchconfigurations.DayOfWeek + if item.Day != nil && *item.Day != "" { + day = *item.Day } - var occurrence int32 + var occurrence int64 if item.Occurrence != nil { occurrence = *item.Occurrence } diff --git a/internal/services/logic/logic_app_integration_account_batch_configuration_resource_test.go b/internal/services/logic/logic_app_integration_account_batch_configuration_resource_test.go index ce782b713a6a..610698e72645 100644 --- a/internal/services/logic/logic_app_integration_account_batch_configuration_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_batch_configuration_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -83,18 +84,18 @@ func TestAccLogicAppIntegrationAccountBatchConfiguration_update(t *testing.T) { } func (r LogicAppIntegrationAccountBatchConfigurationResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountBatchConfigurationID(state.ID) + id, err := integrationaccountbatchconfigurations.ParseBatchConfigurationID(state.ID) if err != nil { return nil, err } - resp, err := client.Logic.IntegrationAccountBatchConfigurationClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.BatchConfigurationName) + resp, err := client.Logic.IntegrationAccountBatchConfigurationClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %q %+v", id, err) } - return utils.Bool(resp.Properties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountBatchConfigurationResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_certificate_resource.go b/internal/services/logic/logic_app_integration_account_certificate_resource.go index 624173eb75ee..bef6375205cd 100644 --- a/internal/services/logic/logic_app_integration_account_certificate_resource.go +++ b/internal/services/logic/logic_app_integration_account_certificate_resource.go @@ -5,12 +5,12 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" keyVaultValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/keyvault/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -33,7 +33,7 @@ func resourceLogicAppIntegrationAccountCertificate() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountCertificateID(id) + _, err := integrationaccountcertificates.ParseCertificateID(id) return err }), @@ -105,38 +105,37 @@ func resourceLogicAppIntegrationAccountCertificateCreateUpdate(d *pluginsdk.Reso ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountCertificateID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountcertificates.NewCertificateID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.CertificateName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_certificate", id.ID()) } } - parameters := logic.IntegrationAccountCertificate{ - IntegrationAccountCertificateProperties: &logic.IntegrationAccountCertificateProperties{}, + parameters := integrationaccountcertificates.IntegrationAccountCertificate{ + Properties: integrationaccountcertificates.IntegrationAccountCertificateProperties{}, } if v, ok := d.GetOk("key_vault_key"); ok { - parameters.IntegrationAccountCertificateProperties.Key = expandIntegrationAccountCertificateKeyVaultKey(v.([]interface{})) + parameters.Properties.Key = expandIntegrationAccountCertificateKeyVaultKey(v.([]interface{})) } if v, ok := d.GetOk("metadata"); ok { - metadata, _ := pluginsdk.ExpandJsonFromString(v.(string)) - parameters.IntegrationAccountCertificateProperties.Metadata = metadata + parameters.Properties.Metadata = &v } if v, ok := d.GetOk("public_certificate"); ok { - parameters.IntegrationAccountCertificateProperties.PublicCertificate = utils.String(v.(string)) + parameters.Properties.PublicCertificate = utils.String(v.(string)) } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.CertificateName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -149,14 +148,14 @@ func resourceLogicAppIntegrationAccountCertificateRead(d *pluginsdk.ResourceData ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountCertificateID(d.Id()) + id, err := integrationaccountcertificates.ParseCertificateID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.CertificateName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -165,21 +164,21 @@ func resourceLogicAppIntegrationAccountCertificateRead(d *pluginsdk.ResourceData } d.Set("name", id.CertificateName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.IntegrationAccountCertificateProperties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties if err := d.Set("key_vault_key", flattenIntegrationAccountCertificateKeyVaultKey(props.Key)); err != nil { return fmt.Errorf("setting `key_vault_key`: %+v", err) } if props.Metadata != nil { - metadataValue := props.Metadata.(map[string]interface{}) - metadataStr, _ := pluginsdk.FlattenJsonToString(metadataValue) - d.Set("metadata", metadataStr) + d.Set("metadata", props.Metadata) } d.Set("public_certificate", props.PublicCertificate) + } return nil @@ -190,30 +189,30 @@ func resourceLogicAppIntegrationAccountCertificateDelete(d *pluginsdk.ResourceDa ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountCertificateID(d.Id()) + id, err := integrationaccountcertificates.ParseCertificateID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.CertificateName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } return nil } -func expandIntegrationAccountCertificateKeyVaultKey(input []interface{}) *logic.KeyVaultKeyReference { +func expandIntegrationAccountCertificateKeyVaultKey(input []interface{}) *integrationaccountcertificates.KeyVaultKeyReference { if len(input) == 0 { return nil } v := input[0].(map[string]interface{}) - result := logic.KeyVaultKeyReference{ - KeyVault: &logic.KeyVaultKeyReferenceKeyVault{ - ID: utils.String(v["key_vault_id"].(string)), + result := integrationaccountcertificates.KeyVaultKeyReference{ + KeyVault: integrationaccountcertificates.KeyVaultKeyReferenceKeyVault{ + Id: utils.String(v["key_vault_id"].(string)), }, - KeyName: utils.String(v["key_name"].(string)), + KeyName: v["key_name"].(string), } if keyVersion := v["key_version"].(string); keyVersion != "" { @@ -223,19 +222,14 @@ func expandIntegrationAccountCertificateKeyVaultKey(input []interface{}) *logic. return &result } -func flattenIntegrationAccountCertificateKeyVaultKey(input *logic.KeyVaultKeyReference) []interface{} { +func flattenIntegrationAccountCertificateKeyVaultKey(input *integrationaccountcertificates.KeyVaultKeyReference) []interface{} { if input == nil { return make([]interface{}, 0) } - var keyName string - if input.KeyName != nil { - keyName = *input.KeyName - } - var keyVaultId string - if input.KeyVault != nil && input.KeyVault.ID != nil { - keyVaultId = *input.KeyVault.ID + if input.KeyVault.Id != nil { + keyVaultId = *input.KeyVault.Id } var keyVersion string @@ -245,7 +239,7 @@ func flattenIntegrationAccountCertificateKeyVaultKey(input *logic.KeyVaultKeyRef return []interface{}{ map[string]interface{}{ - "key_name": keyName, + "key_name": input.KeyName, "key_vault_id": keyVaultId, "key_version": keyVersion, }, diff --git a/internal/services/logic/logic_app_integration_account_certificate_resource_test.go b/internal/services/logic/logic_app_integration_account_certificate_resource_test.go index 45f002c3684e..c0899a1ca119 100644 --- a/internal/services/logic/logic_app_integration_account_certificate_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_certificate_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -82,14 +83,14 @@ func TestAccLogicAppIntegrationAccountCertificate_update(t *testing.T) { } func (r LogicAppIntegrationAccountCertificateResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountCertificateID(state.ID) + id, err := integrationaccountcertificates.ParseCertificateID(state.ID) if err != nil { return nil, err } - resp, err := client.Logic.IntegrationAccountCertificateClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.CertificateName) + resp, err := client.Logic.IntegrationAccountCertificateClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %q %+v", id, err) diff --git a/internal/services/logic/logic_app_integration_account_data_source.go b/internal/services/logic/logic_app_integration_account_data_source.go index 65dce8d3cd52..ffc15ce49137 100644 --- a/internal/services/logic/logic_app_integration_account_data_source.go +++ b/internal/services/logic/logic_app_integration_account_data_source.go @@ -4,14 +4,14 @@ import ( "fmt" "time" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func dataSourceLogicAppIntegrationAccount() *pluginsdk.Resource { @@ -37,7 +37,7 @@ func dataSourceLogicAppIntegrationAccount() *pluginsdk.Resource { Computed: true, }, - "tags": tags.SchemaDataSource(), + "tags": commonschema.TagsDataSource(), }, } } @@ -48,20 +48,28 @@ func dataSourceLogicAppIntegrationAccountRead(d *pluginsdk.ResourceData, meta in ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + id := integrationaccounts.NewIntegrationAccountID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) + resp, err := client.Get(ctx, id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return fmt.Errorf("%s was not found", id) } return fmt.Errorf("retrieving %s: %+v", id, err) } d.SetId(id.ID()) - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - d.Set("location", location.NormalizeNilable(resp.Location)) - d.Set("sku_name", string(resp.Sku.Name)) - return tags.FlattenAndSet(d, resp.Tags) + d.Set("name", id.IntegrationAccountName) + d.Set("resource_group_name", id.ResourceGroupName) + + if model := resp.Model; model != nil { + d.Set("location", location.NormalizeNilable(model.Location)) + if model.Sku != nil { + d.Set("sku_name", string(model.Sku.Name)) + } + + return tags.FlattenAndSet(d, model.Tags) + } + + return nil } diff --git a/internal/services/logic/logic_app_integration_account_map_resource.go b/internal/services/logic/logic_app_integration_account_map_resource.go index 36493a6ec96e..2efd1427fcb2 100644 --- a/internal/services/logic/logic_app_integration_account_map_resource.go +++ b/internal/services/logic/logic_app_integration_account_map_resource.go @@ -5,11 +5,11 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -32,7 +32,7 @@ func resourceLogicAppIntegrationAccountMap() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountMapID(id) + _, err := integrationaccountmaps.ParseMapID(id) return err }), @@ -60,14 +60,9 @@ func resourceLogicAppIntegrationAccountMap() *pluginsdk.Resource { }, "map_type": { - Type: pluginsdk.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - string(logic.MapTypeXslt), - string(logic.MapTypeXslt20), - string(logic.MapTypeXslt30), - string(logic.MapTypeLiquid), - }, false), + Type: pluginsdk.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice(integrationaccountmaps.PossibleValuesForMapType(), false), }, "metadata": { @@ -88,39 +83,38 @@ func resourceLogicAppIntegrationAccountMapCreateUpdate(d *pluginsdk.ResourceData ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountMapID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountmaps.NewMapID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.MapName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_map", id.ID()) } } - parameters := logic.IntegrationAccountMap{ - IntegrationAccountMapProperties: &logic.IntegrationAccountMapProperties{ - MapType: logic.MapType(d.Get("map_type").(string)), + parameters := integrationaccountmaps.IntegrationAccountMap{ + Properties: integrationaccountmaps.IntegrationAccountMapProperties{ + MapType: integrationaccountmaps.MapType(d.Get("map_type").(string)), Content: utils.String(d.Get("content").(string)), }, } - if parameters.IntegrationAccountMapProperties.MapType == logic.MapTypeLiquid { - parameters.IntegrationAccountMapProperties.ContentType = utils.String("text/plain") + if parameters.Properties.MapType == integrationaccountmaps.MapTypeLiquid { + parameters.Properties.ContentType = utils.String("text/plain") } else { - parameters.IntegrationAccountMapProperties.ContentType = utils.String("application/xml") + parameters.Properties.ContentType = utils.String("application/xml") } if v, ok := d.GetOk("metadata"); ok { - metadata := v.(map[string]interface{}) - parameters.IntegrationAccountMapProperties.Metadata = &metadata + parameters.Properties.Metadata = &v } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.MapName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -133,14 +127,14 @@ func resourceLogicAppIntegrationAccountMapRead(d *pluginsdk.ResourceData, meta i ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountMapID(d.Id()) + id, err := integrationaccountmaps.ParseMapID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.MapName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -149,16 +143,16 @@ func resourceLogicAppIntegrationAccountMapRead(d *pluginsdk.ResourceData, meta i } d.Set("name", id.MapName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.IntegrationAccountMapProperties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties d.Set("map_type", props.MapType) d.Set("content", d.Get("content").(string)) if props.Metadata != nil { - metadata := props.Metadata.(map[string]interface{}) - d.Set("metadata", metadata) + d.Set("metadata", props.Metadata) } } @@ -170,12 +164,12 @@ func resourceLogicAppIntegrationAccountMapDelete(d *pluginsdk.ResourceData, meta ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountMapID(d.Id()) + id, err := integrationaccountmaps.ParseMapID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.MapName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_integration_account_map_resource_test.go b/internal/services/logic/logic_app_integration_account_map_resource_test.go index ef6027b6bc20..d43bd534b0dd 100644 --- a/internal/services/logic/logic_app_integration_account_map_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_map_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -98,20 +99,20 @@ func TestAccLogicAppIntegrationAccountMap_update(t *testing.T) { } func (r LogicAppIntegrationAccountMapResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountMapID(state.ID) + id, err := integrationaccountmaps.ParseMapID(state.ID) if err != nil { return nil, err } - resp, err := client.Logic.IntegrationAccountMapClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.MapName) + resp, err := client.Logic.IntegrationAccountMapClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %q %+v", id, err) } - return utils.Bool(resp.IntegrationAccountMapProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountMapResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_partner_resource.go b/internal/services/logic/logic_app_integration_account_partner_resource.go index e1cf617d6cc4..230fd6e8d998 100644 --- a/internal/services/logic/logic_app_integration_account_partner_resource.go +++ b/internal/services/logic/logic_app_integration_account_partner_resource.go @@ -5,16 +5,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceLogicAppIntegrationAccountPartner() *pluginsdk.Resource { @@ -32,7 +31,7 @@ func resourceLogicAppIntegrationAccountPartner() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountPartnerID(id) + _, err := integrationaccountpartners.ParsePartnerID(id) return err }), @@ -89,37 +88,36 @@ func resourceLogicAppIntegrationAccountPartnerCreateUpdate(d *pluginsdk.Resource ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountPartnerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountpartners.NewPartnerID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.PartnerName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_partner", id.ID()) } } - parameters := logic.IntegrationAccountPartner{ - IntegrationAccountPartnerProperties: &logic.IntegrationAccountPartnerProperties{ - Content: &logic.PartnerContent{ - B2b: &logic.B2BPartnerContent{ + parameters := integrationaccountpartners.IntegrationAccountPartner{ + Properties: integrationaccountpartners.IntegrationAccountPartnerProperties{ + Content: integrationaccountpartners.PartnerContent{ + B2b: &integrationaccountpartners.B2BPartnerContent{ BusinessIdentities: expandIntegrationAccountPartnerBusinessIdentity(d.Get("business_identity").(*pluginsdk.Set).List()), }, }, - PartnerType: logic.PartnerTypeB2B, + PartnerType: integrationaccountpartners.PartnerTypeBTwoB, }, } if v, ok := d.GetOk("metadata"); ok { - metadata, _ := pluginsdk.ExpandJsonFromString(v.(string)) - parameters.IntegrationAccountPartnerProperties.Metadata = metadata + parameters.Properties.Metadata = &v } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.PartnerName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -132,14 +130,14 @@ func resourceLogicAppIntegrationAccountPartnerRead(d *pluginsdk.ResourceData, me ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountPartnerID(d.Id()) + id, err := integrationaccountpartners.ParsePartnerID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.PartnerName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -148,20 +146,19 @@ func resourceLogicAppIntegrationAccountPartnerRead(d *pluginsdk.ResourceData, me } d.Set("name", id.PartnerName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.IntegrationAccountPartnerProperties; props != nil { - if props.Content != nil && props.Content.B2b != nil && props.Content.B2b.BusinessIdentities != nil { + if model := resp.Model; model != nil { + props := model.Properties + if props.Content.B2b != nil && props.Content.B2b.BusinessIdentities != nil { if err := d.Set("business_identity", flattenIntegrationAccountPartnerBusinessIdentity(props.Content.B2b.BusinessIdentities)); err != nil { return fmt.Errorf("setting `business_identity`: %+v", err) } } if props.Metadata != nil { - metadataValue := props.Metadata.(map[string]interface{}) - metadataStr, _ := pluginsdk.FlattenJsonToString(metadataValue) - d.Set("metadata", metadataStr) + d.Set("metadata", props.Metadata) } } @@ -173,53 +170,43 @@ func resourceLogicAppIntegrationAccountPartnerDelete(d *pluginsdk.ResourceData, ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountPartnerID(d.Id()) + id, err := integrationaccountpartners.ParsePartnerID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.PartnerName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } return nil } -func expandIntegrationAccountPartnerBusinessIdentity(input []interface{}) *[]logic.BusinessIdentity { - results := make([]logic.BusinessIdentity, 0) +func expandIntegrationAccountPartnerBusinessIdentity(input []interface{}) *[]integrationaccountpartners.BusinessIdentity { + results := make([]integrationaccountpartners.BusinessIdentity, 0) for _, item := range input { v := item.(map[string]interface{}) - results = append(results, logic.BusinessIdentity{ - Qualifier: utils.String(v["qualifier"].(string)), - Value: utils.String(v["value"].(string)), + results = append(results, integrationaccountpartners.BusinessIdentity{ + Qualifier: v["qualifier"].(string), + Value: v["value"].(string), }) } return &results } -func flattenIntegrationAccountPartnerBusinessIdentity(input *[]logic.BusinessIdentity) []interface{} { +func flattenIntegrationAccountPartnerBusinessIdentity(input *[]integrationaccountpartners.BusinessIdentity) []interface{} { results := make([]interface{}, 0) if input == nil { return results } for _, item := range *input { - var qualifier string - if item.Qualifier != nil { - qualifier = *item.Qualifier - } - - var value string - if item.Value != nil { - value = *item.Value - } - results = append(results, map[string]interface{}{ - "qualifier": qualifier, - "value": value, + "qualifier": item.Qualifier, + "value": item.Value, }) } diff --git a/internal/services/logic/logic_app_integration_account_partner_resource_test.go b/internal/services/logic/logic_app_integration_account_partner_resource_test.go index 6e71aabee5df..f741bc40904f 100644 --- a/internal/services/logic/logic_app_integration_account_partner_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_partner_resource_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -83,20 +84,20 @@ func TestAccLogicAppIntegrationAccountPartner_update(t *testing.T) { } func (r LogicAppIntegrationAccountPartnerResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountPartnerID(state.ID) + id, err := integrationaccountpartners.ParsePartnerID(state.ID) if err != nil { return nil, err } - resp, err := client.Logic.IntegrationAccountPartnerClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.PartnerName) + resp, err := client.Logic.IntegrationAccountPartnerClient.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return utils.Bool(false), nil } return nil, fmt.Errorf("retrieving %q %+v", id, err) } - return utils.Bool(resp.IntegrationAccountPartnerProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountPartnerResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_resource.go b/internal/services/logic/logic_app_integration_account_resource.go index 7c82f549f2fb..108b124062e7 100644 --- a/internal/services/logic/logic_app_integration_account_resource.go +++ b/internal/services/logic/logic_app_integration_account_resource.go @@ -4,14 +4,14 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -33,7 +33,7 @@ func resourceLogicAppIntegrationAccount() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountID(id) + _, err := integrationaccounts.ParseIntegrationAccountID(id) return err }), @@ -53,9 +53,9 @@ func resourceLogicAppIntegrationAccount() *pluginsdk.Resource { Type: pluginsdk.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - string(logic.IntegrationAccountSkuNameBasic), - string(logic.IntegrationAccountSkuNameFree), - string(logic.IntegrationAccountSkuNameStandard), + string(integrationaccounts.IntegrationAccountSkuNameBasic), + string(integrationaccounts.IntegrationAccountSkuNameFree), + string(integrationaccounts.IntegrationAccountSkuNameStandard), }, false), }, @@ -63,10 +63,10 @@ func resourceLogicAppIntegrationAccount() *pluginsdk.Resource { Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.IntegrationServiceEnvironmentID, + ValidateFunc: integrationaccounts.ValidateIntegrationAccountID, }, - "tags": tags.Schema(), + "tags": commonschema.Tags(), }, } } @@ -77,36 +77,36 @@ func resourceLogicAppIntegrationAccountCreateUpdate(d *pluginsdk.ResourceData, m ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + id := integrationaccounts.NewIntegrationAccountID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for present of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account", id.ID()) } } - account := logic.IntegrationAccount{ - IntegrationAccountProperties: &logic.IntegrationAccountProperties{}, - Location: utils.String(location.Normalize(d.Get("location").(string))), - Sku: &logic.IntegrationAccountSku{ - Name: logic.IntegrationAccountSkuName(d.Get("sku_name").(string)), + account := integrationaccounts.IntegrationAccount{ + Properties: &integrationaccounts.IntegrationAccountProperties{}, + Location: utils.String(location.Normalize(d.Get("location").(string))), + Sku: &integrationaccounts.IntegrationAccountSku{ + Name: integrationaccounts.IntegrationAccountSkuName(d.Get("sku_name").(string)), }, Tags: tags.Expand(d.Get("tags").(map[string]interface{})), } if v, ok := d.GetOk("integration_service_environment_id"); ok { - account.IntegrationAccountProperties.IntegrationServiceEnvironment = &logic.ResourceReference{ - ID: utils.String(v.(string)), + account.Properties.IntegrationServiceEnvironment = &integrationaccounts.ResourceReference{ + Id: utils.String(v.(string)), } } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, account); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, account); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } @@ -120,29 +120,37 @@ func resourceLogicAppIntegrationAccountRead(d *pluginsdk.ResourceData, meta inte ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountID(d.Id()) + id, err := integrationaccounts.ParseIntegrationAccountID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - return fmt.Errorf("retrieving Integration Account %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err) + return fmt.Errorf("retrieving %s: %+v", id, err) } - d.Set("name", id.Name) - d.Set("resource_group_name", id.ResourceGroup) - d.Set("location", location.NormalizeNilable(resp.Location)) - d.Set("sku_name", string(resp.Sku.Name)) - - if props := resp.IntegrationAccountProperties; props != nil { - iseId := "" - if props.IntegrationServiceEnvironment != nil && props.IntegrationServiceEnvironment.ID != nil { - iseId = *props.IntegrationServiceEnvironment.ID + d.Set("name", id.IntegrationAccountName) + d.Set("resource_group_name", id.ResourceGroupName) + + if model := resp.Model; model != nil { + d.Set("location", location.NormalizeNilable(model.Location)) + + if model.Sku != nil { + d.Set("sku_name", string(model.Sku.Name)) } - d.Set("integration_service_environment_id", iseId) + + if props := model.Properties; props != nil { + iseId := "" + if props.IntegrationServiceEnvironment != nil && props.IntegrationServiceEnvironment.Id != nil { + iseId = *props.IntegrationServiceEnvironment.Id + } + d.Set("integration_service_environment_id", iseId) + } + + return tags.FlattenAndSet(d, model.Tags) } - return tags.FlattenAndSet(d, resp.Tags) + return nil } func resourceLogicAppIntegrationAccountDelete(d *pluginsdk.ResourceData, meta interface{}) error { @@ -150,13 +158,13 @@ func resourceLogicAppIntegrationAccountDelete(d *pluginsdk.ResourceData, meta in ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountID(d.Id()) + id, err := integrationaccounts.ParseIntegrationAccountID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.Name); err != nil { - return fmt.Errorf("deleting Integration Account %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err) + if _, err := client.Delete(ctx, *id); err != nil { + return fmt.Errorf("deleting %s: %+v", id, err) } return nil diff --git a/internal/services/logic/logic_app_integration_account_resource_test.go b/internal/services/logic/logic_app_integration_account_resource_test.go index 6a1ffe6cf780..96c1a5ba8250 100644 --- a/internal/services/logic/logic_app_integration_account_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -111,17 +111,17 @@ func TestAccLogicAppIntegrationAccount_integrationServiceEnvironment(t *testing. } func (LogicAppIntegrationAccountResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountID(state.ID) + id, err := integrationaccounts.ParseIntegrationAccountID(state.ID) if err != nil { return nil, err } - resp, err := clients.Logic.IntegrationAccountClient.Get(ctx, id.ResourceGroup, id.Name) + resp, err := clients.Logic.IntegrationAccountClient.Get(ctx, *id) if err != nil { - return nil, fmt.Errorf("retrieving Logic App Workflow %s (resource group: %s): %v", id.Name, id.ResourceGroup, err) + return nil, fmt.Errorf("retrieving %s: %v", id, err) } - return utils.Bool(resp.IntegrationAccountProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_schema_resource.go b/internal/services/logic/logic_app_integration_account_schema_resource.go index dc80710c82bb..b7f92e749852 100644 --- a/internal/services/logic/logic_app_integration_account_schema_resource.go +++ b/internal/services/logic/logic_app_integration_account_schema_resource.go @@ -5,11 +5,11 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -32,7 +32,7 @@ func resourceLogicAppIntegrationAccountSchema() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountSchemaID(id) + _, err := integrationaccountschemas.ParseSchemaID(id) return err }), @@ -81,38 +81,37 @@ func resourceLogicAppIntegrationAccountSchemaCreateUpdate(d *pluginsdk.ResourceD ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountSchemaID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountschemas.NewSchemaID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SchemaName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_schema", id.ID()) } } - parameters := logic.IntegrationAccountSchema{ - IntegrationAccountSchemaProperties: &logic.IntegrationAccountSchemaProperties{ - SchemaType: logic.SchemaTypeXML, + parameters := integrationaccountschemas.IntegrationAccountSchema{ + Properties: integrationaccountschemas.IntegrationAccountSchemaProperties{ + SchemaType: integrationaccountschemas.SchemaTypeXml, Content: utils.String(d.Get("content").(string)), ContentType: utils.String("application/xml"), }, } if v, ok := d.GetOk("file_name"); ok { - parameters.IntegrationAccountSchemaProperties.FileName = utils.String(v.(string)) + parameters.Properties.FileName = utils.String(v.(string)) } if v, ok := d.GetOk("metadata"); ok { - metadata, _ := pluginsdk.ExpandJsonFromString(v.(string)) - parameters.IntegrationAccountSchemaProperties.Metadata = metadata + parameters.Properties.Metadata = &v } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SchemaName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating/updating %s: %+v", id, err) } @@ -125,14 +124,14 @@ func resourceLogicAppIntegrationAccountSchemaRead(d *pluginsdk.ResourceData, met ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountSchemaID(d.Id()) + id, err := integrationaccountschemas.ParseSchemaID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SchemaName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] %s was not found - removing from state", *id) d.SetId("") return nil @@ -141,17 +140,16 @@ func resourceLogicAppIntegrationAccountSchemaRead(d *pluginsdk.ResourceData, met } d.Set("name", id.SchemaName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.IntegrationAccountSchemaProperties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties d.Set("content", d.Get("content").(string)) d.Set("file_name", d.Get("file_name").(string)) if props.Metadata != nil { - metadataValue := props.Metadata.(map[string]interface{}) - metadataStr, _ := pluginsdk.FlattenJsonToString(metadataValue) - d.Set("metadata", metadataStr) + d.Set("metadata", props.Metadata) } } @@ -163,12 +161,12 @@ func resourceLogicAppIntegrationAccountSchemaDelete(d *pluginsdk.ResourceData, m ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountSchemaID(d.Id()) + id, err := integrationaccountschemas.ParseSchemaID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SchemaName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_integration_account_schema_resource_test.go b/internal/services/logic/logic_app_integration_account_schema_resource_test.go index 8cfd572959e0..cd03e8eec484 100644 --- a/internal/services/logic/logic_app_integration_account_schema_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_schema_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -83,17 +83,17 @@ func TestAccLogicAppIntegrationAccountSchema_update(t *testing.T) { } func (LogicAppIntegrationAccountSchemaResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountSchemaID(state.ID) + id, err := integrationaccountschemas.ParseSchemaID(state.ID) if err != nil { return nil, err } - resp, err := clients.Logic.IntegrationAccountSchemaClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SchemaName) + resp, err := clients.Logic.IntegrationAccountSchemaClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("reading %q: %+v", id, err) } - return utils.Bool(resp.IntegrationAccountSchemaProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountSchemaResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_integration_account_session_resource.go b/internal/services/logic/logic_app_integration_account_session_resource.go index 7a234eb9f994..79fac07382c1 100644 --- a/internal/services/logic/logic_app_integration_account_session_resource.go +++ b/internal/services/logic/logic_app_integration_account_session_resource.go @@ -5,16 +5,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func resourceLogicAppIntegrationAccountSession() *pluginsdk.Resource { @@ -32,7 +31,7 @@ func resourceLogicAppIntegrationAccountSession() *pluginsdk.Resource { }, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.IntegrationAccountSessionID(id) + _, err := integrationaccountsessions.ParseSessionID(id) return err }), @@ -68,32 +67,29 @@ func resourceLogicAppIntegrationAccountSessionCreateUpdate(d *pluginsdk.Resource ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewIntegrationAccountSessionID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) + id := integrationaccountsessions.NewSessionID(subscriptionId, d.Get("resource_group_name").(string), d.Get("integration_account_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SessionName) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_integration_account_session", id.ID()) } } - content, err := pluginsdk.ExpandJsonFromString(d.Get("content").(string)) - if err != nil { - return fmt.Errorf("expanding JSON for `content`: %+v", err) - } + content := d.Get("content") - parameters := logic.IntegrationAccountSession{ - IntegrationAccountSessionProperties: &logic.IntegrationAccountSessionProperties{ - Content: content, + parameters := integrationaccountsessions.IntegrationAccountSession{ + Properties: integrationaccountsessions.IntegrationAccountSessionProperties{ + Content: &content, }, } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SessionName, parameters); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, parameters); err != nil { return fmt.Errorf("creating %s: %+v", id, err) } @@ -106,14 +102,14 @@ func resourceLogicAppIntegrationAccountSessionRead(d *pluginsdk.ResourceData, me ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountSessionID(d.Id()) + id, err := integrationaccountsessions.ParseSessionID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SessionName) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[INFO] %s does not exist - removing from state", *id) d.SetId("") return nil @@ -122,14 +118,13 @@ func resourceLogicAppIntegrationAccountSessionRead(d *pluginsdk.ResourceData, me } d.Set("name", id.SessionName) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("resource_group_name", id.ResourceGroupName) d.Set("integration_account_name", id.IntegrationAccountName) - if props := resp.IntegrationAccountSessionProperties; props != nil { + if model := resp.Model; model != nil { + props := model.Properties if props.Content != nil { - contentValue := props.Content.(map[string]interface{}) - contentStr, _ := pluginsdk.FlattenJsonToString(contentValue) - d.Set("content", contentStr) + d.Set("content", props.Content) } } @@ -141,12 +136,12 @@ func resourceLogicAppIntegrationAccountSessionDelete(d *pluginsdk.ResourceData, ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.IntegrationAccountSessionID(d.Id()) + id, err := integrationaccountsessions.ParseSessionID(d.Id()) if err != nil { return err } - if _, err := client.Delete(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SessionName); err != nil { + if _, err := client.Delete(ctx, *id); err != nil { return fmt.Errorf("deleting %s: %+v", id, err) } return nil diff --git a/internal/services/logic/logic_app_integration_account_session_resource_test.go b/internal/services/logic/logic_app_integration_account_session_resource_test.go index 58cb9d56bcc7..bc141d764880 100644 --- a/internal/services/logic/logic_app_integration_account_session_resource_test.go +++ b/internal/services/logic/logic_app_integration_account_session_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -71,17 +71,17 @@ func TestAccLogicAppIntegrationAccountSession_update(t *testing.T) { } func (LogicAppIntegrationAccountSessionResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.IntegrationAccountSessionID(state.ID) + id, err := integrationaccountsessions.ParseSessionID(state.ID) if err != nil { return nil, err } - resp, err := clients.Logic.IntegrationAccountSessionClient.Get(ctx, id.ResourceGroup, id.IntegrationAccountName, id.SessionName) + resp, err := clients.Logic.IntegrationAccountSessionClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("reading %q: %+v", id, err) } - return utils.Bool(resp.IntegrationAccountSessionProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (r LogicAppIntegrationAccountSessionResource) template(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_app_trigger_custom_resource.go b/internal/services/logic/logic_app_trigger_custom_resource.go index bb24ad8048ad..aba8e8f5f046 100644 --- a/internal/services/logic/logic_app_trigger_custom_resource.go +++ b/internal/services/logic/logic_app_trigger_custom_resource.go @@ -6,8 +6,9 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) @@ -20,7 +21,7 @@ func resourceLogicAppTriggerCustom() *pluginsdk.Resource { Delete: resourceLogicAppTriggerCustomDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.TriggerID(id) + _, err := workflowtriggers.ParseTriggerID(id) return err }), @@ -56,18 +57,18 @@ func resourceLogicAppTriggerCustom() *pluginsdk.Resource { } func resourceLogicAppTriggerCustomCreateUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - workflowId, err := parse.WorkflowID(d.Get("logic_app_id").(string)) + workflowId, err := workflows.ParseWorkflowID(d.Get("logic_app_id").(string)) if err != nil { return err } - id := parse.NewTriggerID(workflowId.SubscriptionId, workflowId.ResourceGroup, workflowId.Name, d.Get("name").(string)) + id := workflowtriggers.NewTriggerID(workflowId.SubscriptionId, workflowId.ResourceGroupName, workflowId.WorkflowName, d.Get("name").(string)) bodyRaw := d.Get("body").(string) var body map[string]interface{} if err := json.Unmarshal([]byte(bodyRaw), &body); err != nil { - return fmt.Errorf("unmarshalling JSON for Custom Trigger %q: %+v", id.Name, err) + return fmt.Errorf("unmarshalling JSON for %s: %+v", id.ID(), err) } log.Printf("[DEBUG] logic_custom_trigger initial body is: %s", body) @@ -80,26 +81,28 @@ func resourceLogicAppTriggerCustomCreateUpdate(d *pluginsdk.ResourceData, meta i } func resourceLogicAppTriggerCustomRead(d *pluginsdk.ResourceData, meta interface{}) error { - id, err := parse.TriggerID(d.Id()) + id, err := workflowtriggers.ParseTriggerID(d.Id()) if err != nil { return err } - t, app, err := retrieveLogicAppTrigger(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) + + t, app, err := retrieveLogicAppTrigger(d, meta, workflowId, id.TriggerName) if err != nil { return err } if t == nil { - log.Printf("[DEBUG] Logic App %q (Resource Group %q) does not contain Trigger %q - removing from state", id.WorkflowName, id.ResourceGroup, id.Name) + log.Printf("[DEBUG] Logic App %q (Resource Group %q) does not contain Trigger %q - removing from state", id.WorkflowName, id.ResourceGroupName, id.TriggerName) d.SetId("") return nil } action := *t - d.Set("name", id.Name) - d.Set("logic_app_id", app.ID) + d.Set("name", id.TriggerName) + d.Set("logic_app_id", app.Id) // Azure returns an additional field called evaluatedRecurrence in the trigger body which // is a copy of the recurrence specified in the body property and breaks the diff suppress logic @@ -107,24 +110,26 @@ func resourceLogicAppTriggerCustomRead(d *pluginsdk.ResourceData, meta interface body, err := json.Marshal(action) if err != nil { - return fmt.Errorf("serializing `body` for Trigger %q: %+v", id.Name, err) + return fmt.Errorf("serializing `body` for %s: %+v", id.ID(), err) } log.Printf("[DEBUG] logic_custom_trigger body is: %s", string(body)) if err := d.Set("body", string(body)); err != nil { - return fmt.Errorf("setting `body` for Trigger %q: %+v", id.Name, err) + return fmt.Errorf("setting `body` for %s: %+v", id.ID(), err) } return nil } func resourceLogicAppTriggerCustomDelete(d *pluginsdk.ResourceData, meta interface{}) error { - id, err := parse.TriggerID(d.Id()) + id, err := workflowtriggers.ParseTriggerID(d.Id()) if err != nil { return err } - err = resourceLogicAppTriggerRemove(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) + + err = resourceLogicAppTriggerRemove(d, meta, workflowId, id.TriggerName) if err != nil { return fmt.Errorf("removing Trigger %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_trigger_http_request_resource.go b/internal/services/logic/logic_app_trigger_http_request_resource.go index c83abf54b8d2..283585434494 100644 --- a/internal/services/logic/logic_app_trigger_http_request_resource.go +++ b/internal/services/logic/logic_app_trigger_http_request_resource.go @@ -8,8 +8,9 @@ import ( "net/http" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -23,7 +24,7 @@ func resourceLogicAppTriggerHttpRequest() *pluginsdk.Resource { Delete: resourceLogicAppTriggerHttpRequestDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.TriggerID(id) + _, err := workflowtriggers.ParseTriggerID(id) return err }), @@ -118,12 +119,12 @@ func resourceLogicAppTriggerHttpRequestCreateUpdate(d *pluginsdk.ResourceData, m "type": "Request", } - workflowId, err := parse.WorkflowID(d.Get("logic_app_id").(string)) + workflowId, err := workflows.ParseWorkflowID(d.Get("logic_app_id").(string)) if err != nil { return err } - id := parse.NewTriggerID(workflowId.SubscriptionId, workflowId.ResourceGroup, workflowId.Name, d.Get("name").(string)) + id := workflowtriggers.NewTriggerID(workflowId.SubscriptionId, workflowId.ResourceGroupName, workflowId.WorkflowName, d.Get("name").(string)) if err := resourceLogicAppTriggerUpdate(d, meta, *workflowId, id, trigger, "azurerm_logic_app_trigger_http_request"); err != nil { return err @@ -133,26 +134,26 @@ func resourceLogicAppTriggerHttpRequestCreateUpdate(d *pluginsdk.ResourceData, m } func resourceLogicAppTriggerHttpRequestRead(d *pluginsdk.ResourceData, meta interface{}) error { - id, err := parse.TriggerID(d.Id()) + id, err := workflowtriggers.ParseTriggerID(d.Id()) if err != nil { return err } - t, app, url, err := retrieveLogicAppHttpTrigger(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + t, app, url, err := retrieveLogicAppHttpTrigger(d, meta, *id) if err != nil { return err } if t == nil { - log.Printf("[DEBUG] Logic App %q (Resource Group %q) does not contain Trigger %q - removing from state", id.WorkflowName, id.ResourceGroup, id.Name) + log.Printf("[DEBUG] Logic App %q (Resource Group %q) does not contain %s - removing from state", id.WorkflowName, id.ResourceGroupName, id.ID()) d.SetId("") return nil } trigger := *t - d.Set("name", id.Name) - d.Set("logic_app_id", app.ID) + d.Set("name", id.TriggerName) + d.Set("logic_app_id", app.Id) d.Set("callback_url", url) v := trigger["inputs"] @@ -186,12 +187,14 @@ func resourceLogicAppTriggerHttpRequestRead(d *pluginsdk.ResourceData, meta inte } func resourceLogicAppTriggerHttpRequestDelete(d *pluginsdk.ResourceData, meta interface{}) error { - id, err := parse.TriggerID(d.Id()) + id, err := workflowtriggers.ParseTriggerID(d.Id()) if err != nil { return err } - err = resourceLogicAppTriggerRemove(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) + + err = resourceLogicAppTriggerRemove(d, meta, workflowId, id.TriggerName) if err != nil { return fmt.Errorf("removing Trigger %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_trigger_recurrence_resource.go b/internal/services/logic/logic_app_trigger_recurrence_resource.go index 05ef795c1177..27e5dfff4627 100644 --- a/internal/services/logic/logic_app_trigger_recurrence_resource.go +++ b/internal/services/logic/logic_app_trigger_recurrence_resource.go @@ -5,8 +5,9 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" @@ -20,7 +21,7 @@ func resourceLogicAppTriggerRecurrence() *pluginsdk.Resource { Delete: resourceLogicAppTriggerRecurrenceDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.TriggerID(id) + _, err := workflowtriggers.ParseTriggerID(id) return err }), @@ -146,12 +147,12 @@ func resourceLogicAppTriggerRecurrenceCreateUpdate(d *pluginsdk.ResourceData, me trigger["recurrence"].(map[string]interface{})["schedule"] = expandLogicAppTriggerRecurrenceSchedule(v.([]interface{})) } - workflowId, err := parse.WorkflowID(d.Get("logic_app_id").(string)) + workflowId, err := workflows.ParseWorkflowID(d.Get("logic_app_id").(string)) if err != nil { return err } - id := parse.NewTriggerID(workflowId.SubscriptionId, workflowId.ResourceGroup, workflowId.Name, d.Get("name").(string)) + id := workflowtriggers.NewTriggerID(workflowId.SubscriptionId, workflowId.ResourceGroupName, workflowId.WorkflowName, d.Get("name").(string)) if err := resourceLogicAppTriggerUpdate(d, meta, *workflowId, id, trigger, "azurerm_logic_app_trigger_recurrence"); err != nil { return err @@ -161,26 +162,28 @@ func resourceLogicAppTriggerRecurrenceCreateUpdate(d *pluginsdk.ResourceData, me } func resourceLogicAppTriggerRecurrenceRead(d *pluginsdk.ResourceData, meta interface{}) error { - id, err := parse.TriggerID(d.Id()) + id, err := workflowtriggers.ParseTriggerID(d.Id()) if err != nil { return err } - t, app, err := retrieveLogicAppTrigger(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) + + t, app, err := retrieveLogicAppTrigger(d, meta, workflowId, id.TriggerName) if err != nil { return err } if t == nil { - log.Printf("[DEBUG] Logic App %q (Resource Group %q) does not contain Trigger %q - removing from state", id.WorkflowName, id.ResourceGroup, id.Name) + log.Printf("[DEBUG] Logic App %q (Resource Group %q) does not contain %s - removing from state", id.WorkflowName, id.ResourceGroupName, id.ID()) d.SetId("") return nil } trigger := *t - d.Set("name", id.Name) - d.Set("logic_app_id", app.ID) + d.Set("name", id.TriggerName) + d.Set("logic_app_id", app.Id) v := trigger["recurrence"] if v == nil { @@ -216,12 +219,14 @@ func resourceLogicAppTriggerRecurrenceRead(d *pluginsdk.ResourceData, meta inter } func resourceLogicAppTriggerRecurrenceDelete(d *pluginsdk.ResourceData, meta interface{}) error { - id, err := parse.TriggerID(d.Id()) + id, err := workflowtriggers.ParseTriggerID(d.Id()) if err != nil { return err } - err = resourceLogicAppTriggerRemove(d, meta, id.ResourceGroup, id.WorkflowName, id.Name) + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) + + err = resourceLogicAppTriggerRemove(d, meta, workflowId, id.TriggerName) if err != nil { return fmt.Errorf("removing Trigger %s: %+v", id, err) } diff --git a/internal/services/logic/logic_app_workflow_data_source.go b/internal/services/logic/logic_app_workflow_data_source.go index 33d616c8c746..8ae8d6f6cd05 100644 --- a/internal/services/logic/logic_app_workflow_data_source.go +++ b/internal/services/logic/logic_app_workflow_data_source.go @@ -5,15 +5,15 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) func dataSourceLogicAppWorkflow() *pluginsdk.Resource { @@ -86,22 +86,22 @@ func dataSourceLogicAppWorkflow() *pluginsdk.Resource { Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, }, - "tags": tags.SchemaDataSource(), + "tags": commonschema.TagsDataSource(), }, } } func dataSourceLogicAppWorkflowRead(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).Logic.WorkflowClient - subscriptionId := meta.(*clients.Client).Logic.WorkflowClient.SubscriptionID + subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id := parse.NewWorkflowID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + id := workflows.NewWorkflowID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) + resp, err := client.Get(ctx, id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { return fmt.Errorf("Logic App Workflow %s was not found", id) } @@ -110,60 +110,69 @@ func dataSourceLogicAppWorkflowRead(d *pluginsdk.ResourceData, meta interface{}) d.SetId(id.ID()) - d.Set("location", location.NormalizeNilable(resp.Location)) + if model := resp.Model; model != nil { + d.Set("location", location.NormalizeNilable(model.Location)) - identity, err := flattenLogicAppWorkflowIdentity(resp.Identity) - if err != nil { - return err - } - d.Set("identity", identity) - - if props := resp.WorkflowProperties; props != nil { - parameters := flattenLogicAppDataSourceWorkflowParameters(props.Parameters) - if err := d.Set("parameters", parameters); err != nil { - return fmt.Errorf("setting `parameters`: %+v", err) + identity, err := identity.FlattenSystemOrUserAssignedMap(model.Identity) + if err != nil { + return err } + d.Set("identity", identity) - d.Set("access_endpoint", props.AccessEndpoint) + if props := model.Properties; props != nil { + parameters := flattenLogicAppDataSourceWorkflowParameters(props.Parameters) + if err := d.Set("parameters", parameters); err != nil { + return fmt.Errorf("setting `parameters`: %+v", err) + } - if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Connector == nil { - d.Set("connector_endpoint_ip_addresses", []interface{}{}) - d.Set("connector_outbound_ip_addresses", []interface{}{}) - } else { - d.Set("connector_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.AccessEndpointIPAddresses)) - d.Set("connector_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.OutgoingIPAddresses)) - } + d.Set("access_endpoint", props.AccessEndpoint) - if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Workflow == nil { - d.Set("workflow_endpoint_ip_addresses", []interface{}{}) - d.Set("workflow_outbound_ip_addresses", []interface{}{}) - } else { - d.Set("workflow_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.AccessEndpointIPAddresses)) - d.Set("workflow_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.OutgoingIPAddresses)) - } + if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Connector == nil { + d.Set("connector_endpoint_ip_addresses", []interface{}{}) + d.Set("connector_outbound_ip_addresses", []interface{}{}) + } else { + d.Set("connector_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.AccessEndpointIPAddresses)) + d.Set("connector_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.OutgoingIPAddresses)) + } - if definition := props.Definition; definition != nil { - if v, ok := definition.(map[string]interface{}); ok { - d.Set("workflow_schema", v["$schema"].(string)) - d.Set("workflow_version", v["contentVersion"].(string)) + if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Workflow == nil { + d.Set("workflow_endpoint_ip_addresses", []interface{}{}) + d.Set("workflow_outbound_ip_addresses", []interface{}{}) + } else { + d.Set("workflow_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.AccessEndpointIPAddresses)) + d.Set("workflow_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.OutgoingIPAddresses)) + } + + if definition := props.Definition; definition != nil { + definitionRaw := *props.Definition + if v, ok := definitionRaw.(map[string]interface{}); ok { + d.Set("workflow_schema", v["$schema"].(string)) + d.Set("workflow_version", v["contentVersion"].(string)) + } } - } - if props.IntegrationAccount != nil && props.IntegrationAccount.ID != nil { - d.Set("logic_app_integration_account_id", props.IntegrationAccount.ID) + if props.IntegrationAccount != nil && props.IntegrationAccount.Id != nil { + d.Set("logic_app_integration_account_id", props.IntegrationAccount.Id) + } } + + return tags.FlattenAndSet(d, model.Tags) } - return tags.FlattenAndSet(d, resp.Tags) + return nil } -func flattenLogicAppDataSourceWorkflowParameters(input map[string]*logic.WorkflowParameter) map[string]interface{} { +func flattenLogicAppDataSourceWorkflowParameters(input *map[string]workflows.WorkflowParameter) 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 - val, ok := v.Value.(string) + for k, v := range *input { + // we only support string parameters at this time + if v.Value != nil { + rawValue := *v.Value + val, ok := rawValue.(string) if !ok { log.Printf("[DEBUG] Skipping parameter %q since it's not a string", k) } diff --git a/internal/services/logic/logic_app_workflow_resource.go b/internal/services/logic/logic_app_workflow_resource.go index bf20995ef047..d8e5c59c40d6 100644 --- a/internal/services/logic/logic_app_workflow_resource.go +++ b/internal/services/logic/logic_app_workflow_resource.go @@ -8,17 +8,17 @@ import ( "strconv" "time" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate" - "github.com/hashicorp/terraform-provider-azurerm/internal/tags" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" @@ -35,7 +35,7 @@ func resourceLogicAppWorkflow() *pluginsdk.Resource { Delete: resourceLogicAppWorkflowDelete, Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error { - _, err := parse.WorkflowID(id) + _, err := workflows.ParseWorkflowID(id) return err }), @@ -68,7 +68,7 @@ func resourceLogicAppWorkflow() *pluginsdk.Resource { Type: pluginsdk.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validate.IntegrationServiceEnvironmentID, + ValidateFunc: integrationserviceenvironments.ValidateIntegrationServiceEnvironmentID, }, "access_control": { @@ -203,7 +203,7 @@ func resourceLogicAppWorkflow() *pluginsdk.Resource { "logic_app_integration_account_id": { Type: pluginsdk.TypeString, Optional: true, - ValidateFunc: validate.IntegrationAccountID, + ValidateFunc: integrationaccounts.ValidateIntegrationAccountID, }, // TODO: should Parameters be split out into their own object to allow validation on the different sub-types? @@ -269,30 +269,30 @@ func resourceLogicAppWorkflow() *pluginsdk.Resource { Elem: &pluginsdk.Schema{Type: pluginsdk.TypeString}, }, - "tags": tags.Schema(), + "tags": commonschema.Tags(), }, } } func resourceLogicAppWorkflowCreate(d *pluginsdk.ResourceData, meta interface{}) error { client := meta.(*clients.Client).Logic.WorkflowClient - subscriptionId := meta.(*clients.Client).Logic.WorkflowClient.SubscriptionID + subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() log.Printf("[INFO] preparing arguments for Logic App Workflow creation.") - id := parse.NewWorkflowID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) + id := workflows.NewWorkflowID(subscriptionId, d.Get("resource_group_name").(string), d.Get("name").(string)) if d.IsNewResource() { - existing, err := client.Get(ctx, id.ResourceGroup, id.Name) + existing, err := client.Get(ctx, id) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return fmt.Errorf("checking for presence of existing Logic App Workflow %s: %+v", id, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_logic_app_workflow", id.ID()) } } @@ -312,50 +312,54 @@ func resourceLogicAppWorkflowCreate(d *pluginsdk.ResourceData, meta interface{}) } t := d.Get("tags").(map[string]interface{}) - isEnabled := logic.WorkflowStateEnabled + isEnabled := workflows.WorkflowStateEnabled if v := d.Get("enabled").(bool); !v { - isEnabled = logic.WorkflowStateDisabled + isEnabled = workflows.WorkflowStateDisabled } - identity, err := expandLogicAppWorkflowIdentity(d.Get("identity").([]interface{})) + identity, err := identity.ExpandSystemOrUserAssignedMap(d.Get("identity").([]interface{})) if err != nil { return fmt.Errorf("expanding `identity`: %+v", err) } - properties := logic.Workflow{ + // nolint gosimple + var definition interface{} + definition = map[string]interface{}{ + "$schema": workflowSchema, + "contentVersion": workflowVersion, + "actions": make(map[string]interface{}), + "triggers": make(map[string]interface{}), + "parameters": workflowParameters, + } + + properties := workflows.Workflow{ Identity: identity, Location: utils.String(location), - WorkflowProperties: &logic.WorkflowProperties{ - Definition: &map[string]interface{}{ - "$schema": workflowSchema, - "contentVersion": workflowVersion, - "actions": make(map[string]interface{}), - "triggers": make(map[string]interface{}), - "parameters": workflowParameters, - }, + Properties: &workflows.WorkflowProperties{ + Definition: &definition, Parameters: parameters, - State: isEnabled, + State: &isEnabled, }, Tags: tags.Expand(t), } if v, ok := d.GetOk("access_control"); ok { - properties.WorkflowProperties.AccessControl = expandLogicAppWorkflowAccessControl(v.([]interface{})) + properties.Properties.AccessControl = expandLogicAppWorkflowAccessControl(v.([]interface{})) } if iseID, ok := d.GetOk("integration_service_environment_id"); ok { - properties.WorkflowProperties.IntegrationServiceEnvironment = &logic.ResourceReference{ - ID: utils.String(iseID.(string)), + properties.Properties.IntegrationServiceEnvironment = &workflows.ResourceReference{ + Id: utils.String(iseID.(string)), } } if v, ok := d.GetOk("logic_app_integration_account_id"); ok { - properties.WorkflowProperties.IntegrationAccount = &logic.ResourceReference{ - ID: utils.String(v.(string)), + properties.Properties.IntegrationAccount = &workflows.ResourceReference{ + Id: utils.String(v.(string)), } } - if _, err := client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, properties); err != nil { + if _, err := client.CreateOrUpdate(ctx, id, properties); err != nil { return fmt.Errorf("[ERROR] Error creating Logic App Workflow %s: %+v", id, err) } @@ -369,18 +373,18 @@ func resourceLogicAppWorkflowUpdate(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.WorkflowID(d.Id()) + id, err := workflows.ParseWorkflowID(d.Id()) if err != nil { return err } // lock to prevent against Actions, Parameters or Triggers conflicting - locks.ByName(id.Name, logicAppResourceName) - defer locks.UnlockByName(id.Name, logicAppResourceName) + locks.ByName(id.WorkflowName, logicAppResourceName) + defer locks.UnlockByName(id.WorkflowName, logicAppResourceName) - read, err := client.Get(ctx, id.ResourceGroup, id.Name) + read, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(read.Response) { + if response.WasNotFound(read.HttpResponse) { d.SetId("") return nil } @@ -388,7 +392,7 @@ func resourceLogicAppWorkflowUpdate(d *pluginsdk.ResourceData, meta interface{}) return fmt.Errorf("[ERROR] Error making Read request on Logic App Workflow %s: %+v", id, err) } - if read.WorkflowProperties == nil { + if read.Model == nil || read.Model.Properties == nil { return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties` is nil") } @@ -404,47 +408,52 @@ func resourceLogicAppWorkflowUpdate(d *pluginsdk.ResourceData, meta interface{}) t := d.Get("tags").(map[string]interface{}) - definition := read.WorkflowProperties.Definition.(map[string]interface{}) - definition["parameters"] = workflowParameters + var definition interface{} + if read.Model.Properties.Definition != nil { + definitionRaw := *read.Model.Properties.Definition + definitionMap := definitionRaw.(map[string]interface{}) + definitionMap["parameters"] = workflowParameters + definition = definitionMap + } - isEnabled := logic.WorkflowStateEnabled + isEnabled := workflows.WorkflowStateEnabled if v := d.Get("enabled").(bool); !v { - isEnabled = logic.WorkflowStateDisabled + isEnabled = workflows.WorkflowStateDisabled } - identity, err := expandLogicAppWorkflowIdentity(d.Get("identity").([]interface{})) + identity, err := identity.ExpandSystemOrUserAssignedMap(d.Get("identity").([]interface{})) if err != nil { return fmt.Errorf("expanding `identity`: %+v", err) } - properties := logic.Workflow{ + properties := workflows.Workflow{ Identity: identity, Location: utils.String(location), - WorkflowProperties: &logic.WorkflowProperties{ - Definition: definition, + Properties: &workflows.WorkflowProperties{ + Definition: &definition, Parameters: parameters, - State: isEnabled, + State: &isEnabled, }, Tags: tags.Expand(t), } if v, ok := d.GetOk("access_control"); ok { - properties.WorkflowProperties.AccessControl = expandLogicAppWorkflowAccessControl(v.([]interface{})) + properties.Properties.AccessControl = expandLogicAppWorkflowAccessControl(v.([]interface{})) } if v, ok := d.GetOk("logic_app_integration_account_id"); ok { - properties.WorkflowProperties.IntegrationAccount = &logic.ResourceReference{ - ID: utils.String(v.(string)), + properties.Properties.IntegrationAccount = &workflows.ResourceReference{ + Id: utils.String(v.(string)), } } if iseID, ok := d.GetOk("integration_service_environment_id"); ok { - properties.WorkflowProperties.IntegrationServiceEnvironment = &logic.ResourceReference{ - ID: utils.String(iseID.(string)), + properties.Properties.IntegrationServiceEnvironment = &workflows.ResourceReference{ + Id: utils.String(iseID.(string)), } } - if _, err = client.CreateOrUpdate(ctx, id.ResourceGroup, id.Name, properties); err != nil { + if _, err = client.CreateOrUpdate(ctx, *id, properties); err != nil { return fmt.Errorf("updating Logic App Workflow %s: %+v", id, err) } @@ -456,14 +465,14 @@ func resourceLogicAppWorkflowRead(d *pluginsdk.ResourceData, meta interface{}) e ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.WorkflowID(d.Id()) + id, err := workflows.ParseWorkflowID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.Name) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { + if response.WasNotFound(resp.HttpResponse) { log.Printf("[DEBUG] Logic App Workflow %s was not found - removing from state", id) d.SetId("") return nil @@ -471,93 +480,98 @@ func resourceLogicAppWorkflowRead(d *pluginsdk.ResourceData, meta interface{}) e return fmt.Errorf("[ERROR] Error making Read request on Logic App Workflow %s: %+v", id, err) } - d.Set("name", resp.Name) - d.Set("resource_group_name", id.ResourceGroup) + d.Set("name", id.WorkflowName) + d.Set("resource_group_name", id.ResourceGroupName) - if location := resp.Location; location != nil { - d.Set("location", azure.NormalizeLocation(*location)) - } + if model := resp.Model; model != nil { + if location := model.Location; location != nil { + d.Set("location", azure.NormalizeLocation(*location)) + } - identity, err := flattenLogicAppWorkflowIdentity(resp.Identity) - if err != nil { - return err - } - d.Set("identity", identity) + identity, err := identity.FlattenSystemOrUserAssignedMap(model.Identity) + if err != nil { + return err + } + d.Set("identity", identity) - if props := resp.WorkflowProperties; props != nil { - d.Set("access_endpoint", props.AccessEndpoint) + if props := model.Properties; props != nil { + d.Set("access_endpoint", props.AccessEndpoint) - if err := d.Set("access_control", flattenLogicAppWorkflowFlowAccessControl(props.AccessControl)); err != nil { - return fmt.Errorf("setting `access_control`: %+v", err) - } + if err := d.Set("access_control", flattenLogicAppWorkflowFlowAccessControl(props.AccessControl)); err != nil { + return fmt.Errorf("setting `access_control`: %+v", err) + } - if props.State != "" { - d.Set("enabled", props.State == logic.WorkflowStateEnabled) - } + if props.State != nil && *props.State != "" { + d.Set("enabled", *props.State == workflows.WorkflowStateEnabled) + } - if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Connector == nil { - d.Set("connector_endpoint_ip_addresses", []interface{}{}) - d.Set("connector_outbound_ip_addresses", []interface{}{}) - } else { - d.Set("connector_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.AccessEndpointIPAddresses)) - d.Set("connector_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.OutgoingIPAddresses)) - } + if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Connector == nil { + d.Set("connector_endpoint_ip_addresses", []interface{}{}) + d.Set("connector_outbound_ip_addresses", []interface{}{}) + } else { + d.Set("connector_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.AccessEndpointIPAddresses)) + d.Set("connector_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Connector.OutgoingIPAddresses)) + } - if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Workflow == nil { - d.Set("workflow_endpoint_ip_addresses", []interface{}{}) - d.Set("workflow_outbound_ip_addresses", []interface{}{}) - } else { - d.Set("workflow_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.AccessEndpointIPAddresses)) - d.Set("workflow_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.OutgoingIPAddresses)) - } - if definition := props.Definition; definition != nil { - if v, ok := definition.(map[string]interface{}); ok { - if v["$schema"] != nil { - d.Set("workflow_schema", v["$schema"].(string)) - } - if v["contentVersion"] != nil { - d.Set("workflow_version", v["contentVersion"].(string)) - } - if p, ok := v["parameters"]; ok { - workflowParameters, err := flattenLogicAppWorkflowWorkflowParameters(p.(map[string]interface{})) - if err != nil { - return fmt.Errorf("flattening `workflow_parameters`: %+v", err) - } - if err := d.Set("workflow_parameters", workflowParameters); err != nil { - return fmt.Errorf("setting `workflow_parameters`: %+v", err) + if props.EndpointsConfiguration == nil || props.EndpointsConfiguration.Workflow == nil { + d.Set("workflow_endpoint_ip_addresses", []interface{}{}) + d.Set("workflow_outbound_ip_addresses", []interface{}{}) + } else { + d.Set("workflow_endpoint_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.AccessEndpointIPAddresses)) + d.Set("workflow_outbound_ip_addresses", flattenIPAddresses(props.EndpointsConfiguration.Workflow.OutgoingIPAddresses)) + } + if definition := props.Definition; definition != nil { + definitionRaw := *props.Definition + if v, ok := definitionRaw.(map[string]interface{}); ok { + if v["$schema"] != nil { + d.Set("workflow_schema", v["$schema"].(string)) } - - // The props.Parameters (the value of the param) is accompany with the "parameters" (the definition of the param) inside the props.Definition. - // We will need to make use of the definition of the parameters in order to properly flatten the value of the parameters being set (for kinds of types). - parameters, err := flattenLogicAppWorkflowParameters(d, props.Parameters, p.(map[string]interface{})) - if err != nil { - return fmt.Errorf("flattening `parameters`: %v", err) + if v["contentVersion"] != nil { + d.Set("workflow_version", v["contentVersion"].(string)) } - if err := d.Set("parameters", parameters); err != nil { - return fmt.Errorf("setting `parameters`: %+v", err) + if p, ok := v["parameters"]; ok { + workflowParameters, err := flattenLogicAppWorkflowWorkflowParameters(p.(map[string]interface{})) + if err != nil { + return fmt.Errorf("flattening `workflow_parameters`: %+v", err) + } + if err := d.Set("workflow_parameters", workflowParameters); err != nil { + return fmt.Errorf("setting `workflow_parameters`: %+v", err) + } + + // The props.Parameters (the value of the param) is accompany with the "parameters" (the definition of the param) inside the props.Definition. + // We will need to make use of the definition of the parameters in order to properly flatten the value of the parameters being set (for kinds of types). + parameters, err := flattenLogicAppWorkflowParameters(d, props.Parameters, p.(map[string]interface{})) + if err != nil { + return fmt.Errorf("flattening `parameters`: %v", err) + } + if err := d.Set("parameters", parameters); err != nil { + return fmt.Errorf("setting `parameters`: %+v", err) + } } } } - } - integrationServiceEnvironmentId := "" - if props.IntegrationServiceEnvironment != nil && props.IntegrationServiceEnvironment.ID != nil { - integrationServiceEnvironmentId = *props.IntegrationServiceEnvironment.ID - } - d.Set("integration_service_environment_id", integrationServiceEnvironmentId) + integrationServiceEnvironmentId := "" + if props.IntegrationServiceEnvironment != nil && props.IntegrationServiceEnvironment.Id != nil { + integrationServiceEnvironmentId = *props.IntegrationServiceEnvironment.Id + } + d.Set("integration_service_environment_id", integrationServiceEnvironmentId) - if props.IntegrationAccount != nil && props.IntegrationAccount.ID != nil { - d.Set("logic_app_integration_account_id", props.IntegrationAccount.ID) - } + if props.IntegrationAccount != nil && props.IntegrationAccount.Id != nil { + d.Set("logic_app_integration_account_id", props.IntegrationAccount.Id) + } - integrationAccountId := "" - if props.IntegrationAccount != nil && props.IntegrationAccount.ID != nil { - integrationAccountId = *props.IntegrationAccount.ID + integrationAccountId := "" + if props.IntegrationAccount != nil && props.IntegrationAccount.Id != nil { + integrationAccountId = *props.IntegrationAccount.Id + } + d.Set("logic_app_integration_account_id", integrationAccountId) } - d.Set("logic_app_integration_account_id", integrationAccountId) + + return tags.FlattenAndSet(d, model.Tags) } - return tags.FlattenAndSet(d, resp.Tags) + return nil } func resourceLogicAppWorkflowDelete(d *pluginsdk.ResourceData, meta interface{}) error { @@ -565,18 +579,18 @@ func resourceLogicAppWorkflowDelete(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.WorkflowID(d.Id()) + id, err := workflows.ParseWorkflowID(d.Id()) if err != nil { return err } // lock to prevent against Actions, Parameters or Triggers conflicting - locks.ByName(id.Name, logicAppResourceName) - defer locks.UnlockByName(id.Name, logicAppResourceName) + locks.ByName(id.WorkflowName, logicAppResourceName) + defer locks.UnlockByName(id.WorkflowName, logicAppResourceName) - resp, err := client.Delete(ctx, id.ResourceGroup, id.Name) + resp, err := client.Delete(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp) { + if response.WasNotFound(resp.HttpResponse) { return nil } @@ -586,8 +600,8 @@ func resourceLogicAppWorkflowDelete(d *pluginsdk.ResourceData, meta interface{}) return nil } -func expandLogicAppWorkflowParameters(input map[string]interface{}, paramDefs map[string]interface{}) (map[string]*logic.WorkflowParameter, error) { - output := make(map[string]*logic.WorkflowParameter) +func expandLogicAppWorkflowParameters(input map[string]interface{}, paramDefs map[string]interface{}) (*map[string]workflows.WorkflowParameter, error) { + output := make(map[string]workflows.WorkflowParameter) for k, v := range input { defRaw, ok := paramDefs[k] @@ -595,59 +609,62 @@ func expandLogicAppWorkflowParameters(input map[string]interface{}, paramDefs ma return nil, fmt.Errorf("no parameter definition for %s", k) } def := defRaw.(map[string]interface{}) - t := logic.ParameterType(def["type"].(string)) + t := workflows.ParameterType(def["type"].(string)) v := v.(string) var value interface{} switch t { - case logic.ParameterTypeBool: + case workflows.ParameterTypeBool: var uv bool if err := json.Unmarshal([]byte(v), &uv); err != nil { return nil, fmt.Errorf("unmarshalling %s to bool: %v", k, err) } value = uv - case logic.ParameterTypeFloat: + case workflows.ParameterTypeFloat: var uv float64 if err := json.Unmarshal([]byte(v), &uv); err != nil { return nil, fmt.Errorf("unmarshalling %s to float64: %v", k, err) } value = uv - case logic.ParameterTypeInt: + case workflows.ParameterTypeInt: var uv int if err := json.Unmarshal([]byte(v), &uv); err != nil { return nil, fmt.Errorf("unmarshalling %s to int: %v", k, err) } value = uv - case logic.ParameterTypeArray: + case workflows.ParameterTypeArray: var uv []interface{} if err := json.Unmarshal([]byte(v), &uv); err != nil { return nil, fmt.Errorf("unmarshalling %s to []interface{}: %v", k, err) } value = uv - case logic.ParameterTypeObject, - logic.ParameterTypeSecureObject: + case workflows.ParameterTypeObject, + workflows.ParameterTypeSecureObject: var uv map[string]interface{} if err := json.Unmarshal([]byte(v), &uv); err != nil { return nil, fmt.Errorf("unmarshalling %s to map[string]interface{}: %v", k, err) } value = uv - case logic.ParameterTypeString, - logic.ParameterTypeSecureString: + case workflows.ParameterTypeString, + workflows.ParameterTypeSecureString: value = v } - output[k] = &logic.WorkflowParameter{ - Type: t, - Value: value, + output[k] = workflows.WorkflowParameter{ + Type: &t, + Value: &value, } } - return output, nil + return &output, nil } -func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input map[string]*logic.WorkflowParameter, paramDefs map[string]interface{}) (map[string]interface{}, error) { +func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input *map[string]workflows.WorkflowParameter, paramDefs map[string]interface{}) (map[string]interface{}, error) { output := make(map[string]interface{}) + if input == nil { + return output, nil + } // Read the "parameters" from state, which is used to fill in the "sensitive" properties. paramInState := make(map[string]interface{}) @@ -656,7 +673,7 @@ func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input map[stri paramInState = params } - for k, v := range input { + for k, v := range *input { defRaw, ok := paramDefs[k] if !ok { // This should never happen. @@ -664,18 +681,17 @@ func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input map[stri continue } - if v == nil { - log.Printf("[WARN] The value of parameter %s is nil", k) - continue - } - def := defRaw.(map[string]interface{}) - t := logic.ParameterType(def["type"].(string)) + t := workflows.ParameterType(def["type"].(string)) var value string switch t { - case logic.ParameterTypeBool: - tv, ok := v.Value.(bool) + case workflows.ParameterTypeBool: + if v.Value == nil { + return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got nil", k) + } + valueRaw := *v.Value + tv, ok := valueRaw.(bool) if !ok { return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got %T", k, v.Value) } @@ -683,23 +699,35 @@ func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input map[stri if !tv { value = "false" } - case logic.ParameterTypeFloat: + case workflows.ParameterTypeFloat: + if v.Value == nil { + return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got nil", k) + } + valueRaw := *v.Value // Note that the json unmarshalled response doesn't differ between float and int, as json has only type number. - tv, ok := v.Value.(float64) + tv, ok := valueRaw.(float64) if !ok { return nil, fmt.Errorf("the value of parameter %s is expected to be float64, but got %T", k, v.Value) } value = strconv.FormatFloat(tv, 'f', -1, 64) - case logic.ParameterTypeInt: + case workflows.ParameterTypeInt: + if v.Value == nil { + return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got nil", k) + } + valueRaw := *v.Value // Note that the json unmarshalled response doesn't differ between float and int, as json has only type number. - tv, ok := v.Value.(float64) + tv, ok := valueRaw.(float64) if !ok { return nil, fmt.Errorf("the value of parameter %s is expected to be float64, but got %T", k, v.Value) } value = strconv.Itoa(int(tv)) - case logic.ParameterTypeArray: - tv, ok := v.Value.([]interface{}) + case workflows.ParameterTypeArray: + if v.Value == nil { + return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got nil", k) + } + valueRaw := *v.Value + tv, ok := valueRaw.([]interface{}) if !ok { return nil, fmt.Errorf("the value of parameter %s is expected to be []interface{}, but got %T", k, v.Value) } @@ -709,8 +737,12 @@ func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input map[stri } value = string(obj) - case logic.ParameterTypeObject: - tv, ok := v.Value.(map[string]interface{}) + case workflows.ParameterTypeObject: + if v.Value == nil { + return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got nil", k) + } + valueRaw := *v.Value + tv, ok := valueRaw.(map[string]interface{}) if !ok { return nil, fmt.Errorf("the value of parameter %s is expected to be map[string]interface{}, but got %T", k, v.Value) } @@ -720,15 +752,19 @@ func flattenLogicAppWorkflowParameters(d *pluginsdk.ResourceData, input map[stri } value = string(obj) - case logic.ParameterTypeString: - tv, ok := v.Value.(string) + case workflows.ParameterTypeString: + if v.Value == nil { + return nil, fmt.Errorf("the value of parameter %s is expected to be bool, but got nil", k) + } + valueRaw := *v.Value + tv, ok := valueRaw.(string) if !ok { return nil, fmt.Errorf("the value of parameter %s is expected to be string, but got %T", k, v.Value) } value = tv - case logic.ParameterTypeSecureString, - logic.ParameterTypeSecureObject: + case workflows.ParameterTypeSecureString, + workflows.ParameterTypeSecureObject: // This is not returned from API, we will try to read them from the state instead. if v, ok := paramInState[k]; ok { value = v.(string) // The value in state here is guaranteed to be a string, so directly cast the type. @@ -757,13 +793,13 @@ func expandLogicAppWorkflowWorkflowParameters(input map[string]interface{}) (map return output, nil } -func expandLogicAppWorkflowAccessControl(input []interface{}) *logic.FlowAccessControlConfiguration { +func expandLogicAppWorkflowAccessControl(input []interface{}) *workflows.FlowAccessControlConfiguration { if len(input) == 0 { return nil } v := input[0].(map[string]interface{}) - result := logic.FlowAccessControlConfiguration{} + result := workflows.FlowAccessControlConfiguration{} if contents := v["content"].([]interface{}); len(contents) != 0 { result.Contents = expandLogicAppWorkflowAccessControlConfigurationPolicy(contents) @@ -784,31 +820,31 @@ func expandLogicAppWorkflowAccessControl(input []interface{}) *logic.FlowAccessC return &result } -func expandLogicAppWorkflowAccessControlConfigurationPolicy(input []interface{}) *logic.FlowAccessControlConfigurationPolicy { +func expandLogicAppWorkflowAccessControlConfigurationPolicy(input []interface{}) *workflows.FlowAccessControlConfigurationPolicy { if len(input) == 0 || input[0] == nil { return nil } v := input[0].(map[string]interface{}) - return &logic.FlowAccessControlConfigurationPolicy{ + return &workflows.FlowAccessControlConfigurationPolicy{ AllowedCallerIPAddresses: expandLogicAppWorkflowIPAddressRanges(v["allowed_caller_ip_address_range"].(*pluginsdk.Set).List()), } } -func expandLogicAppWorkflowAccessControlTriggerConfigurationPolicy(input []interface{}) *logic.FlowAccessControlConfigurationPolicy { +func expandLogicAppWorkflowAccessControlTriggerConfigurationPolicy(input []interface{}) *workflows.FlowAccessControlConfigurationPolicy { if len(input) == 0 || input[0] == nil { return nil } v := input[0].(map[string]interface{}) - result := logic.FlowAccessControlConfigurationPolicy{ + result := workflows.FlowAccessControlConfigurationPolicy{ AllowedCallerIPAddresses: expandLogicAppWorkflowIPAddressRanges(v["allowed_caller_ip_address_range"].(*pluginsdk.Set).List()), } if openAuthenticationPolicy, ok := v["open_authentication_policy"]; ok { openAuthenticationPolicies := openAuthenticationPolicy.(*pluginsdk.Set).List() if len(openAuthenticationPolicies) != 0 { - result.OpenAuthenticationPolicies = &logic.OpenAuthenticationAccessPolicies{ + result.OpenAuthenticationPolicies = &workflows.OpenAuthenticationAccessPolicies{ Policies: expandLogicAppWorkflowOpenAuthenticationPolicy(openAuthenticationPolicies), } } @@ -817,11 +853,11 @@ func expandLogicAppWorkflowAccessControlTriggerConfigurationPolicy(input []inter return &result } -func expandLogicAppWorkflowIPAddressRanges(input []interface{}) *[]logic.IPAddressRange { - results := make([]logic.IPAddressRange, 0) +func expandLogicAppWorkflowIPAddressRanges(input []interface{}) *[]workflows.IPAddressRange { + results := make([]workflows.IPAddressRange, 0) for _, item := range input { - results = append(results, logic.IPAddressRange{ + results = append(results, workflows.IPAddressRange{ AddressRange: utils.String(item.(string)), }) } @@ -829,32 +865,33 @@ func expandLogicAppWorkflowIPAddressRanges(input []interface{}) *[]logic.IPAddre return &results } -func expandLogicAppWorkflowOpenAuthenticationPolicy(input []interface{}) map[string]*logic.OpenAuthenticationAccessPolicy { +func expandLogicAppWorkflowOpenAuthenticationPolicy(input []interface{}) *map[string]workflows.OpenAuthenticationAccessPolicy { if len(input) == 0 { return nil } - results := make(map[string]*logic.OpenAuthenticationAccessPolicy) + results := make(map[string]workflows.OpenAuthenticationAccessPolicy) for _, item := range input { v := item.(map[string]interface{}) policyName := v["name"].(string) - results[policyName] = &logic.OpenAuthenticationAccessPolicy{ - Type: logic.OpenAuthenticationProviderTypeAAD, + policyType := workflows.OpenAuthenticationProviderTypeAAD + results[policyName] = workflows.OpenAuthenticationAccessPolicy{ + Type: &policyType, Claims: expandLogicAppWorkflowOpenAuthenticationPolicyClaim(v["claim"].(*pluginsdk.Set).List()), } } - return results + return &results } -func expandLogicAppWorkflowOpenAuthenticationPolicyClaim(input []interface{}) *[]logic.OpenAuthenticationPolicyClaim { - results := make([]logic.OpenAuthenticationPolicyClaim, 0) +func expandLogicAppWorkflowOpenAuthenticationPolicyClaim(input []interface{}) *[]workflows.OpenAuthenticationPolicyClaim { + results := make([]workflows.OpenAuthenticationPolicyClaim, 0) for _, item := range input { v := item.(map[string]interface{}) - results = append(results, logic.OpenAuthenticationPolicyClaim{ + results = append(results, workflows.OpenAuthenticationPolicyClaim{ Name: utils.String(v["name"].(string)), Value: utils.String(v["value"].(string)), }) @@ -862,60 +899,6 @@ func expandLogicAppWorkflowOpenAuthenticationPolicyClaim(input []interface{}) *[ return &results } -func expandLogicAppWorkflowIdentity(input []interface{}) (*logic.ManagedServiceIdentity, error) { - config, err := identity.ExpandSystemOrUserAssignedMap(input) - if err != nil { - return nil, err - } - - var identityIds map[string]*logic.UserAssignedIdentity - if len(config.IdentityIds) != 0 { - identityIds = map[string]*logic.UserAssignedIdentity{} - for id := range config.IdentityIds { - identityIds[id] = &logic.UserAssignedIdentity{} - } - } - - return &logic.ManagedServiceIdentity{ - Type: logic.ManagedServiceIdentityType(config.Type), - UserAssignedIdentities: identityIds, - }, nil -} - -func flattenLogicAppWorkflowIdentity(input *logic.ManagedServiceIdentity) (*[]interface{}, error) { - var config *identity.SystemOrUserAssignedMap - if input != nil { - identityIds := map[string]identity.UserAssignedIdentityDetails{} - for id := range input.UserAssignedIdentities { - parsedId, err := commonids.ParseUserAssignedIdentityIDInsensitively(id) - if err != nil { - return nil, err - } - identityIds[parsedId.ID()] = identity.UserAssignedIdentityDetails{ - // intentionally empty - } - } - - principalId := "" - if input.PrincipalID != nil { - principalId = input.PrincipalID.String() - } - - tenantId := "" - if input.TenantID != nil { - tenantId = input.TenantID.String() - } - - config = &identity.SystemOrUserAssignedMap{ - Type: identity.Type(string(input.Type)), - PrincipalId: principalId, - TenantId: tenantId, - IdentityIds: identityIds, - } - } - return identity.FlattenSystemOrUserAssignedMap(config) -} - func flattenLogicAppWorkflowWorkflowParameters(input map[string]interface{}) (map[string]interface{}, error) { if input == nil { return nil, nil @@ -931,7 +914,7 @@ func flattenLogicAppWorkflowWorkflowParameters(input map[string]interface{}) (ma return output, nil } -func flattenIPAddresses(input *[]logic.IPAddress) []interface{} { +func flattenIPAddresses(input *[]workflows.IPAddress) []interface{} { if input == nil { return []interface{}{} } @@ -943,7 +926,7 @@ func flattenIPAddresses(input *[]logic.IPAddress) []interface{} { return addresses } -func flattenLogicAppWorkflowFlowAccessControl(input *logic.FlowAccessControlConfiguration) []interface{} { +func flattenLogicAppWorkflowFlowAccessControl(input *workflows.FlowAccessControlConfiguration) []interface{} { if input == nil { return make([]interface{}, 0) } @@ -958,7 +941,7 @@ func flattenLogicAppWorkflowFlowAccessControl(input *logic.FlowAccessControlConf } } -func flattenLogicAppWorkflowAccessControlConfigurationPolicy(input *logic.FlowAccessControlConfigurationPolicy) []interface{} { +func flattenLogicAppWorkflowAccessControlConfigurationPolicy(input *workflows.FlowAccessControlConfigurationPolicy) []interface{} { if input == nil { return []interface{}{} } @@ -970,7 +953,7 @@ func flattenLogicAppWorkflowAccessControlConfigurationPolicy(input *logic.FlowAc } } -func flattenLogicAppWorkflowAccessControlTriggerConfigurationPolicy(input *logic.FlowAccessControlConfigurationPolicy) []interface{} { +func flattenLogicAppWorkflowAccessControlTriggerConfigurationPolicy(input *workflows.FlowAccessControlConfigurationPolicy) []interface{} { if input == nil { return []interface{}{} } @@ -983,7 +966,7 @@ func flattenLogicAppWorkflowAccessControlTriggerConfigurationPolicy(input *logic } } -func flattenLogicAppWorkflowIPAddressRanges(input *[]logic.IPAddressRange) []interface{} { +func flattenLogicAppWorkflowIPAddressRanges(input *[]workflows.IPAddressRange) []interface{} { results := make([]interface{}, 0) if input == nil { return results @@ -1000,13 +983,13 @@ func flattenLogicAppWorkflowIPAddressRanges(input *[]logic.IPAddressRange) []int return results } -func flattenLogicAppWorkflowOpenAuthenticationPolicy(input *logic.OpenAuthenticationAccessPolicies) []interface{} { +func flattenLogicAppWorkflowOpenAuthenticationPolicy(input *workflows.OpenAuthenticationAccessPolicies) []interface{} { results := make([]interface{}, 0) if input == nil || input.Policies == nil { return results } - for k, v := range input.Policies { + for k, v := range *input.Policies { results = append(results, map[string]interface{}{ "name": k, "claim": flattenLogicAppWorkflowOpenAuthenticationPolicyClaim(v.Claims), @@ -1016,7 +999,7 @@ func flattenLogicAppWorkflowOpenAuthenticationPolicy(input *logic.OpenAuthentica return results } -func flattenLogicAppWorkflowOpenAuthenticationPolicyClaim(input *[]logic.OpenAuthenticationPolicyClaim) []interface{} { +func flattenLogicAppWorkflowOpenAuthenticationPolicyClaim(input *[]workflows.OpenAuthenticationPolicyClaim) []interface{} { results := make([]interface{}, 0) if input == nil { return results diff --git a/internal/services/logic/logic_app_workflow_resource_test.go b/internal/services/logic/logic_app_workflow_resource_test.go index 1704788258c6..3ab8c2bf7929 100644 --- a/internal/services/logic/logic_app_workflow_resource_test.go +++ b/internal/services/logic/logic_app_workflow_resource_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" "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/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/utils" ) @@ -212,17 +212,17 @@ func TestAccLogicAppWorkflow_identity(t *testing.T) { } func (LogicAppWorkflowResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := parse.WorkflowID(state.ID) + id, err := workflows.ParseWorkflowID(state.ID) if err != nil { return nil, err } - resp, err := clients.Logic.WorkflowClient.Get(ctx, id.ResourceGroup, id.Name) + resp, err := clients.Logic.WorkflowClient.Get(ctx, *id) if err != nil { return nil, fmt.Errorf("retrieving Logic App Workflow %s: %+v", id, err) } - return utils.Bool(resp.WorkflowProperties != nil), nil + return utils.Bool(resp.Model != nil), nil } func (LogicAppWorkflowResource) empty(data acceptance.TestData) string { diff --git a/internal/services/logic/logic_apps.go b/internal/services/logic/logic_apps.go index edc3d41d605e..f90ce008361b 100644 --- a/internal/services/logic/logic_apps.go +++ b/internal/services/logic/logic_apps.go @@ -4,14 +4,16 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" // nolint: staticcheck + "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/hashicorp/terraform-provider-azurerm/utils" ) // NOTE: this file is not a recommended way of developing Terraform resources; this exists to work around the fact that this API is dynamic (by its nature) @@ -43,15 +45,15 @@ func expandLogicAppActionRunAfter(input []interface{}) map[string]interface{} { return output } -func resourceLogicAppActionUpdate(d *pluginsdk.ResourceData, meta interface{}, workflowId parse.WorkflowId, actionId parse.ActionId, vals map[string]interface{}, resourceName string) error { +func resourceLogicAppActionUpdate(d *pluginsdk.ResourceData, meta interface{}, workflowId workflows.WorkflowId, actionId parse.ActionId, vals map[string]interface{}, resourceName string) error { return resourceLogicAppComponentUpdate(d, meta, "Action", "actions", workflowId, actionId.ID(), actionId.Name, vals, resourceName) } -func resourceLogicAppTriggerUpdate(d *pluginsdk.ResourceData, meta interface{}, workflowId parse.WorkflowId, triggerId parse.TriggerId, vals map[string]interface{}, resourceName string) error { - return resourceLogicAppComponentUpdate(d, meta, "Trigger", "triggers", workflowId, triggerId.ID(), triggerId.Name, vals, resourceName) +func resourceLogicAppTriggerUpdate(d *pluginsdk.ResourceData, meta interface{}, workflowId workflows.WorkflowId, triggerId workflowtriggers.TriggerId, vals map[string]interface{}, resourceName string) error { + return resourceLogicAppComponentUpdate(d, meta, "Trigger", "triggers", workflowId, triggerId.ID(), triggerId.TriggerName, vals, resourceName) } -func resourceLogicAppComponentUpdate(d *pluginsdk.ResourceData, meta interface{}, kind string, propertyName string, workflowId parse.WorkflowId, resourceId string, name string, vals map[string]interface{}, resourceName string) error { +func resourceLogicAppComponentUpdate(d *pluginsdk.ResourceData, meta interface{}, kind string, propertyName string, workflowId workflows.WorkflowId, resourceId string, name string, vals map[string]interface{}, resourceName string) error { client := meta.(*clients.Client).Logic.WorkflowClient ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() @@ -59,28 +61,29 @@ func resourceLogicAppComponentUpdate(d *pluginsdk.ResourceData, meta interface{} log.Printf("[DEBUG] Preparing arguments for Logic App Workspace %s %s %q", workflowId, kind, name) // lock to prevent against Actions or Triggers conflicting - locks.ByName(workflowId.Name, logicAppResourceName) - defer locks.UnlockByName(workflowId.Name, logicAppResourceName) + locks.ByName(workflowId.WorkflowName, logicAppResourceName) + defer locks.UnlockByName(workflowId.WorkflowName, logicAppResourceName) - read, err := client.Get(ctx, workflowId.ResourceGroup, workflowId.Name) + read, err := client.Get(ctx, workflowId) if err != nil { - if utils.ResponseWasNotFound(read.Response) { + if response.WasNotFound(read.HttpResponse) { return fmt.Errorf("[ERROR] Logic App Workflow %s was not found", workflowId) } return fmt.Errorf("[ERROR] Error making Read request on Logic App Workflow %s: %+v", workflowId, err) } - if read.WorkflowProperties == nil { + if read.Model == nil || read.Model.Properties == nil { return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties` is nil") } - if read.WorkflowProperties.Definition == nil { + if read.Model.Properties.Definition == nil { return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties.Definition` is nil") } - definition := read.WorkflowProperties.Definition.(map[string]interface{}) - vs := definition[propertyName].(map[string]interface{}) + rawDefinition := *read.Model.Properties.Definition + definitionMap := rawDefinition.(map[string]interface{}) + vs := definitionMap[propertyName].(map[string]interface{}) if d.IsNewResource() { if _, hasExisting := vs[name]; hasExisting { @@ -89,29 +92,30 @@ func resourceLogicAppComponentUpdate(d *pluginsdk.ResourceData, meta interface{} } vs[name] = vals - definition[propertyName] = vs + definitionMap[propertyName] = vs + rawDefinition = definitionMap - if read.Identity != nil && read.Identity.UserAssignedIdentities != nil { - for k := range read.Identity.UserAssignedIdentities { - read.Identity.UserAssignedIdentities[k] = &logic.UserAssignedIdentity{ + if read.Model.Identity != nil && read.Model.Identity.IdentityIds != nil { + for k := range read.Model.Identity.IdentityIds { + read.Model.Identity.IdentityIds[k] = identity.UserAssignedIdentityDetails{ // this has to be an empty object due to the API design } } } - properties := logic.Workflow{ - Location: read.Location, - WorkflowProperties: &logic.WorkflowProperties{ - Definition: definition, - Parameters: read.WorkflowProperties.Parameters, - AccessControl: read.WorkflowProperties.AccessControl, - IntegrationAccount: read.WorkflowProperties.IntegrationAccount, - IntegrationServiceEnvironment: read.IntegrationServiceEnvironment, + properties := workflows.Workflow{ + Location: read.Model.Location, + Properties: &workflows.WorkflowProperties{ + Definition: &rawDefinition, + Parameters: read.Model.Properties.Parameters, + AccessControl: read.Model.Properties.AccessControl, + IntegrationAccount: read.Model.Properties.IntegrationAccount, + IntegrationServiceEnvironment: read.Model.Properties.IntegrationServiceEnvironment, }, - Identity: read.Identity, - Tags: read.Tags, + Identity: read.Model.Identity, + Tags: read.Model.Tags, } - if _, err = client.CreateOrUpdate(ctx, workflowId.ResourceGroup, workflowId.Name, properties); err != nil { + if _, err = client.CreateOrUpdate(ctx, workflowId, properties); err != nil { return fmt.Errorf("updating Logic App Workflow %s for %s %q: %+v", workflowId, kind, name, err) } @@ -122,141 +126,159 @@ func resourceLogicAppComponentUpdate(d *pluginsdk.ResourceData, meta interface{} return nil } -func resourceLogicAppActionRemove(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, logicAppName, name string) error { - return resourceLogicAppComponentRemove(d, meta, "Action", "actions", resourceGroup, logicAppName, name) +func resourceLogicAppActionRemove(d *pluginsdk.ResourceData, meta interface{}, id workflows.WorkflowId, name string) error { + return resourceLogicAppComponentRemove(d, meta, "Action", "actions", id, name) } -func resourceLogicAppTriggerRemove(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, logicAppName, name string) error { - return resourceLogicAppComponentRemove(d, meta, "Trigger", "triggers", resourceGroup, logicAppName, name) +func resourceLogicAppTriggerRemove(d *pluginsdk.ResourceData, meta interface{}, id workflows.WorkflowId, name string) error { + return resourceLogicAppComponentRemove(d, meta, "Trigger", "triggers", id, name) } -func resourceLogicAppComponentRemove(d *pluginsdk.ResourceData, meta interface{}, kind, propertyName, resourceGroup, logicAppName, name string) error { +func resourceLogicAppComponentRemove(d *pluginsdk.ResourceData, meta interface{}, kind, propertyName string, id workflows.WorkflowId, name string) error { client := meta.(*clients.Client).Logic.WorkflowClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - log.Printf("[DEBUG] Preparing arguments for Logic App Workspace %q (Resource Group %q) %s %q Deletion", logicAppName, resourceGroup, kind, name) + log.Printf("[DEBUG] Preparing arguments for Logic App Workspace %q (Resource Group %q) %s %q Deletion", id.WorkflowName, id.ResourceGroupName, kind, name) // lock to prevent against Actions, Parameters or Actions conflicting - locks.ByName(logicAppName, logicAppResourceName) - defer locks.UnlockByName(logicAppName, logicAppResourceName) + locks.ByName(id.WorkflowName, logicAppResourceName) + defer locks.UnlockByName(id.WorkflowName, logicAppResourceName) - read, err := client.Get(ctx, resourceGroup, logicAppName) + read, err := client.Get(ctx, id) if err != nil { - if utils.ResponseWasNotFound(read.Response) { + if response.WasNotFound(read.HttpResponse) { d.SetId("") return nil } - return fmt.Errorf("[ERROR] Error making Read request on Logic App Workflow %q (Resource Group %q): %+v", logicAppName, resourceGroup, err) + return fmt.Errorf("[ERROR] Error making Read request on %s: %+v", id.ID(), err) } - if read.WorkflowProperties == nil { - return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties` is nil") + if read.Model == nil { + return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `Model` is nil") + } + + if read.Model.Properties == nil { + return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `Properties` is nil") } - if read.WorkflowProperties.Definition == nil { + if read.Model.Properties.Definition == nil { return fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties.Definition` is nil") } - definition := read.WorkflowProperties.Definition.(map[string]interface{}) - vs := definition[propertyName].(map[string]interface{}) + var definition interface{} + definitionRaw := *read.Model.Properties.Definition + definitionMap := definitionRaw.(map[string]interface{}) + vs := definitionMap[propertyName].(map[string]interface{}) delete(vs, name) - definition[propertyName] = vs - - properties := logic.Workflow{ - Location: read.Location, - WorkflowProperties: &logic.WorkflowProperties{ - Definition: definition, - Parameters: read.WorkflowProperties.Parameters, - AccessControl: read.WorkflowProperties.AccessControl, - IntegrationAccount: read.WorkflowProperties.IntegrationAccount, - IntegrationServiceEnvironment: read.IntegrationServiceEnvironment, + definitionMap[propertyName] = vs + definition = definitionMap + + properties := workflows.Workflow{ + Location: read.Model.Location, + Properties: &workflows.WorkflowProperties{ + Definition: &definition, + Parameters: read.Model.Properties.Parameters, + AccessControl: read.Model.Properties.AccessControl, + IntegrationAccount: read.Model.Properties.IntegrationAccount, + IntegrationServiceEnvironment: read.Model.Properties.IntegrationServiceEnvironment, }, - Tags: read.Tags, + Tags: read.Model.Tags, } - if _, err = client.CreateOrUpdate(ctx, resourceGroup, logicAppName, properties); err != nil { - return fmt.Errorf("removing %s %q from Logic App Workspace %q (Resource Group %q): %+v", kind, name, logicAppName, resourceGroup, err) + if _, err = client.CreateOrUpdate(ctx, id, properties); err != nil { + return fmt.Errorf("removing %s %q from %s: %+v", kind, name, id.ID(), err) } return nil } -func retrieveLogicAppAction(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, logicAppName, name string) (*map[string]interface{}, *logic.Workflow, error) { - return retrieveLogicAppComponent(d, meta, resourceGroup, "Action", "actions", logicAppName, name) +func retrieveLogicAppAction(d *pluginsdk.ResourceData, meta interface{}, id workflows.WorkflowId, name string) (*map[string]interface{}, *workflows.Workflow, error) { + return retrieveLogicAppComponent(d, meta, "Action", "actions", id, name) } -func retrieveLogicAppHttpTrigger(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, logicAppName, name string) (*map[string]interface{}, *logic.Workflow, *string, error) { - t, app, err := retrieveLogicAppTrigger(d, meta, resourceGroup, logicAppName, name) +func retrieveLogicAppHttpTrigger(d *pluginsdk.ResourceData, meta interface{}, id workflowtriggers.TriggerId) (*map[string]interface{}, *workflows.Workflow, *string, error) { + workflowId := workflows.NewWorkflowID(id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) + + t, app, err := retrieveLogicAppTrigger(d, meta, workflowId, id.TriggerName) if err != nil || t == nil { return nil, nil, nil, err } - url, err := retreiveLogicAppTriggerCallbackUrl(d, meta, resourceGroup, logicAppName, name) + url, err := retreiveLogicAppTriggerCallbackUrl(d, meta, id) if err != nil { return nil, nil, nil, err } return t, app, url, err } -func retrieveLogicAppTrigger(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, logicAppName, name string) (*map[string]interface{}, *logic.Workflow, error) { - return retrieveLogicAppComponent(d, meta, resourceGroup, "Trigger", "triggers", logicAppName, name) +func retrieveLogicAppTrigger(d *pluginsdk.ResourceData, meta interface{}, id workflows.WorkflowId, name string) (*map[string]interface{}, *workflows.Workflow, error) { + return retrieveLogicAppComponent(d, meta, "Trigger", "triggers", id, name) } -func retreiveLogicAppTriggerCallbackUrl(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, logicAppName, name string) (*string, error) { +func retreiveLogicAppTriggerCallbackUrl(d *pluginsdk.ResourceData, meta interface{}, id workflowtriggers.TriggerId) (*string, error) { client := meta.(*clients.Client).Logic ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - log.Printf("[DEBUG] Preparing arguments for Logic App Workspace %q (Resource Group %q) %s %q", logicAppName, resourceGroup, "trigger", name) + log.Printf("[DEBUG] Preparing arguments for Logic App Workspace %q (Resource Group %q) %s %q", id.WorkflowName, id.ResourceGroupName, "trigger", id.TriggerName) // lock to prevent against Actions, Parameters or Actions conflicting - locks.ByName(logicAppName, logicAppResourceName) - defer locks.UnlockByName(logicAppName, logicAppResourceName) + locks.ByName(id.WorkflowName, logicAppResourceName) + defer locks.UnlockByName(id.WorkflowName, logicAppResourceName) - result, err := client.TriggersClient.ListCallbackURL(ctx, resourceGroup, logicAppName, name) + result, err := client.TriggersClient.ListCallbackUrl(ctx, id) if err != nil { return nil, fmt.Errorf("[ERROR] Error getting trigger callback URL (%w)", err) } - return result.Value, nil + if result.Model == nil { + return nil, fmt.Errorf("[ERROR] model was nil for %s", id.ID()) + } + + return result.Model.Value, nil } -func retrieveLogicAppComponent(d *pluginsdk.ResourceData, meta interface{}, resourceGroup, kind, propertyName, logicAppName, name string) (*map[string]interface{}, *logic.Workflow, error) { +func retrieveLogicAppComponent(d *pluginsdk.ResourceData, meta interface{}, kind, propertyName string, id workflows.WorkflowId, name string) (*map[string]interface{}, *workflows.Workflow, error) { client := meta.(*clients.Client).Logic.WorkflowClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - log.Printf("[DEBUG] Preparing arguments for Logic App Workspace %q (Resource Group %q) %s %q", logicAppName, resourceGroup, kind, name) + log.Printf("[DEBUG] Preparing arguments for %s: %s %q", id.ID(), kind, name) // lock to prevent against Actions, Parameters or Actions conflicting - locks.ByName(logicAppName, logicAppResourceName) - defer locks.UnlockByName(logicAppName, logicAppResourceName) + locks.ByName(id.WorkflowName, logicAppResourceName) + defer locks.UnlockByName(id.WorkflowName, logicAppResourceName) - read, err := client.Get(ctx, resourceGroup, logicAppName) + read, err := client.Get(ctx, id) if err != nil { - if utils.ResponseWasNotFound(read.Response) { + if response.WasNotFound(read.HttpResponse) { return nil, nil, nil } - return nil, nil, fmt.Errorf("[ERROR] Error making Read request on Logic App Workflow %q (Resource Group %q): %+v", logicAppName, resourceGroup, err) + return nil, nil, fmt.Errorf("[ERROR] Error making Read request %s: %+v", id.ID(), err) + } + + if read.Model == nil { + return nil, nil, fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `Model` is nil") } - if read.WorkflowProperties == nil { - return nil, nil, fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties` is nil") + if read.Model.Properties == nil { + return nil, nil, fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `Properties` is nil") } - if read.WorkflowProperties.Definition == nil { - return nil, nil, fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `WorkflowProperties.Definition` is nil") + if read.Model.Properties.Definition == nil { + return nil, nil, fmt.Errorf("[ERROR] Error parsing Logic App Workflow - `Properties.Definition` is nil") } - definition := read.WorkflowProperties.Definition.(map[string]interface{}) - vs := definition[propertyName].(map[string]interface{}) + definitionRaw := *read.Model.Properties.Definition + definitionMap := definitionRaw.(map[string]interface{}) + vs := definitionMap[propertyName].(map[string]interface{}) v := vs[name] if v == nil { return nil, nil, nil } result := v.(map[string]interface{}) - return &result, &read, nil + return &result, read.Model, nil } diff --git a/internal/services/logic/logic_apps_test.go b/internal/services/logic/logic_apps_test.go index ce48c0b17feb..895e9eafc06b 100644 --- a/internal/services/logic/logic_apps_test.go +++ b/internal/services/logic/logic_apps_test.go @@ -5,6 +5,8 @@ import ( "fmt" "strings" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows" + "github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -33,30 +35,37 @@ func componentExists(ctx context.Context, clients *clients.Client, state *plugin workflowName = id.WorkflowName name = id.Name } else { - id, err := parse.TriggerID(state.ID) + id, err := workflowtriggers.ParseTriggerID(state.ID) if err != nil { return nil, err } - resourceGroup = id.ResourceGroup + resourceGroup = id.ResourceGroupName workflowName = id.WorkflowName - name = id.Name + name = id.TriggerName } - resp, err := clients.Logic.WorkflowClient.Get(ctx, resourceGroup, workflowName) + subscriptionId := clients.Account.SubscriptionId + id := workflows.NewWorkflowID(subscriptionId, resourceGroup, workflowName) + resp, err := clients.Logic.WorkflowClient.Get(ctx, id) if err != nil { return nil, fmt.Errorf("retrieving Logic App Workflow %s %s (resource group: %s): %v", kind, workflowName, resourceGroup, err) } - if resp.WorkflowProperties == nil { + if resp.Model == nil { + return utils.Bool(false), nil + } + + if resp.Model.Properties == nil { return utils.Bool(false), nil } - if resp.WorkflowProperties.Definition == nil { + if resp.Model.Properties.Definition == nil { return nil, fmt.Errorf("Logic App Workflow %s %s (resource group: %s) Definition is nil", kind, workflowName, resourceGroup) } - definition := resp.WorkflowProperties.Definition.(map[string]interface{}) - actions := definition[propertyName].(map[string]interface{}) + definitionRaw := *resp.Model.Properties.Definition + definitionMap := definitionRaw.(map[string]interface{}) + actions := definitionMap[propertyName].(map[string]interface{}) exists := false for k := range actions { diff --git a/internal/services/logic/parse/integration_account.go b/internal/services/logic/parse/integration_account.go deleted file mode 100644 index c5a9a517a52b..000000000000 --- a/internal/services/logic/parse/integration_account.go +++ /dev/null @@ -1,69 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountId struct { - SubscriptionId string - ResourceGroup string - Name string -} - -func NewIntegrationAccountID(subscriptionId, resourceGroup, name string) IntegrationAccountId { - return IntegrationAccountId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - Name: name, - } -} - -func (id IntegrationAccountId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account", segmentsStr) -} - -func (id IntegrationAccountId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.Name) -} - -// IntegrationAccountID parses a IntegrationAccount ID into an IntegrationAccountId struct -func IntegrationAccountID(input string) (*IntegrationAccountId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.Name, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_agreement.go b/internal/services/logic/parse/integration_account_agreement.go deleted file mode 100644 index 0fab4f8adbda..000000000000 --- a/internal/services/logic/parse/integration_account_agreement.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountAgreementId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - AgreementName string -} - -func NewIntegrationAccountAgreementID(subscriptionId, resourceGroup, integrationAccountName, agreementName string) IntegrationAccountAgreementId { - return IntegrationAccountAgreementId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - AgreementName: agreementName, - } -} - -func (id IntegrationAccountAgreementId) String() string { - segments := []string{ - fmt.Sprintf("Agreement Name %q", id.AgreementName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Agreement", segmentsStr) -} - -func (id IntegrationAccountAgreementId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/agreements/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.AgreementName) -} - -// IntegrationAccountAgreementID parses a IntegrationAccountAgreement ID into an IntegrationAccountAgreementId struct -func IntegrationAccountAgreementID(input string) (*IntegrationAccountAgreementId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountAgreementId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.AgreementName, err = id.PopSegment("agreements"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_agreement_test.go b/internal/services/logic/parse/integration_account_agreement_test.go deleted file mode 100644 index c7854950808c..000000000000 --- a/internal/services/logic/parse/integration_account_agreement_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountAgreementId{} - -func TestIntegrationAccountAgreementIDFormatter(t *testing.T) { - actual := NewIntegrationAccountAgreementID("12345678-1234-9876-4563-123456789012", "group1", "account1", "agreement1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/agreements/agreement1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountAgreementID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountAgreementId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing AgreementName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Error: true, - }, - - { - // missing value for AgreementName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/agreements/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/agreements/agreement1", - Expected: &IntegrationAccountAgreementId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "account1", - AgreementName: "agreement1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/AGREEMENTS/AGREEMENT1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountAgreementID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.AgreementName != v.Expected.AgreementName { - t.Fatalf("Expected %q but got %q for AgreementName", v.Expected.AgreementName, actual.AgreementName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_assembly.go b/internal/services/logic/parse/integration_account_assembly.go deleted file mode 100644 index 6f7d3315b5cf..000000000000 --- a/internal/services/logic/parse/integration_account_assembly.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountAssemblyId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - AssemblyName string -} - -func NewIntegrationAccountAssemblyID(subscriptionId, resourceGroup, integrationAccountName, assemblyName string) IntegrationAccountAssemblyId { - return IntegrationAccountAssemblyId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - AssemblyName: assemblyName, - } -} - -func (id IntegrationAccountAssemblyId) String() string { - segments := []string{ - fmt.Sprintf("Assembly Name %q", id.AssemblyName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Assembly", segmentsStr) -} - -func (id IntegrationAccountAssemblyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/assemblies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.AssemblyName) -} - -// IntegrationAccountAssemblyID parses a IntegrationAccountAssembly ID into an IntegrationAccountAssemblyId struct -func IntegrationAccountAssemblyID(input string) (*IntegrationAccountAssemblyId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountAssemblyId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.AssemblyName, err = id.PopSegment("assemblies"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_assembly_test.go b/internal/services/logic/parse/integration_account_assembly_test.go deleted file mode 100644 index c6a4ba54ec76..000000000000 --- a/internal/services/logic/parse/integration_account_assembly_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountAssemblyId{} - -func TestIntegrationAccountAssemblyIDFormatter(t *testing.T) { - actual := NewIntegrationAccountAssemblyID("12345678-1234-9876-4563-123456789012", "group1", "account1", "assembly1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/assemblies/assembly1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountAssemblyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountAssemblyId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing AssemblyName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Error: true, - }, - - { - // missing value for AssemblyName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/assemblies/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/assemblies/assembly1", - Expected: &IntegrationAccountAssemblyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "account1", - AssemblyName: "assembly1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/ASSEMBLIES/ASSEMBLY1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountAssemblyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.AssemblyName != v.Expected.AssemblyName { - t.Fatalf("Expected %q but got %q for AssemblyName", v.Expected.AssemblyName, actual.AssemblyName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_batch_configuration.go b/internal/services/logic/parse/integration_account_batch_configuration.go deleted file mode 100644 index 6e0fa0353936..000000000000 --- a/internal/services/logic/parse/integration_account_batch_configuration.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountBatchConfigurationId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - BatchConfigurationName string -} - -func NewIntegrationAccountBatchConfigurationID(subscriptionId, resourceGroup, integrationAccountName, batchConfigurationName string) IntegrationAccountBatchConfigurationId { - return IntegrationAccountBatchConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - BatchConfigurationName: batchConfigurationName, - } -} - -func (id IntegrationAccountBatchConfigurationId) String() string { - segments := []string{ - fmt.Sprintf("Batch Configuration Name %q", id.BatchConfigurationName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Batch Configuration", segmentsStr) -} - -func (id IntegrationAccountBatchConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/batchConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.BatchConfigurationName) -} - -// IntegrationAccountBatchConfigurationID parses a IntegrationAccountBatchConfiguration ID into an IntegrationAccountBatchConfigurationId struct -func IntegrationAccountBatchConfigurationID(input string) (*IntegrationAccountBatchConfigurationId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountBatchConfigurationId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.BatchConfigurationName, err = id.PopSegment("batchConfigurations"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_batch_configuration_test.go b/internal/services/logic/parse/integration_account_batch_configuration_test.go deleted file mode 100644 index e8086d463715..000000000000 --- a/internal/services/logic/parse/integration_account_batch_configuration_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountBatchConfigurationId{} - -func TestIntegrationAccountBatchConfigurationIDFormatter(t *testing.T) { - actual := NewIntegrationAccountBatchConfigurationID("12345678-1234-9876-4563-123456789012", "group1", "account1", "batchConfiguration1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/batchConfigurations/batchConfiguration1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountBatchConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountBatchConfigurationId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing BatchConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Error: true, - }, - - { - // missing value for BatchConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/batchConfigurations/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/batchConfigurations/batchConfiguration1", - Expected: &IntegrationAccountBatchConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "account1", - BatchConfigurationName: "batchConfiguration1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/BATCHCONFIGURATIONS/BATCHCONFIGURATION1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountBatchConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.BatchConfigurationName != v.Expected.BatchConfigurationName { - t.Fatalf("Expected %q but got %q for BatchConfigurationName", v.Expected.BatchConfigurationName, actual.BatchConfigurationName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_certificate.go b/internal/services/logic/parse/integration_account_certificate.go deleted file mode 100644 index 20a8f62bbf43..000000000000 --- a/internal/services/logic/parse/integration_account_certificate.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountCertificateId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - CertificateName string -} - -func NewIntegrationAccountCertificateID(subscriptionId, resourceGroup, integrationAccountName, certificateName string) IntegrationAccountCertificateId { - return IntegrationAccountCertificateId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - CertificateName: certificateName, - } -} - -func (id IntegrationAccountCertificateId) String() string { - segments := []string{ - fmt.Sprintf("Certificate Name %q", id.CertificateName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Certificate", segmentsStr) -} - -func (id IntegrationAccountCertificateId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/certificates/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.CertificateName) -} - -// IntegrationAccountCertificateID parses a IntegrationAccountCertificate ID into an IntegrationAccountCertificateId struct -func IntegrationAccountCertificateID(input string) (*IntegrationAccountCertificateId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountCertificateId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.CertificateName, err = id.PopSegment("certificates"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_certificate_test.go b/internal/services/logic/parse/integration_account_certificate_test.go deleted file mode 100644 index 689ec613e248..000000000000 --- a/internal/services/logic/parse/integration_account_certificate_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountCertificateId{} - -func TestIntegrationAccountCertificateIDFormatter(t *testing.T) { - actual := NewIntegrationAccountCertificateID("12345678-1234-9876-4563-123456789012", "group1", "account1", "certificate1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/certificates/certificate1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountCertificateID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountCertificateId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing CertificateName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Error: true, - }, - - { - // missing value for CertificateName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/certificates/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/certificates/certificate1", - Expected: &IntegrationAccountCertificateId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "account1", - CertificateName: "certificate1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/CERTIFICATES/CERTIFICATE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountCertificateID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.CertificateName != v.Expected.CertificateName { - t.Fatalf("Expected %q but got %q for CertificateName", v.Expected.CertificateName, actual.CertificateName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_map.go b/internal/services/logic/parse/integration_account_map.go deleted file mode 100644 index feeb15f0fde1..000000000000 --- a/internal/services/logic/parse/integration_account_map.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountMapId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - MapName string -} - -func NewIntegrationAccountMapID(subscriptionId, resourceGroup, integrationAccountName, mapName string) IntegrationAccountMapId { - return IntegrationAccountMapId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - MapName: mapName, - } -} - -func (id IntegrationAccountMapId) String() string { - segments := []string{ - fmt.Sprintf("Map Name %q", id.MapName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Map", segmentsStr) -} - -func (id IntegrationAccountMapId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/maps/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.MapName) -} - -// IntegrationAccountMapID parses a IntegrationAccountMap ID into an IntegrationAccountMapId struct -func IntegrationAccountMapID(input string) (*IntegrationAccountMapId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountMapId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.MapName, err = id.PopSegment("maps"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_map_test.go b/internal/services/logic/parse/integration_account_map_test.go deleted file mode 100644 index 6c0c350a0f93..000000000000 --- a/internal/services/logic/parse/integration_account_map_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountMapId{} - -func TestIntegrationAccountMapIDFormatter(t *testing.T) { - actual := NewIntegrationAccountMapID("12345678-1234-9876-4563-123456789012", "group1", "account1", "map1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/maps/map1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountMapID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountMapId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing MapName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Error: true, - }, - - { - // missing value for MapName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/maps/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/maps/map1", - Expected: &IntegrationAccountMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "account1", - MapName: "map1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/MAPS/MAP1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountMapID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.MapName != v.Expected.MapName { - t.Fatalf("Expected %q but got %q for MapName", v.Expected.MapName, actual.MapName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_partner.go b/internal/services/logic/parse/integration_account_partner.go deleted file mode 100644 index e3b3142ef13e..000000000000 --- a/internal/services/logic/parse/integration_account_partner.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountPartnerId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - PartnerName string -} - -func NewIntegrationAccountPartnerID(subscriptionId, resourceGroup, integrationAccountName, partnerName string) IntegrationAccountPartnerId { - return IntegrationAccountPartnerId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - PartnerName: partnerName, - } -} - -func (id IntegrationAccountPartnerId) String() string { - segments := []string{ - fmt.Sprintf("Partner Name %q", id.PartnerName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Partner", segmentsStr) -} - -func (id IntegrationAccountPartnerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/partners/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.PartnerName) -} - -// IntegrationAccountPartnerID parses a IntegrationAccountPartner ID into an IntegrationAccountPartnerId struct -func IntegrationAccountPartnerID(input string) (*IntegrationAccountPartnerId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountPartnerId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.PartnerName, err = id.PopSegment("partners"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_partner_test.go b/internal/services/logic/parse/integration_account_partner_test.go deleted file mode 100644 index 78f3f191f3f4..000000000000 --- a/internal/services/logic/parse/integration_account_partner_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountPartnerId{} - -func TestIntegrationAccountPartnerIDFormatter(t *testing.T) { - actual := NewIntegrationAccountPartnerID("12345678-1234-9876-4563-123456789012", "group1", "account1", "partner1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/partners/partner1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountPartnerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountPartnerId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing PartnerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Error: true, - }, - - { - // missing value for PartnerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/partners/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/partners/partner1", - Expected: &IntegrationAccountPartnerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "account1", - PartnerName: "partner1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/PARTNERS/PARTNER1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountPartnerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.PartnerName != v.Expected.PartnerName { - t.Fatalf("Expected %q but got %q for PartnerName", v.Expected.PartnerName, actual.PartnerName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_schema.go b/internal/services/logic/parse/integration_account_schema.go deleted file mode 100644 index e7ab8d507433..000000000000 --- a/internal/services/logic/parse/integration_account_schema.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountSchemaId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - SchemaName string -} - -func NewIntegrationAccountSchemaID(subscriptionId, resourceGroup, integrationAccountName, schemaName string) IntegrationAccountSchemaId { - return IntegrationAccountSchemaId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - SchemaName: schemaName, - } -} - -func (id IntegrationAccountSchemaId) String() string { - segments := []string{ - fmt.Sprintf("Schema Name %q", id.SchemaName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Schema", segmentsStr) -} - -func (id IntegrationAccountSchemaId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/schemas/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.SchemaName) -} - -// IntegrationAccountSchemaID parses a IntegrationAccountSchema ID into an IntegrationAccountSchemaId struct -func IntegrationAccountSchemaID(input string) (*IntegrationAccountSchemaId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountSchemaId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.SchemaName, err = id.PopSegment("schemas"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_schema_test.go b/internal/services/logic/parse/integration_account_schema_test.go deleted file mode 100644 index 1e7549ec14d9..000000000000 --- a/internal/services/logic/parse/integration_account_schema_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountSchemaId{} - -func TestIntegrationAccountSchemaIDFormatter(t *testing.T) { - actual := NewIntegrationAccountSchemaID("12345678-1234-9876-4563-123456789012", "group1", "integrationAccount1", "schema1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/schemas/schema1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountSchemaID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountSchemaId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing SchemaName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/", - Error: true, - }, - - { - // missing value for SchemaName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/schemas/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/schemas/schema1", - Expected: &IntegrationAccountSchemaId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "integrationAccount1", - SchemaName: "schema1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/INTEGRATIONACCOUNT1/SCHEMAS/SCHEMA1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountSchemaID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.SchemaName != v.Expected.SchemaName { - t.Fatalf("Expected %q but got %q for SchemaName", v.Expected.SchemaName, actual.SchemaName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_session.go b/internal/services/logic/parse/integration_account_session.go deleted file mode 100644 index 25f76d0a6b44..000000000000 --- a/internal/services/logic/parse/integration_account_session.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationAccountSessionId struct { - SubscriptionId string - ResourceGroup string - IntegrationAccountName string - SessionName string -} - -func NewIntegrationAccountSessionID(subscriptionId, resourceGroup, integrationAccountName, sessionName string) IntegrationAccountSessionId { - return IntegrationAccountSessionId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - IntegrationAccountName: integrationAccountName, - SessionName: sessionName, - } -} - -func (id IntegrationAccountSessionId) String() string { - segments := []string{ - fmt.Sprintf("Session Name %q", id.SessionName), - fmt.Sprintf("Integration Account Name %q", id.IntegrationAccountName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Account Session", segmentsStr) -} - -func (id IntegrationAccountSessionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/sessions/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationAccountName, id.SessionName) -} - -// IntegrationAccountSessionID parses a IntegrationAccountSession ID into an IntegrationAccountSessionId struct -func IntegrationAccountSessionID(input string) (*IntegrationAccountSessionId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationAccountSessionId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.IntegrationAccountName, err = id.PopSegment("integrationAccounts"); err != nil { - return nil, err - } - if resourceId.SessionName, err = id.PopSegment("sessions"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_account_session_test.go b/internal/services/logic/parse/integration_account_session_test.go deleted file mode 100644 index 8564a0e8531a..000000000000 --- a/internal/services/logic/parse/integration_account_session_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountSessionId{} - -func TestIntegrationAccountSessionIDFormatter(t *testing.T) { - actual := NewIntegrationAccountSessionID("12345678-1234-9876-4563-123456789012", "group1", "integrationAccount1", "session1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/sessions/session1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountSessionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountSessionId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // missing SessionName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/", - Error: true, - }, - - { - // missing value for SessionName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/sessions/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/sessions/session1", - Expected: &IntegrationAccountSessionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - IntegrationAccountName: "integrationAccount1", - SessionName: "session1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/INTEGRATIONACCOUNT1/SESSIONS/SESSION1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountSessionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.IntegrationAccountName != v.Expected.IntegrationAccountName { - t.Fatalf("Expected %q but got %q for IntegrationAccountName", v.Expected.IntegrationAccountName, actual.IntegrationAccountName) - } - if actual.SessionName != v.Expected.SessionName { - t.Fatalf("Expected %q but got %q for SessionName", v.Expected.SessionName, actual.SessionName) - } - } -} diff --git a/internal/services/logic/parse/integration_account_test.go b/internal/services/logic/parse/integration_account_test.go deleted file mode 100644 index a50557d13092..000000000000 --- a/internal/services/logic/parse/integration_account_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationAccountId{} - -func TestIntegrationAccountIDFormatter(t *testing.T) { - actual := NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "group1", "account1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationAccountID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationAccountId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1", - Expected: &IntegrationAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - Name: "account1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationAccountID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/logic/parse/integration_service_environment.go b/internal/services/logic/parse/integration_service_environment.go deleted file mode 100644 index c0b4f74623db..000000000000 --- a/internal/services/logic/parse/integration_service_environment.go +++ /dev/null @@ -1,69 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type IntegrationServiceEnvironmentId struct { - SubscriptionId string - ResourceGroup string - Name string -} - -func NewIntegrationServiceEnvironmentID(subscriptionId, resourceGroup, name string) IntegrationServiceEnvironmentId { - return IntegrationServiceEnvironmentId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - Name: name, - } -} - -func (id IntegrationServiceEnvironmentId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Integration Service Environment", segmentsStr) -} - -func (id IntegrationServiceEnvironmentId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationServiceEnvironments/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.Name) -} - -// IntegrationServiceEnvironmentID parses a IntegrationServiceEnvironment ID into an IntegrationServiceEnvironmentId struct -func IntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvironmentId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := IntegrationServiceEnvironmentId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.Name, err = id.PopSegment("integrationServiceEnvironments"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/integration_service_environment_test.go b/internal/services/logic/parse/integration_service_environment_test.go deleted file mode 100644 index 90c67e0d1b84..000000000000 --- a/internal/services/logic/parse/integration_service_environment_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = IntegrationServiceEnvironmentId{} - -func TestIntegrationServiceEnvironmentIDFormatter(t *testing.T) { - actual := NewIntegrationServiceEnvironmentID("12345678-1234-9876-4563-123456789012", "group1", "ise1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/ise1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestIntegrationServiceEnvironmentID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IntegrationServiceEnvironmentId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/ise1", - Expected: &IntegrationServiceEnvironmentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - Name: "ise1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONSERVICEENVIRONMENTS/ISE1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := IntegrationServiceEnvironmentID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/logic/parse/trigger.go b/internal/services/logic/parse/trigger.go deleted file mode 100644 index 02fa01371aaf..000000000000 --- a/internal/services/logic/parse/trigger.go +++ /dev/null @@ -1,75 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type TriggerId struct { - SubscriptionId string - ResourceGroup string - WorkflowName string - Name string -} - -func NewTriggerID(subscriptionId, resourceGroup, workflowName, name string) TriggerId { - return TriggerId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - WorkflowName: workflowName, - Name: name, - } -} - -func (id TriggerId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - fmt.Sprintf("Workflow Name %q", id.WorkflowName), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Trigger", segmentsStr) -} - -func (id TriggerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/triggers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.WorkflowName, id.Name) -} - -// TriggerID parses a Trigger ID into an TriggerId struct -func TriggerID(input string) (*TriggerId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := TriggerId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.WorkflowName, err = id.PopSegment("workflows"); err != nil { - return nil, err - } - if resourceId.Name, err = id.PopSegment("triggers"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/trigger_test.go b/internal/services/logic/parse/trigger_test.go deleted file mode 100644 index 6d2cff7b8545..000000000000 --- a/internal/services/logic/parse/trigger_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = TriggerId{} - -func TestTriggerIDFormatter(t *testing.T) { - actual := NewTriggerID("12345678-1234-9876-4563-123456789012", "group1", "workflow1", "trigger1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/triggers/trigger1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestTriggerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *TriggerId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing WorkflowName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for WorkflowName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/triggers/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/triggers/trigger1", - Expected: &TriggerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - WorkflowName: "workflow1", - Name: "trigger1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/WORKFLOWS/WORKFLOW1/TRIGGERS/TRIGGER1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := TriggerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.WorkflowName != v.Expected.WorkflowName { - t.Fatalf("Expected %q but got %q for WorkflowName", v.Expected.WorkflowName, actual.WorkflowName) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/logic/parse/workflow.go b/internal/services/logic/parse/workflow.go deleted file mode 100644 index 59e1f7fff1d8..000000000000 --- a/internal/services/logic/parse/workflow.go +++ /dev/null @@ -1,69 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -type WorkflowId struct { - SubscriptionId string - ResourceGroup string - Name string -} - -func NewWorkflowID(subscriptionId, resourceGroup, name string) WorkflowId { - return WorkflowId{ - SubscriptionId: subscriptionId, - ResourceGroup: resourceGroup, - Name: name, - } -} - -func (id WorkflowId) String() string { - segments := []string{ - fmt.Sprintf("Name %q", id.Name), - fmt.Sprintf("Resource Group %q", id.ResourceGroup), - } - segmentsStr := strings.Join(segments, " / ") - return fmt.Sprintf("%s: (%s)", "Workflow", segmentsStr) -} - -func (id WorkflowId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.Name) -} - -// WorkflowID parses a Workflow ID into an WorkflowId struct -func WorkflowID(input string) (*WorkflowId, error) { - id, err := resourceids.ParseAzureResourceID(input) - if err != nil { - return nil, err - } - - resourceId := WorkflowId{ - SubscriptionId: id.SubscriptionID, - ResourceGroup: id.ResourceGroup, - } - - if resourceId.SubscriptionId == "" { - return nil, fmt.Errorf("ID was missing the 'subscriptions' element") - } - - if resourceId.ResourceGroup == "" { - return nil, fmt.Errorf("ID was missing the 'resourceGroups' element") - } - - if resourceId.Name, err = id.PopSegment("workflows"); err != nil { - return nil, err - } - - if err := id.ValidateNoEmptySegments(input); err != nil { - return nil, err - } - - return &resourceId, nil -} diff --git a/internal/services/logic/parse/workflow_test.go b/internal/services/logic/parse/workflow_test.go deleted file mode 100644 index 2998c379e051..000000000000 --- a/internal/services/logic/parse/workflow_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package parse - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -var _ resourceids.Id = WorkflowId{} - -func TestWorkflowIDFormatter(t *testing.T) { - actual := NewWorkflowID("12345678-1234-9876-4563-123456789012", "group1", "workflow1").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1" - if actual != expected { - t.Fatalf("Expected %q but got %q", expected, actual) - } -} - -func TestWorkflowID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *WorkflowId - }{ - - { - // empty - Input: "", - Error: true, - }, - - { - // missing SubscriptionId - Input: "/", - Error: true, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Error: true, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Error: true, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Error: true, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Error: true, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/", - Error: true, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1", - Expected: &WorkflowId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroup: "group1", - Name: "workflow1", - }, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/WORKFLOWS/WORKFLOW1", - Error: true, - }, - } - - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := WorkflowID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %s", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - if actual.ResourceGroup != v.Expected.ResourceGroup { - t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.ResourceGroup, actual.ResourceGroup) - } - if actual.Name != v.Expected.Name { - t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) - } - } -} diff --git a/internal/services/logic/resourceids.go b/internal/services/logic/resourceids.go index ddae19652716..122daad141c2 100644 --- a/internal/services/logic/resourceids.go +++ b/internal/services/logic/resourceids.go @@ -1,16 +1,4 @@ package logic -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccount -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountAgreement -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/agreements/agreement1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountAssembly -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/assemblies/assembly1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountBatchConfiguration -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/batchConfigurations/batchConfiguration1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountCertificate -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/certificates/certificate1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountMap -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/maps/map1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountPartner -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/partners/partner1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountSchema -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/schemas/schema1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationAccountSession -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/sessions/session1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IntegrationServiceEnvironment -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/ise1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=LogicAppStandard -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=Workflow -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1 -//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=Trigger -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/triggers/trigger1 //go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=Action -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/actions/action1 diff --git a/internal/services/logic/validate/integration_account_agreement_id.go b/internal/services/logic/validate/integration_account_agreement_id.go deleted file mode 100644 index c6547bc74b25..000000000000 --- a/internal/services/logic/validate/integration_account_agreement_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountAgreementID(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 := parse.IntegrationAccountAgreementID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_agreement_id_test.go b/internal/services/logic/validate/integration_account_agreement_id_test.go deleted file mode 100644 index af7446467fcc..000000000000 --- a/internal/services/logic/validate/integration_account_agreement_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountAgreementID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing AgreementName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Valid: false, - }, - - { - // missing value for AgreementName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/agreements/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/agreements/agreement1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/AGREEMENTS/AGREEMENT1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountAgreementID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_assembly_id.go b/internal/services/logic/validate/integration_account_assembly_id.go deleted file mode 100644 index 669087719a9c..000000000000 --- a/internal/services/logic/validate/integration_account_assembly_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountAssemblyID(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 := parse.IntegrationAccountAssemblyID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_assembly_id_test.go b/internal/services/logic/validate/integration_account_assembly_id_test.go deleted file mode 100644 index b45587ba8079..000000000000 --- a/internal/services/logic/validate/integration_account_assembly_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountAssemblyID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing AssemblyName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Valid: false, - }, - - { - // missing value for AssemblyName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/assemblies/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/assemblies/assembly1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/ASSEMBLIES/ASSEMBLY1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountAssemblyID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_batch_configuration_id.go b/internal/services/logic/validate/integration_account_batch_configuration_id.go deleted file mode 100644 index a3021852b348..000000000000 --- a/internal/services/logic/validate/integration_account_batch_configuration_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountBatchConfigurationID(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 := parse.IntegrationAccountBatchConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_batch_configuration_id_test.go b/internal/services/logic/validate/integration_account_batch_configuration_id_test.go deleted file mode 100644 index 2ca088b9c2ae..000000000000 --- a/internal/services/logic/validate/integration_account_batch_configuration_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountBatchConfigurationID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing BatchConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Valid: false, - }, - - { - // missing value for BatchConfigurationName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/batchConfigurations/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/batchConfigurations/batchConfiguration1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/BATCHCONFIGURATIONS/BATCHCONFIGURATION1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountBatchConfigurationID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_certificate_id.go b/internal/services/logic/validate/integration_account_certificate_id.go deleted file mode 100644 index 3af5a0c3e90d..000000000000 --- a/internal/services/logic/validate/integration_account_certificate_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountCertificateID(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 := parse.IntegrationAccountCertificateID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_certificate_id_test.go b/internal/services/logic/validate/integration_account_certificate_id_test.go deleted file mode 100644 index d995068aed16..000000000000 --- a/internal/services/logic/validate/integration_account_certificate_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountCertificateID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing CertificateName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Valid: false, - }, - - { - // missing value for CertificateName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/certificates/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/certificates/certificate1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/CERTIFICATES/CERTIFICATE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountCertificateID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_id.go b/internal/services/logic/validate/integration_account_id.go deleted file mode 100644 index c63bd2720370..000000000000 --- a/internal/services/logic/validate/integration_account_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountID(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 := parse.IntegrationAccountID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_id_test.go b/internal/services/logic/validate/integration_account_id_test.go deleted file mode 100644 index a6763569f709..000000000000 --- a/internal/services/logic/validate/integration_account_id_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_map_id.go b/internal/services/logic/validate/integration_account_map_id.go deleted file mode 100644 index 85c457f37e4a..000000000000 --- a/internal/services/logic/validate/integration_account_map_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountMapID(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 := parse.IntegrationAccountMapID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_map_id_test.go b/internal/services/logic/validate/integration_account_map_id_test.go deleted file mode 100644 index 27f8292620c1..000000000000 --- a/internal/services/logic/validate/integration_account_map_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountMapID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing MapName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Valid: false, - }, - - { - // missing value for MapName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/maps/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/maps/map1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/MAPS/MAP1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountMapID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_partner_id.go b/internal/services/logic/validate/integration_account_partner_id.go deleted file mode 100644 index e72cd74d86d9..000000000000 --- a/internal/services/logic/validate/integration_account_partner_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountPartnerID(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 := parse.IntegrationAccountPartnerID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_partner_id_test.go b/internal/services/logic/validate/integration_account_partner_id_test.go deleted file mode 100644 index 04c6821e891f..000000000000 --- a/internal/services/logic/validate/integration_account_partner_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountPartnerID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing PartnerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/", - Valid: false, - }, - - { - // missing value for PartnerName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/partners/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/partners/partner1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/ACCOUNT1/PARTNERS/PARTNER1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountPartnerID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_schema_id.go b/internal/services/logic/validate/integration_account_schema_id.go deleted file mode 100644 index 36d774a054e9..000000000000 --- a/internal/services/logic/validate/integration_account_schema_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountSchemaID(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 := parse.IntegrationAccountSchemaID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_schema_id_test.go b/internal/services/logic/validate/integration_account_schema_id_test.go deleted file mode 100644 index d7227e37ee80..000000000000 --- a/internal/services/logic/validate/integration_account_schema_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountSchemaID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing SchemaName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/", - Valid: false, - }, - - { - // missing value for SchemaName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/schemas/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/schemas/schema1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/INTEGRATIONACCOUNT1/SCHEMAS/SCHEMA1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountSchemaID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_account_session_id.go b/internal/services/logic/validate/integration_account_session_id.go deleted file mode 100644 index 3ab7cdad7b7c..000000000000 --- a/internal/services/logic/validate/integration_account_session_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationAccountSessionID(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 := parse.IntegrationAccountSessionID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_account_session_id_test.go b/internal/services/logic/validate/integration_account_session_id_test.go deleted file mode 100644 index 98098198574b..000000000000 --- a/internal/services/logic/validate/integration_account_session_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationAccountSessionID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for IntegrationAccountName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/", - Valid: false, - }, - - { - // missing SessionName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/", - Valid: false, - }, - - { - // missing value for SessionName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/sessions/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/integrationAccount1/sessions/session1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONACCOUNTS/INTEGRATIONACCOUNT1/SESSIONS/SESSION1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationAccountSessionID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/integration_service_environment_id.go b/internal/services/logic/validate/integration_service_environment_id.go deleted file mode 100644 index 03da4e5e7ca7..000000000000 --- a/internal/services/logic/validate/integration_service_environment_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func IntegrationServiceEnvironmentID(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 := parse.IntegrationServiceEnvironmentID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/integration_service_environment_id_test.go b/internal/services/logic/validate/integration_service_environment_id_test.go deleted file mode 100644 index bc9ba316d50e..000000000000 --- a/internal/services/logic/validate/integration_service_environment_id_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestIntegrationServiceEnvironmentID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/integrationServiceEnvironments/ise1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/INTEGRATIONSERVICEENVIRONMENTS/ISE1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := IntegrationServiceEnvironmentID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/trigger_id.go b/internal/services/logic/validate/trigger_id.go deleted file mode 100644 index 48ab2f12091f..000000000000 --- a/internal/services/logic/validate/trigger_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func TriggerID(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 := parse.TriggerID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/trigger_id_test.go b/internal/services/logic/validate/trigger_id_test.go deleted file mode 100644 index b58f0acffeb2..000000000000 --- a/internal/services/logic/validate/trigger_id_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestTriggerID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing WorkflowName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for WorkflowName - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/triggers/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1/triggers/trigger1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/WORKFLOWS/WORKFLOW1/TRIGGERS/TRIGGER1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := TriggerID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/internal/services/logic/validate/workflow_id.go b/internal/services/logic/validate/workflow_id.go deleted file mode 100644 index b1a094e4333b..000000000000 --- a/internal/services/logic/validate/workflow_id.go +++ /dev/null @@ -1,23 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import ( - "fmt" - - "github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/parse" -) - -func WorkflowID(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 := parse.WorkflowID(v); err != nil { - errors = append(errors, err) - } - - return -} diff --git a/internal/services/logic/validate/workflow_id_test.go b/internal/services/logic/validate/workflow_id_test.go deleted file mode 100644 index bd765c0cb59c..000000000000 --- a/internal/services/logic/validate/workflow_id_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package validate - -// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten - -import "testing" - -func TestWorkflowID(t *testing.T) { - cases := []struct { - Input string - Valid bool - }{ - - { - // empty - Input: "", - Valid: false, - }, - - { - // missing SubscriptionId - Input: "/", - Valid: false, - }, - - { - // missing value for SubscriptionId - Input: "/subscriptions/", - Valid: false, - }, - - { - // missing ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/", - Valid: false, - }, - - { - // missing value for ResourceGroup - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/", - Valid: false, - }, - - { - // missing Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/", - Valid: false, - }, - - { - // missing value for Name - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/", - Valid: false, - }, - - { - // valid - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Logic/workflows/workflow1", - Valid: true, - }, - - { - // upper-cased - Input: "/SUBSCRIPTIONS/12345678-1234-9876-4563-123456789012/RESOURCEGROUPS/GROUP1/PROVIDERS/MICROSOFT.LOGIC/WORKFLOWS/WORKFLOW1", - Valid: false, - }, - } - for _, tc := range cases { - t.Logf("[DEBUG] Testing Value %s", tc.Input) - _, errors := WorkflowID(tc.Input, "test") - valid := len(errors) == 0 - - if tc.Valid != valid { - t.Fatalf("Expected %t but got %t", tc.Valid, valid) - } - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/CHANGELOG.md deleted file mode 100644 index 97dacea793ea..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/CHANGELOG.md +++ /dev/null @@ -1,192 +0,0 @@ -# Change History - -## Breaking Changes - -### Removed Constants - -1. AgreementType.AS2 -1. AgreementType.Edifact -1. AgreementType.NotSpecified -1. AgreementType.X12 -1. AzureAsyncOperationState.Canceled -1. AzureAsyncOperationState.Failed -1. AzureAsyncOperationState.Pending -1. AzureAsyncOperationState.Succeeded -1. DayOfWeek.Friday -1. DayOfWeek.Monday -1. DayOfWeek.Saturday -1. DayOfWeek.Sunday -1. DayOfWeek.Thursday -1. DayOfWeek.Tuesday -1. DayOfWeek.Wednesday -1. EventLevel.Critical -1. EventLevel.Error -1. EventLevel.Informational -1. EventLevel.LogAlways -1. EventLevel.Verbose -1. EventLevel.Warning -1. IntegrationServiceEnvironmentSkuScaleType.Automatic -1. IntegrationServiceEnvironmentSkuScaleType.Manual -1. IntegrationServiceEnvironmentSkuScaleType.None -1. OpenAuthenticationProviderType.AAD -1. SwaggerSchemaType.Array -1. SwaggerSchemaType.Boolean -1. SwaggerSchemaType.File -1. SwaggerSchemaType.Integer -1. SwaggerSchemaType.Null -1. SwaggerSchemaType.Number -1. SwaggerSchemaType.Object -1. SwaggerSchemaType.String - -### Removed Funcs - -1. *ManagedAPIListResultIterator.Next() error -1. *ManagedAPIListResultIterator.NextWithContext(context.Context) error -1. *ManagedAPIListResultPage.Next() error -1. *ManagedAPIListResultPage.NextWithContext(context.Context) error -1. ManagedAPIListResult.IsEmpty() bool -1. ManagedAPIListResultIterator.NotDone() bool -1. ManagedAPIListResultIterator.Response() ManagedAPIListResult -1. ManagedAPIListResultIterator.Value() ManagedAPI -1. ManagedAPIListResultPage.NotDone() bool -1. ManagedAPIListResultPage.Response() ManagedAPIListResult -1. ManagedAPIListResultPage.Values() []ManagedAPI -1. NewManagedAPIListResultIterator(ManagedAPIListResultPage) ManagedAPIListResultIterator -1. NewManagedAPIListResultPage(ManagedAPIListResult, func(context.Context, ManagedAPIListResult) (ManagedAPIListResult, error)) ManagedAPIListResultPage -1. OpenAuthenticationAccessPolicy.MarshalJSON() ([]byte, error) - -### Struct Changes - -#### Removed Structs - -1. ManagedAPIListResultIterator -1. ManagedAPIListResultPage - -#### Removed Struct Fields - -1. ManagedAPI.autorest.Response -1. ManagedAPIListResult.autorest.Response - -### Signature Changes - -#### Funcs - -1. IntegrationServiceEnvironmentManagedApisClient.Get - - Returns - - From: ManagedAPI, error - - To: IntegrationServiceEnvironmentManagedAPI, error -1. IntegrationServiceEnvironmentManagedApisClient.GetResponder - - Returns - - From: ManagedAPI, error - - To: IntegrationServiceEnvironmentManagedAPI, error -1. IntegrationServiceEnvironmentManagedApisClient.List - - Returns - - From: ManagedAPIListResultPage, error - - To: IntegrationServiceEnvironmentManagedAPIListResultPage, error -1. IntegrationServiceEnvironmentManagedApisClient.ListComplete - - Returns - - From: ManagedAPIListResultIterator, error - - To: IntegrationServiceEnvironmentManagedAPIListResultIterator, error -1. IntegrationServiceEnvironmentManagedApisClient.ListResponder - - Returns - - From: ManagedAPIListResult, error - - To: IntegrationServiceEnvironmentManagedAPIListResult, error -1. IntegrationServiceEnvironmentManagedApisClient.Put - - Params - - From: context.Context, string, string, string - - To: context.Context, string, string, string, IntegrationServiceEnvironmentManagedAPI -1. IntegrationServiceEnvironmentManagedApisClient.PutPreparer - - Params - - From: context.Context, string, string, string - - To: context.Context, string, string, string, IntegrationServiceEnvironmentManagedAPI -1. IntegrationServiceEnvironmentManagedApisClient.PutResponder - - Returns - - From: ManagedAPI, error - - To: IntegrationServiceEnvironmentManagedAPI, error - -#### Struct Fields - -1. IntegrationAccountProperties.IntegrationServiceEnvironment changed type from *IntegrationServiceEnvironment to *ResourceReference -1. IntegrationServiceEnvironmentManagedApisPutFuture.Result changed type from func(IntegrationServiceEnvironmentManagedApisClient) (ManagedAPI, error) to func(IntegrationServiceEnvironmentManagedApisClient) (IntegrationServiceEnvironmentManagedAPI, error) - -## Additive Changes - -### New Constants - -1. AgreementType.AgreementTypeAS2 -1. AgreementType.AgreementTypeEdifact -1. AgreementType.AgreementTypeNotSpecified -1. AgreementType.AgreementTypeX12 -1. AzureAsyncOperationState.AzureAsyncOperationStateCanceled -1. AzureAsyncOperationState.AzureAsyncOperationStateFailed -1. AzureAsyncOperationState.AzureAsyncOperationStatePending -1. AzureAsyncOperationState.AzureAsyncOperationStateSucceeded -1. DayOfWeek.DayOfWeekFriday -1. DayOfWeek.DayOfWeekMonday -1. DayOfWeek.DayOfWeekSaturday -1. DayOfWeek.DayOfWeekSunday -1. DayOfWeek.DayOfWeekThursday -1. DayOfWeek.DayOfWeekTuesday -1. DayOfWeek.DayOfWeekWednesday -1. EventLevel.EventLevelCritical -1. EventLevel.EventLevelError -1. EventLevel.EventLevelInformational -1. EventLevel.EventLevelLogAlways -1. EventLevel.EventLevelVerbose -1. EventLevel.EventLevelWarning -1. IntegrationServiceEnvironmentSkuScaleType.IntegrationServiceEnvironmentSkuScaleTypeAutomatic -1. IntegrationServiceEnvironmentSkuScaleType.IntegrationServiceEnvironmentSkuScaleTypeManual -1. IntegrationServiceEnvironmentSkuScaleType.IntegrationServiceEnvironmentSkuScaleTypeNone -1. ManagedServiceIdentityType.ManagedServiceIdentityTypeNone -1. ManagedServiceIdentityType.ManagedServiceIdentityTypeSystemAssigned -1. ManagedServiceIdentityType.ManagedServiceIdentityTypeUserAssigned -1. OpenAuthenticationProviderType.OpenAuthenticationProviderTypeAAD -1. SwaggerSchemaType.SwaggerSchemaTypeArray -1. SwaggerSchemaType.SwaggerSchemaTypeBoolean -1. SwaggerSchemaType.SwaggerSchemaTypeFile -1. SwaggerSchemaType.SwaggerSchemaTypeInteger -1. SwaggerSchemaType.SwaggerSchemaTypeNull -1. SwaggerSchemaType.SwaggerSchemaTypeNumber -1. SwaggerSchemaType.SwaggerSchemaTypeObject -1. SwaggerSchemaType.SwaggerSchemaTypeString - -### New Funcs - -1. *IntegrationServiceEnvironmentManagedAPI.UnmarshalJSON([]byte) error -1. *IntegrationServiceEnvironmentManagedAPIListResultIterator.Next() error -1. *IntegrationServiceEnvironmentManagedAPIListResultIterator.NextWithContext(context.Context) error -1. *IntegrationServiceEnvironmentManagedAPIListResultPage.Next() error -1. *IntegrationServiceEnvironmentManagedAPIListResultPage.NextWithContext(context.Context) error -1. ContentLink.MarshalJSON() ([]byte, error) -1. IntegrationServiceEnvironmentManagedAPI.MarshalJSON() ([]byte, error) -1. IntegrationServiceEnvironmentManagedAPIListResult.IsEmpty() bool -1. IntegrationServiceEnvironmentManagedAPIListResultIterator.NotDone() bool -1. IntegrationServiceEnvironmentManagedAPIListResultIterator.Response() IntegrationServiceEnvironmentManagedAPIListResult -1. IntegrationServiceEnvironmentManagedAPIListResultIterator.Value() IntegrationServiceEnvironmentManagedAPI -1. IntegrationServiceEnvironmentManagedAPIListResultPage.NotDone() bool -1. IntegrationServiceEnvironmentManagedAPIListResultPage.Response() IntegrationServiceEnvironmentManagedAPIListResult -1. IntegrationServiceEnvironmentManagedAPIListResultPage.Values() []IntegrationServiceEnvironmentManagedAPI -1. IntegrationServiceEnvironmentManagedAPIProperties.MarshalJSON() ([]byte, error) -1. ManagedServiceIdentity.MarshalJSON() ([]byte, error) -1. NewIntegrationServiceEnvironmentManagedAPIListResultIterator(IntegrationServiceEnvironmentManagedAPIListResultPage) IntegrationServiceEnvironmentManagedAPIListResultIterator -1. NewIntegrationServiceEnvironmentManagedAPIListResultPage(IntegrationServiceEnvironmentManagedAPIListResult, func(context.Context, IntegrationServiceEnvironmentManagedAPIListResult) (IntegrationServiceEnvironmentManagedAPIListResult, error)) IntegrationServiceEnvironmentManagedAPIListResultPage -1. PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType -1. UserAssignedIdentity.MarshalJSON() ([]byte, error) - -### Struct Changes - -#### New Structs - -1. IntegrationServiceEnvironmentManagedAPI -1. IntegrationServiceEnvironmentManagedAPIDeploymentParameters -1. IntegrationServiceEnvironmentManagedAPIListResult -1. IntegrationServiceEnvironmentManagedAPIListResultIterator -1. IntegrationServiceEnvironmentManagedAPIListResultPage -1. IntegrationServiceEnvironmentManagedAPIProperties -1. ManagedServiceIdentity -1. UserAssignedIdentity - -#### New Struct Fields - -1. IntegrationServiceEnvironment.Identity -1. Workflow.Identity diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/_meta.json deleted file mode 100644 index a003cd1498a2..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "2b56c8a3da0e04aea6f6d80a9ac04741d1ae5904", - "readme": "/_/azure-rest-api-specs/specification/logic/resource-manager/readme.md", - "tag": "package-2019-05", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/logic/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/client.go deleted file mode 100644 index a031c7989b91..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package logic implements the Azure ARM Logic service API version 2019-05-01. -// -// REST API for Azure Logic Apps. -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Logic - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Logic. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/enums.go deleted file mode 100644 index d1efb92391fc..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/enums.go +++ /dev/null @@ -1,1060 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// AgreementType enumerates the values for agreement type. -type AgreementType string - -const ( - // AgreementTypeAS2 ... - AgreementTypeAS2 AgreementType = "AS2" - // AgreementTypeEdifact ... - AgreementTypeEdifact AgreementType = "Edifact" - // AgreementTypeNotSpecified ... - AgreementTypeNotSpecified AgreementType = "NotSpecified" - // AgreementTypeX12 ... - AgreementTypeX12 AgreementType = "X12" -) - -// PossibleAgreementTypeValues returns an array of possible values for the AgreementType const type. -func PossibleAgreementTypeValues() []AgreementType { - return []AgreementType{AgreementTypeAS2, AgreementTypeEdifact, AgreementTypeNotSpecified, AgreementTypeX12} -} - -// APIDeploymentParameterVisibility enumerates the values for api deployment parameter visibility. -type APIDeploymentParameterVisibility string - -const ( - // APIDeploymentParameterVisibilityDefault ... - APIDeploymentParameterVisibilityDefault APIDeploymentParameterVisibility = "Default" - // APIDeploymentParameterVisibilityInternal ... - APIDeploymentParameterVisibilityInternal APIDeploymentParameterVisibility = "Internal" - // APIDeploymentParameterVisibilityNotSpecified ... - APIDeploymentParameterVisibilityNotSpecified APIDeploymentParameterVisibility = "NotSpecified" -) - -// PossibleAPIDeploymentParameterVisibilityValues returns an array of possible values for the APIDeploymentParameterVisibility const type. -func PossibleAPIDeploymentParameterVisibilityValues() []APIDeploymentParameterVisibility { - return []APIDeploymentParameterVisibility{APIDeploymentParameterVisibilityDefault, APIDeploymentParameterVisibilityInternal, APIDeploymentParameterVisibilityNotSpecified} -} - -// APITier enumerates the values for api tier. -type APITier string - -const ( - // APITierEnterprise ... - APITierEnterprise APITier = "Enterprise" - // APITierNotSpecified ... - APITierNotSpecified APITier = "NotSpecified" - // APITierPremium ... - APITierPremium APITier = "Premium" - // APITierStandard ... - APITierStandard APITier = "Standard" -) - -// PossibleAPITierValues returns an array of possible values for the APITier const type. -func PossibleAPITierValues() []APITier { - return []APITier{APITierEnterprise, APITierNotSpecified, APITierPremium, APITierStandard} -} - -// APIType enumerates the values for api type. -type APIType string - -const ( - // APITypeNotSpecified ... - APITypeNotSpecified APIType = "NotSpecified" - // APITypeRest ... - APITypeRest APIType = "Rest" - // APITypeSoap ... - APITypeSoap APIType = "Soap" -) - -// PossibleAPITypeValues returns an array of possible values for the APIType const type. -func PossibleAPITypeValues() []APIType { - return []APIType{APITypeNotSpecified, APITypeRest, APITypeSoap} -} - -// AzureAsyncOperationState enumerates the values for azure async operation state. -type AzureAsyncOperationState string - -const ( - // AzureAsyncOperationStateCanceled ... - AzureAsyncOperationStateCanceled AzureAsyncOperationState = "Canceled" - // AzureAsyncOperationStateFailed ... - AzureAsyncOperationStateFailed AzureAsyncOperationState = "Failed" - // AzureAsyncOperationStatePending ... - AzureAsyncOperationStatePending AzureAsyncOperationState = "Pending" - // AzureAsyncOperationStateSucceeded ... - AzureAsyncOperationStateSucceeded AzureAsyncOperationState = "Succeeded" -) - -// PossibleAzureAsyncOperationStateValues returns an array of possible values for the AzureAsyncOperationState const type. -func PossibleAzureAsyncOperationStateValues() []AzureAsyncOperationState { - return []AzureAsyncOperationState{AzureAsyncOperationStateCanceled, AzureAsyncOperationStateFailed, AzureAsyncOperationStatePending, AzureAsyncOperationStateSucceeded} -} - -// DayOfWeek enumerates the values for day of week. -type DayOfWeek string - -const ( - // DayOfWeekFriday ... - DayOfWeekFriday DayOfWeek = "Friday" - // DayOfWeekMonday ... - DayOfWeekMonday DayOfWeek = "Monday" - // DayOfWeekSaturday ... - DayOfWeekSaturday DayOfWeek = "Saturday" - // DayOfWeekSunday ... - DayOfWeekSunday DayOfWeek = "Sunday" - // DayOfWeekThursday ... - DayOfWeekThursday DayOfWeek = "Thursday" - // DayOfWeekTuesday ... - DayOfWeekTuesday DayOfWeek = "Tuesday" - // DayOfWeekWednesday ... - DayOfWeekWednesday DayOfWeek = "Wednesday" -) - -// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. -func PossibleDayOfWeekValues() []DayOfWeek { - return []DayOfWeek{DayOfWeekFriday, DayOfWeekMonday, DayOfWeekSaturday, DayOfWeekSunday, DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday} -} - -// DaysOfWeek enumerates the values for days of week. -type DaysOfWeek string - -const ( - // DaysOfWeekFriday ... - DaysOfWeekFriday DaysOfWeek = "Friday" - // DaysOfWeekMonday ... - DaysOfWeekMonday DaysOfWeek = "Monday" - // DaysOfWeekSaturday ... - DaysOfWeekSaturday DaysOfWeek = "Saturday" - // DaysOfWeekSunday ... - DaysOfWeekSunday DaysOfWeek = "Sunday" - // DaysOfWeekThursday ... - DaysOfWeekThursday DaysOfWeek = "Thursday" - // DaysOfWeekTuesday ... - DaysOfWeekTuesday DaysOfWeek = "Tuesday" - // DaysOfWeekWednesday ... - DaysOfWeekWednesday DaysOfWeek = "Wednesday" -) - -// PossibleDaysOfWeekValues returns an array of possible values for the DaysOfWeek const type. -func PossibleDaysOfWeekValues() []DaysOfWeek { - return []DaysOfWeek{DaysOfWeekFriday, DaysOfWeekMonday, DaysOfWeekSaturday, DaysOfWeekSunday, DaysOfWeekThursday, DaysOfWeekTuesday, DaysOfWeekWednesday} -} - -// EdifactCharacterSet enumerates the values for edifact character set. -type EdifactCharacterSet string - -const ( - // EdifactCharacterSetKECA ... - EdifactCharacterSetKECA EdifactCharacterSet = "KECA" - // EdifactCharacterSetNotSpecified ... - EdifactCharacterSetNotSpecified EdifactCharacterSet = "NotSpecified" - // EdifactCharacterSetUNOA ... - EdifactCharacterSetUNOA EdifactCharacterSet = "UNOA" - // EdifactCharacterSetUNOB ... - EdifactCharacterSetUNOB EdifactCharacterSet = "UNOB" - // EdifactCharacterSetUNOC ... - EdifactCharacterSetUNOC EdifactCharacterSet = "UNOC" - // EdifactCharacterSetUNOD ... - EdifactCharacterSetUNOD EdifactCharacterSet = "UNOD" - // EdifactCharacterSetUNOE ... - EdifactCharacterSetUNOE EdifactCharacterSet = "UNOE" - // EdifactCharacterSetUNOF ... - EdifactCharacterSetUNOF EdifactCharacterSet = "UNOF" - // EdifactCharacterSetUNOG ... - EdifactCharacterSetUNOG EdifactCharacterSet = "UNOG" - // EdifactCharacterSetUNOH ... - EdifactCharacterSetUNOH EdifactCharacterSet = "UNOH" - // EdifactCharacterSetUNOI ... - EdifactCharacterSetUNOI EdifactCharacterSet = "UNOI" - // EdifactCharacterSetUNOJ ... - EdifactCharacterSetUNOJ EdifactCharacterSet = "UNOJ" - // EdifactCharacterSetUNOK ... - EdifactCharacterSetUNOK EdifactCharacterSet = "UNOK" - // EdifactCharacterSetUNOX ... - EdifactCharacterSetUNOX EdifactCharacterSet = "UNOX" - // EdifactCharacterSetUNOY ... - EdifactCharacterSetUNOY EdifactCharacterSet = "UNOY" -) - -// PossibleEdifactCharacterSetValues returns an array of possible values for the EdifactCharacterSet const type. -func PossibleEdifactCharacterSetValues() []EdifactCharacterSet { - return []EdifactCharacterSet{EdifactCharacterSetKECA, EdifactCharacterSetNotSpecified, EdifactCharacterSetUNOA, EdifactCharacterSetUNOB, EdifactCharacterSetUNOC, EdifactCharacterSetUNOD, EdifactCharacterSetUNOE, EdifactCharacterSetUNOF, EdifactCharacterSetUNOG, EdifactCharacterSetUNOH, EdifactCharacterSetUNOI, EdifactCharacterSetUNOJ, EdifactCharacterSetUNOK, EdifactCharacterSetUNOX, EdifactCharacterSetUNOY} -} - -// EdifactDecimalIndicator enumerates the values for edifact decimal indicator. -type EdifactDecimalIndicator string - -const ( - // EdifactDecimalIndicatorComma ... - EdifactDecimalIndicatorComma EdifactDecimalIndicator = "Comma" - // EdifactDecimalIndicatorDecimal ... - EdifactDecimalIndicatorDecimal EdifactDecimalIndicator = "Decimal" - // EdifactDecimalIndicatorNotSpecified ... - EdifactDecimalIndicatorNotSpecified EdifactDecimalIndicator = "NotSpecified" -) - -// PossibleEdifactDecimalIndicatorValues returns an array of possible values for the EdifactDecimalIndicator const type. -func PossibleEdifactDecimalIndicatorValues() []EdifactDecimalIndicator { - return []EdifactDecimalIndicator{EdifactDecimalIndicatorComma, EdifactDecimalIndicatorDecimal, EdifactDecimalIndicatorNotSpecified} -} - -// EncryptionAlgorithm enumerates the values for encryption algorithm. -type EncryptionAlgorithm string - -const ( - // EncryptionAlgorithmAES128 ... - EncryptionAlgorithmAES128 EncryptionAlgorithm = "AES128" - // EncryptionAlgorithmAES192 ... - EncryptionAlgorithmAES192 EncryptionAlgorithm = "AES192" - // EncryptionAlgorithmAES256 ... - EncryptionAlgorithmAES256 EncryptionAlgorithm = "AES256" - // EncryptionAlgorithmDES3 ... - EncryptionAlgorithmDES3 EncryptionAlgorithm = "DES3" - // EncryptionAlgorithmNone ... - EncryptionAlgorithmNone EncryptionAlgorithm = "None" - // EncryptionAlgorithmNotSpecified ... - EncryptionAlgorithmNotSpecified EncryptionAlgorithm = "NotSpecified" - // EncryptionAlgorithmRC2 ... - EncryptionAlgorithmRC2 EncryptionAlgorithm = "RC2" -) - -// PossibleEncryptionAlgorithmValues returns an array of possible values for the EncryptionAlgorithm const type. -func PossibleEncryptionAlgorithmValues() []EncryptionAlgorithm { - return []EncryptionAlgorithm{EncryptionAlgorithmAES128, EncryptionAlgorithmAES192, EncryptionAlgorithmAES256, EncryptionAlgorithmDES3, EncryptionAlgorithmNone, EncryptionAlgorithmNotSpecified, EncryptionAlgorithmRC2} -} - -// ErrorResponseCode enumerates the values for error response code. -type ErrorResponseCode string - -const ( - // ErrorResponseCodeIntegrationServiceEnvironmentNotFound ... - ErrorResponseCodeIntegrationServiceEnvironmentNotFound ErrorResponseCode = "IntegrationServiceEnvironmentNotFound" - // ErrorResponseCodeInternalServerError ... - ErrorResponseCodeInternalServerError ErrorResponseCode = "InternalServerError" - // ErrorResponseCodeInvalidOperationID ... - ErrorResponseCodeInvalidOperationID ErrorResponseCode = "InvalidOperationId" - // ErrorResponseCodeNotSpecified ... - ErrorResponseCodeNotSpecified ErrorResponseCode = "NotSpecified" -) - -// PossibleErrorResponseCodeValues returns an array of possible values for the ErrorResponseCode const type. -func PossibleErrorResponseCodeValues() []ErrorResponseCode { - return []ErrorResponseCode{ErrorResponseCodeIntegrationServiceEnvironmentNotFound, ErrorResponseCodeInternalServerError, ErrorResponseCodeInvalidOperationID, ErrorResponseCodeNotSpecified} -} - -// EventLevel enumerates the values for event level. -type EventLevel string - -const ( - // EventLevelCritical ... - EventLevelCritical EventLevel = "Critical" - // EventLevelError ... - EventLevelError EventLevel = "Error" - // EventLevelInformational ... - EventLevelInformational EventLevel = "Informational" - // EventLevelLogAlways ... - EventLevelLogAlways EventLevel = "LogAlways" - // EventLevelVerbose ... - EventLevelVerbose EventLevel = "Verbose" - // EventLevelWarning ... - EventLevelWarning EventLevel = "Warning" -) - -// PossibleEventLevelValues returns an array of possible values for the EventLevel const type. -func PossibleEventLevelValues() []EventLevel { - return []EventLevel{EventLevelCritical, EventLevelError, EventLevelInformational, EventLevelLogAlways, EventLevelVerbose, EventLevelWarning} -} - -// HashingAlgorithm enumerates the values for hashing algorithm. -type HashingAlgorithm string - -const ( - // HashingAlgorithmMD5 ... - HashingAlgorithmMD5 HashingAlgorithm = "MD5" - // HashingAlgorithmNone ... - HashingAlgorithmNone HashingAlgorithm = "None" - // HashingAlgorithmNotSpecified ... - HashingAlgorithmNotSpecified HashingAlgorithm = "NotSpecified" - // HashingAlgorithmSHA1 ... - HashingAlgorithmSHA1 HashingAlgorithm = "SHA1" - // HashingAlgorithmSHA2256 ... - HashingAlgorithmSHA2256 HashingAlgorithm = "SHA2256" - // HashingAlgorithmSHA2384 ... - HashingAlgorithmSHA2384 HashingAlgorithm = "SHA2384" - // HashingAlgorithmSHA2512 ... - HashingAlgorithmSHA2512 HashingAlgorithm = "SHA2512" -) - -// PossibleHashingAlgorithmValues returns an array of possible values for the HashingAlgorithm const type. -func PossibleHashingAlgorithmValues() []HashingAlgorithm { - return []HashingAlgorithm{HashingAlgorithmMD5, HashingAlgorithmNone, HashingAlgorithmNotSpecified, HashingAlgorithmSHA1, HashingAlgorithmSHA2256, HashingAlgorithmSHA2384, HashingAlgorithmSHA2512} -} - -// IntegrationAccountSkuName enumerates the values for integration account sku name. -type IntegrationAccountSkuName string - -const ( - // IntegrationAccountSkuNameBasic ... - IntegrationAccountSkuNameBasic IntegrationAccountSkuName = "Basic" - // IntegrationAccountSkuNameFree ... - IntegrationAccountSkuNameFree IntegrationAccountSkuName = "Free" - // IntegrationAccountSkuNameNotSpecified ... - IntegrationAccountSkuNameNotSpecified IntegrationAccountSkuName = "NotSpecified" - // IntegrationAccountSkuNameStandard ... - IntegrationAccountSkuNameStandard IntegrationAccountSkuName = "Standard" -) - -// PossibleIntegrationAccountSkuNameValues returns an array of possible values for the IntegrationAccountSkuName const type. -func PossibleIntegrationAccountSkuNameValues() []IntegrationAccountSkuName { - return []IntegrationAccountSkuName{IntegrationAccountSkuNameBasic, IntegrationAccountSkuNameFree, IntegrationAccountSkuNameNotSpecified, IntegrationAccountSkuNameStandard} -} - -// IntegrationServiceEnvironmentAccessEndpointType enumerates the values for integration service environment -// access endpoint type. -type IntegrationServiceEnvironmentAccessEndpointType string - -const ( - // IntegrationServiceEnvironmentAccessEndpointTypeExternal ... - IntegrationServiceEnvironmentAccessEndpointTypeExternal IntegrationServiceEnvironmentAccessEndpointType = "External" - // IntegrationServiceEnvironmentAccessEndpointTypeInternal ... - IntegrationServiceEnvironmentAccessEndpointTypeInternal IntegrationServiceEnvironmentAccessEndpointType = "Internal" - // IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified ... - IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified IntegrationServiceEnvironmentAccessEndpointType = "NotSpecified" -) - -// PossibleIntegrationServiceEnvironmentAccessEndpointTypeValues returns an array of possible values for the IntegrationServiceEnvironmentAccessEndpointType const type. -func PossibleIntegrationServiceEnvironmentAccessEndpointTypeValues() []IntegrationServiceEnvironmentAccessEndpointType { - return []IntegrationServiceEnvironmentAccessEndpointType{IntegrationServiceEnvironmentAccessEndpointTypeExternal, IntegrationServiceEnvironmentAccessEndpointTypeInternal, IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified} -} - -// IntegrationServiceEnvironmentNetworkDependencyCategoryType enumerates the values for integration service -// environment network dependency category type. -type IntegrationServiceEnvironmentNetworkDependencyCategoryType string - -const ( - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAccessEndpoints ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAccessEndpoints IntegrationServiceEnvironmentNetworkDependencyCategoryType = "AccessEndpoints" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureActiveDirectory ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureActiveDirectory IntegrationServiceEnvironmentNetworkDependencyCategoryType = "AzureActiveDirectory" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureManagement ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureManagement IntegrationServiceEnvironmentNetworkDependencyCategoryType = "AzureManagement" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureStorage ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureStorage IntegrationServiceEnvironmentNetworkDependencyCategoryType = "AzureStorage" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeDiagnosticLogsAndMetrics ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeDiagnosticLogsAndMetrics IntegrationServiceEnvironmentNetworkDependencyCategoryType = "DiagnosticLogsAndMetrics" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeIntegrationServiceEnvironmentConnectors ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeIntegrationServiceEnvironmentConnectors IntegrationServiceEnvironmentNetworkDependencyCategoryType = "IntegrationServiceEnvironmentConnectors" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeNotSpecified ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeNotSpecified IntegrationServiceEnvironmentNetworkDependencyCategoryType = "NotSpecified" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRecoveryService ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRecoveryService IntegrationServiceEnvironmentNetworkDependencyCategoryType = "RecoveryService" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRedisCache ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRedisCache IntegrationServiceEnvironmentNetworkDependencyCategoryType = "RedisCache" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRegionalService ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRegionalService IntegrationServiceEnvironmentNetworkDependencyCategoryType = "RegionalService" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSQL ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSQL IntegrationServiceEnvironmentNetworkDependencyCategoryType = "SQL" - // IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSSLCertificateVerification ... - IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSSLCertificateVerification IntegrationServiceEnvironmentNetworkDependencyCategoryType = "SSLCertificateVerification" -) - -// PossibleIntegrationServiceEnvironmentNetworkDependencyCategoryTypeValues returns an array of possible values for the IntegrationServiceEnvironmentNetworkDependencyCategoryType const type. -func PossibleIntegrationServiceEnvironmentNetworkDependencyCategoryTypeValues() []IntegrationServiceEnvironmentNetworkDependencyCategoryType { - return []IntegrationServiceEnvironmentNetworkDependencyCategoryType{IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAccessEndpoints, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureActiveDirectory, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureManagement, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureStorage, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeDiagnosticLogsAndMetrics, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeIntegrationServiceEnvironmentConnectors, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeNotSpecified, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRecoveryService, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRedisCache, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRegionalService, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSQL, IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSSLCertificateVerification} -} - -// IntegrationServiceEnvironmentNetworkDependencyHealthState enumerates the values for integration service -// environment network dependency health state. -type IntegrationServiceEnvironmentNetworkDependencyHealthState string - -const ( - // IntegrationServiceEnvironmentNetworkDependencyHealthStateHealthy ... - IntegrationServiceEnvironmentNetworkDependencyHealthStateHealthy IntegrationServiceEnvironmentNetworkDependencyHealthState = "Healthy" - // IntegrationServiceEnvironmentNetworkDependencyHealthStateNotSpecified ... - IntegrationServiceEnvironmentNetworkDependencyHealthStateNotSpecified IntegrationServiceEnvironmentNetworkDependencyHealthState = "NotSpecified" - // IntegrationServiceEnvironmentNetworkDependencyHealthStateUnhealthy ... - IntegrationServiceEnvironmentNetworkDependencyHealthStateUnhealthy IntegrationServiceEnvironmentNetworkDependencyHealthState = "Unhealthy" - // IntegrationServiceEnvironmentNetworkDependencyHealthStateUnknown ... - IntegrationServiceEnvironmentNetworkDependencyHealthStateUnknown IntegrationServiceEnvironmentNetworkDependencyHealthState = "Unknown" -) - -// PossibleIntegrationServiceEnvironmentNetworkDependencyHealthStateValues returns an array of possible values for the IntegrationServiceEnvironmentNetworkDependencyHealthState const type. -func PossibleIntegrationServiceEnvironmentNetworkDependencyHealthStateValues() []IntegrationServiceEnvironmentNetworkDependencyHealthState { - return []IntegrationServiceEnvironmentNetworkDependencyHealthState{IntegrationServiceEnvironmentNetworkDependencyHealthStateHealthy, IntegrationServiceEnvironmentNetworkDependencyHealthStateNotSpecified, IntegrationServiceEnvironmentNetworkDependencyHealthStateUnhealthy, IntegrationServiceEnvironmentNetworkDependencyHealthStateUnknown} -} - -// IntegrationServiceEnvironmentNetworkEndPointAccessibilityState enumerates the values for integration service -// environment network end point accessibility state. -type IntegrationServiceEnvironmentNetworkEndPointAccessibilityState string - -const ( - // IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateAvailable ... - IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateAvailable IntegrationServiceEnvironmentNetworkEndPointAccessibilityState = "Available" - // IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotAvailable ... - IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotAvailable IntegrationServiceEnvironmentNetworkEndPointAccessibilityState = "NotAvailable" - // IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotSpecified ... - IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotSpecified IntegrationServiceEnvironmentNetworkEndPointAccessibilityState = "NotSpecified" - // IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateUnknown ... - IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateUnknown IntegrationServiceEnvironmentNetworkEndPointAccessibilityState = "Unknown" -) - -// PossibleIntegrationServiceEnvironmentNetworkEndPointAccessibilityStateValues returns an array of possible values for the IntegrationServiceEnvironmentNetworkEndPointAccessibilityState const type. -func PossibleIntegrationServiceEnvironmentNetworkEndPointAccessibilityStateValues() []IntegrationServiceEnvironmentNetworkEndPointAccessibilityState { - return []IntegrationServiceEnvironmentNetworkEndPointAccessibilityState{IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateAvailable, IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotAvailable, IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotSpecified, IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateUnknown} -} - -// IntegrationServiceEnvironmentSkuName enumerates the values for integration service environment sku name. -type IntegrationServiceEnvironmentSkuName string - -const ( - // IntegrationServiceEnvironmentSkuNameDeveloper ... - IntegrationServiceEnvironmentSkuNameDeveloper IntegrationServiceEnvironmentSkuName = "Developer" - // IntegrationServiceEnvironmentSkuNameNotSpecified ... - IntegrationServiceEnvironmentSkuNameNotSpecified IntegrationServiceEnvironmentSkuName = "NotSpecified" - // IntegrationServiceEnvironmentSkuNamePremium ... - IntegrationServiceEnvironmentSkuNamePremium IntegrationServiceEnvironmentSkuName = "Premium" -) - -// PossibleIntegrationServiceEnvironmentSkuNameValues returns an array of possible values for the IntegrationServiceEnvironmentSkuName const type. -func PossibleIntegrationServiceEnvironmentSkuNameValues() []IntegrationServiceEnvironmentSkuName { - return []IntegrationServiceEnvironmentSkuName{IntegrationServiceEnvironmentSkuNameDeveloper, IntegrationServiceEnvironmentSkuNameNotSpecified, IntegrationServiceEnvironmentSkuNamePremium} -} - -// IntegrationServiceEnvironmentSkuScaleType enumerates the values for integration service environment sku -// scale type. -type IntegrationServiceEnvironmentSkuScaleType string - -const ( - // IntegrationServiceEnvironmentSkuScaleTypeAutomatic ... - IntegrationServiceEnvironmentSkuScaleTypeAutomatic IntegrationServiceEnvironmentSkuScaleType = "Automatic" - // IntegrationServiceEnvironmentSkuScaleTypeManual ... - IntegrationServiceEnvironmentSkuScaleTypeManual IntegrationServiceEnvironmentSkuScaleType = "Manual" - // IntegrationServiceEnvironmentSkuScaleTypeNone ... - IntegrationServiceEnvironmentSkuScaleTypeNone IntegrationServiceEnvironmentSkuScaleType = "None" -) - -// PossibleIntegrationServiceEnvironmentSkuScaleTypeValues returns an array of possible values for the IntegrationServiceEnvironmentSkuScaleType const type. -func PossibleIntegrationServiceEnvironmentSkuScaleTypeValues() []IntegrationServiceEnvironmentSkuScaleType { - return []IntegrationServiceEnvironmentSkuScaleType{IntegrationServiceEnvironmentSkuScaleTypeAutomatic, IntegrationServiceEnvironmentSkuScaleTypeManual, IntegrationServiceEnvironmentSkuScaleTypeNone} -} - -// KeyType enumerates the values for key type. -type KeyType string - -const ( - // KeyTypeNotSpecified ... - KeyTypeNotSpecified KeyType = "NotSpecified" - // KeyTypePrimary ... - KeyTypePrimary KeyType = "Primary" - // KeyTypeSecondary ... - KeyTypeSecondary KeyType = "Secondary" -) - -// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. -func PossibleKeyTypeValues() []KeyType { - return []KeyType{KeyTypeNotSpecified, KeyTypePrimary, KeyTypeSecondary} -} - -// ManagedServiceIdentityType enumerates the values for managed service identity type. -type ManagedServiceIdentityType string - -const ( - // ManagedServiceIdentityTypeNone ... - ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" - // ManagedServiceIdentityTypeSystemAssigned ... - ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" - // ManagedServiceIdentityTypeUserAssigned ... - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" -) - -// PossibleManagedServiceIdentityTypeValues returns an array of possible values for the ManagedServiceIdentityType const type. -func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { - return []ManagedServiceIdentityType{ManagedServiceIdentityTypeNone, ManagedServiceIdentityTypeSystemAssigned, ManagedServiceIdentityTypeUserAssigned} -} - -// MapType enumerates the values for map type. -type MapType string - -const ( - // MapTypeLiquid ... - MapTypeLiquid MapType = "Liquid" - // MapTypeNotSpecified ... - MapTypeNotSpecified MapType = "NotSpecified" - // MapTypeXslt ... - MapTypeXslt MapType = "Xslt" - // MapTypeXslt20 ... - MapTypeXslt20 MapType = "Xslt20" - // MapTypeXslt30 ... - MapTypeXslt30 MapType = "Xslt30" -) - -// PossibleMapTypeValues returns an array of possible values for the MapType const type. -func PossibleMapTypeValues() []MapType { - return []MapType{MapTypeLiquid, MapTypeNotSpecified, MapTypeXslt, MapTypeXslt20, MapTypeXslt30} -} - -// MessageFilterType enumerates the values for message filter type. -type MessageFilterType string - -const ( - // MessageFilterTypeExclude ... - MessageFilterTypeExclude MessageFilterType = "Exclude" - // MessageFilterTypeInclude ... - MessageFilterTypeInclude MessageFilterType = "Include" - // MessageFilterTypeNotSpecified ... - MessageFilterTypeNotSpecified MessageFilterType = "NotSpecified" -) - -// PossibleMessageFilterTypeValues returns an array of possible values for the MessageFilterType const type. -func PossibleMessageFilterTypeValues() []MessageFilterType { - return []MessageFilterType{MessageFilterTypeExclude, MessageFilterTypeInclude, MessageFilterTypeNotSpecified} -} - -// OpenAuthenticationProviderType enumerates the values for open authentication provider type. -type OpenAuthenticationProviderType string - -const ( - // OpenAuthenticationProviderTypeAAD ... - OpenAuthenticationProviderTypeAAD OpenAuthenticationProviderType = "AAD" -) - -// PossibleOpenAuthenticationProviderTypeValues returns an array of possible values for the OpenAuthenticationProviderType const type. -func PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProviderType { - return []OpenAuthenticationProviderType{OpenAuthenticationProviderTypeAAD} -} - -// ParameterType enumerates the values for parameter type. -type ParameterType string - -const ( - // ParameterTypeArray ... - ParameterTypeArray ParameterType = "Array" - // ParameterTypeBool ... - ParameterTypeBool ParameterType = "Bool" - // ParameterTypeFloat ... - ParameterTypeFloat ParameterType = "Float" - // ParameterTypeInt ... - ParameterTypeInt ParameterType = "Int" - // ParameterTypeNotSpecified ... - ParameterTypeNotSpecified ParameterType = "NotSpecified" - // ParameterTypeObject ... - ParameterTypeObject ParameterType = "Object" - // ParameterTypeSecureObject ... - ParameterTypeSecureObject ParameterType = "SecureObject" - // ParameterTypeSecureString ... - ParameterTypeSecureString ParameterType = "SecureString" - // ParameterTypeString ... - ParameterTypeString ParameterType = "String" -) - -// PossibleParameterTypeValues returns an array of possible values for the ParameterType const type. -func PossibleParameterTypeValues() []ParameterType { - return []ParameterType{ParameterTypeArray, ParameterTypeBool, ParameterTypeFloat, ParameterTypeInt, ParameterTypeNotSpecified, ParameterTypeObject, ParameterTypeSecureObject, ParameterTypeSecureString, ParameterTypeString} -} - -// PartnerType enumerates the values for partner type. -type PartnerType string - -const ( - // PartnerTypeB2B ... - PartnerTypeB2B PartnerType = "B2B" - // PartnerTypeNotSpecified ... - PartnerTypeNotSpecified PartnerType = "NotSpecified" -) - -// PossiblePartnerTypeValues returns an array of possible values for the PartnerType const type. -func PossiblePartnerTypeValues() []PartnerType { - return []PartnerType{PartnerTypeB2B, PartnerTypeNotSpecified} -} - -// RecurrenceFrequency enumerates the values for recurrence frequency. -type RecurrenceFrequency string - -const ( - // RecurrenceFrequencyDay ... - RecurrenceFrequencyDay RecurrenceFrequency = "Day" - // RecurrenceFrequencyHour ... - RecurrenceFrequencyHour RecurrenceFrequency = "Hour" - // RecurrenceFrequencyMinute ... - RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" - // RecurrenceFrequencyMonth ... - RecurrenceFrequencyMonth RecurrenceFrequency = "Month" - // RecurrenceFrequencyNotSpecified ... - RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" - // RecurrenceFrequencySecond ... - RecurrenceFrequencySecond RecurrenceFrequency = "Second" - // RecurrenceFrequencyWeek ... - RecurrenceFrequencyWeek RecurrenceFrequency = "Week" - // RecurrenceFrequencyYear ... - RecurrenceFrequencyYear RecurrenceFrequency = "Year" -) - -// PossibleRecurrenceFrequencyValues returns an array of possible values for the RecurrenceFrequency const type. -func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { - return []RecurrenceFrequency{RecurrenceFrequencyDay, RecurrenceFrequencyHour, RecurrenceFrequencyMinute, RecurrenceFrequencyMonth, RecurrenceFrequencyNotSpecified, RecurrenceFrequencySecond, RecurrenceFrequencyWeek, RecurrenceFrequencyYear} -} - -// SchemaType enumerates the values for schema type. -type SchemaType string - -const ( - // SchemaTypeNotSpecified ... - SchemaTypeNotSpecified SchemaType = "NotSpecified" - // SchemaTypeXML ... - SchemaTypeXML SchemaType = "Xml" -) - -// PossibleSchemaTypeValues returns an array of possible values for the SchemaType const type. -func PossibleSchemaTypeValues() []SchemaType { - return []SchemaType{SchemaTypeNotSpecified, SchemaTypeXML} -} - -// SegmentTerminatorSuffix enumerates the values for segment terminator suffix. -type SegmentTerminatorSuffix string - -const ( - // SegmentTerminatorSuffixCR ... - SegmentTerminatorSuffixCR SegmentTerminatorSuffix = "CR" - // SegmentTerminatorSuffixCRLF ... - SegmentTerminatorSuffixCRLF SegmentTerminatorSuffix = "CRLF" - // SegmentTerminatorSuffixLF ... - SegmentTerminatorSuffixLF SegmentTerminatorSuffix = "LF" - // SegmentTerminatorSuffixNone ... - SegmentTerminatorSuffixNone SegmentTerminatorSuffix = "None" - // SegmentTerminatorSuffixNotSpecified ... - SegmentTerminatorSuffixNotSpecified SegmentTerminatorSuffix = "NotSpecified" -) - -// PossibleSegmentTerminatorSuffixValues returns an array of possible values for the SegmentTerminatorSuffix const type. -func PossibleSegmentTerminatorSuffixValues() []SegmentTerminatorSuffix { - return []SegmentTerminatorSuffix{SegmentTerminatorSuffixCR, SegmentTerminatorSuffixCRLF, SegmentTerminatorSuffixLF, SegmentTerminatorSuffixNone, SegmentTerminatorSuffixNotSpecified} -} - -// SigningAlgorithm enumerates the values for signing algorithm. -type SigningAlgorithm string - -const ( - // SigningAlgorithmDefault ... - SigningAlgorithmDefault SigningAlgorithm = "Default" - // SigningAlgorithmNotSpecified ... - SigningAlgorithmNotSpecified SigningAlgorithm = "NotSpecified" - // SigningAlgorithmSHA1 ... - SigningAlgorithmSHA1 SigningAlgorithm = "SHA1" - // SigningAlgorithmSHA2256 ... - SigningAlgorithmSHA2256 SigningAlgorithm = "SHA2256" - // SigningAlgorithmSHA2384 ... - SigningAlgorithmSHA2384 SigningAlgorithm = "SHA2384" - // SigningAlgorithmSHA2512 ... - SigningAlgorithmSHA2512 SigningAlgorithm = "SHA2512" -) - -// PossibleSigningAlgorithmValues returns an array of possible values for the SigningAlgorithm const type. -func PossibleSigningAlgorithmValues() []SigningAlgorithm { - return []SigningAlgorithm{SigningAlgorithmDefault, SigningAlgorithmNotSpecified, SigningAlgorithmSHA1, SigningAlgorithmSHA2256, SigningAlgorithmSHA2384, SigningAlgorithmSHA2512} -} - -// SkuName enumerates the values for sku name. -type SkuName string - -const ( - // SkuNameBasic ... - SkuNameBasic SkuName = "Basic" - // SkuNameFree ... - SkuNameFree SkuName = "Free" - // SkuNameNotSpecified ... - SkuNameNotSpecified SkuName = "NotSpecified" - // SkuNamePremium ... - SkuNamePremium SkuName = "Premium" - // SkuNameShared ... - SkuNameShared SkuName = "Shared" - // SkuNameStandard ... - SkuNameStandard SkuName = "Standard" -) - -// PossibleSkuNameValues returns an array of possible values for the SkuName const type. -func PossibleSkuNameValues() []SkuName { - return []SkuName{SkuNameBasic, SkuNameFree, SkuNameNotSpecified, SkuNamePremium, SkuNameShared, SkuNameStandard} -} - -// StatusAnnotation enumerates the values for status annotation. -type StatusAnnotation string - -const ( - // StatusAnnotationNotSpecified ... - StatusAnnotationNotSpecified StatusAnnotation = "NotSpecified" - // StatusAnnotationPreview ... - StatusAnnotationPreview StatusAnnotation = "Preview" - // StatusAnnotationProduction ... - StatusAnnotationProduction StatusAnnotation = "Production" -) - -// PossibleStatusAnnotationValues returns an array of possible values for the StatusAnnotation const type. -func PossibleStatusAnnotationValues() []StatusAnnotation { - return []StatusAnnotation{StatusAnnotationNotSpecified, StatusAnnotationPreview, StatusAnnotationProduction} -} - -// SwaggerSchemaType enumerates the values for swagger schema type. -type SwaggerSchemaType string - -const ( - // SwaggerSchemaTypeArray ... - SwaggerSchemaTypeArray SwaggerSchemaType = "Array" - // SwaggerSchemaTypeBoolean ... - SwaggerSchemaTypeBoolean SwaggerSchemaType = "Boolean" - // SwaggerSchemaTypeFile ... - SwaggerSchemaTypeFile SwaggerSchemaType = "File" - // SwaggerSchemaTypeInteger ... - SwaggerSchemaTypeInteger SwaggerSchemaType = "Integer" - // SwaggerSchemaTypeNull ... - SwaggerSchemaTypeNull SwaggerSchemaType = "Null" - // SwaggerSchemaTypeNumber ... - SwaggerSchemaTypeNumber SwaggerSchemaType = "Number" - // SwaggerSchemaTypeObject ... - SwaggerSchemaTypeObject SwaggerSchemaType = "Object" - // SwaggerSchemaTypeString ... - SwaggerSchemaTypeString SwaggerSchemaType = "String" -) - -// PossibleSwaggerSchemaTypeValues returns an array of possible values for the SwaggerSchemaType const type. -func PossibleSwaggerSchemaTypeValues() []SwaggerSchemaType { - return []SwaggerSchemaType{SwaggerSchemaTypeArray, SwaggerSchemaTypeBoolean, SwaggerSchemaTypeFile, SwaggerSchemaTypeInteger, SwaggerSchemaTypeNull, SwaggerSchemaTypeNumber, SwaggerSchemaTypeObject, SwaggerSchemaTypeString} -} - -// TrackEventsOperationOptions enumerates the values for track events operation options. -type TrackEventsOperationOptions string - -const ( - // TrackEventsOperationOptionsDisableSourceInfoEnrich ... - TrackEventsOperationOptionsDisableSourceInfoEnrich TrackEventsOperationOptions = "DisableSourceInfoEnrich" - // TrackEventsOperationOptionsNone ... - TrackEventsOperationOptionsNone TrackEventsOperationOptions = "None" -) - -// PossibleTrackEventsOperationOptionsValues returns an array of possible values for the TrackEventsOperationOptions const type. -func PossibleTrackEventsOperationOptionsValues() []TrackEventsOperationOptions { - return []TrackEventsOperationOptions{TrackEventsOperationOptionsDisableSourceInfoEnrich, TrackEventsOperationOptionsNone} -} - -// TrackingRecordType enumerates the values for tracking record type. -type TrackingRecordType string - -const ( - // TrackingRecordTypeAS2MDN ... - TrackingRecordTypeAS2MDN TrackingRecordType = "AS2MDN" - // TrackingRecordTypeAS2Message ... - TrackingRecordTypeAS2Message TrackingRecordType = "AS2Message" - // TrackingRecordTypeCustom ... - TrackingRecordTypeCustom TrackingRecordType = "Custom" - // TrackingRecordTypeEdifactFunctionalGroup ... - TrackingRecordTypeEdifactFunctionalGroup TrackingRecordType = "EdifactFunctionalGroup" - // TrackingRecordTypeEdifactFunctionalGroupAcknowledgment ... - TrackingRecordTypeEdifactFunctionalGroupAcknowledgment TrackingRecordType = "EdifactFunctionalGroupAcknowledgment" - // TrackingRecordTypeEdifactInterchange ... - TrackingRecordTypeEdifactInterchange TrackingRecordType = "EdifactInterchange" - // TrackingRecordTypeEdifactInterchangeAcknowledgment ... - TrackingRecordTypeEdifactInterchangeAcknowledgment TrackingRecordType = "EdifactInterchangeAcknowledgment" - // TrackingRecordTypeEdifactTransactionSet ... - TrackingRecordTypeEdifactTransactionSet TrackingRecordType = "EdifactTransactionSet" - // TrackingRecordTypeEdifactTransactionSetAcknowledgment ... - TrackingRecordTypeEdifactTransactionSetAcknowledgment TrackingRecordType = "EdifactTransactionSetAcknowledgment" - // TrackingRecordTypeNotSpecified ... - TrackingRecordTypeNotSpecified TrackingRecordType = "NotSpecified" - // TrackingRecordTypeX12FunctionalGroup ... - TrackingRecordTypeX12FunctionalGroup TrackingRecordType = "X12FunctionalGroup" - // TrackingRecordTypeX12FunctionalGroupAcknowledgment ... - TrackingRecordTypeX12FunctionalGroupAcknowledgment TrackingRecordType = "X12FunctionalGroupAcknowledgment" - // TrackingRecordTypeX12Interchange ... - TrackingRecordTypeX12Interchange TrackingRecordType = "X12Interchange" - // TrackingRecordTypeX12InterchangeAcknowledgment ... - TrackingRecordTypeX12InterchangeAcknowledgment TrackingRecordType = "X12InterchangeAcknowledgment" - // TrackingRecordTypeX12TransactionSet ... - TrackingRecordTypeX12TransactionSet TrackingRecordType = "X12TransactionSet" - // TrackingRecordTypeX12TransactionSetAcknowledgment ... - TrackingRecordTypeX12TransactionSetAcknowledgment TrackingRecordType = "X12TransactionSetAcknowledgment" -) - -// PossibleTrackingRecordTypeValues returns an array of possible values for the TrackingRecordType const type. -func PossibleTrackingRecordTypeValues() []TrackingRecordType { - return []TrackingRecordType{TrackingRecordTypeAS2MDN, TrackingRecordTypeAS2Message, TrackingRecordTypeCustom, TrackingRecordTypeEdifactFunctionalGroup, TrackingRecordTypeEdifactFunctionalGroupAcknowledgment, TrackingRecordTypeEdifactInterchange, TrackingRecordTypeEdifactInterchangeAcknowledgment, TrackingRecordTypeEdifactTransactionSet, TrackingRecordTypeEdifactTransactionSetAcknowledgment, TrackingRecordTypeNotSpecified, TrackingRecordTypeX12FunctionalGroup, TrackingRecordTypeX12FunctionalGroupAcknowledgment, TrackingRecordTypeX12Interchange, TrackingRecordTypeX12InterchangeAcknowledgment, TrackingRecordTypeX12TransactionSet, TrackingRecordTypeX12TransactionSetAcknowledgment} -} - -// TrailingSeparatorPolicy enumerates the values for trailing separator policy. -type TrailingSeparatorPolicy string - -const ( - // TrailingSeparatorPolicyMandatory ... - TrailingSeparatorPolicyMandatory TrailingSeparatorPolicy = "Mandatory" - // TrailingSeparatorPolicyNotAllowed ... - TrailingSeparatorPolicyNotAllowed TrailingSeparatorPolicy = "NotAllowed" - // TrailingSeparatorPolicyNotSpecified ... - TrailingSeparatorPolicyNotSpecified TrailingSeparatorPolicy = "NotSpecified" - // TrailingSeparatorPolicyOptional ... - TrailingSeparatorPolicyOptional TrailingSeparatorPolicy = "Optional" -) - -// PossibleTrailingSeparatorPolicyValues returns an array of possible values for the TrailingSeparatorPolicy const type. -func PossibleTrailingSeparatorPolicyValues() []TrailingSeparatorPolicy { - return []TrailingSeparatorPolicy{TrailingSeparatorPolicyMandatory, TrailingSeparatorPolicyNotAllowed, TrailingSeparatorPolicyNotSpecified, TrailingSeparatorPolicyOptional} -} - -// UsageIndicator enumerates the values for usage indicator. -type UsageIndicator string - -const ( - // UsageIndicatorInformation ... - UsageIndicatorInformation UsageIndicator = "Information" - // UsageIndicatorNotSpecified ... - UsageIndicatorNotSpecified UsageIndicator = "NotSpecified" - // UsageIndicatorProduction ... - UsageIndicatorProduction UsageIndicator = "Production" - // UsageIndicatorTest ... - UsageIndicatorTest UsageIndicator = "Test" -) - -// PossibleUsageIndicatorValues returns an array of possible values for the UsageIndicator const type. -func PossibleUsageIndicatorValues() []UsageIndicator { - return []UsageIndicator{UsageIndicatorInformation, UsageIndicatorNotSpecified, UsageIndicatorProduction, UsageIndicatorTest} -} - -// WorkflowProvisioningState enumerates the values for workflow provisioning state. -type WorkflowProvisioningState string - -const ( - // WorkflowProvisioningStateAccepted ... - WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" - // WorkflowProvisioningStateCanceled ... - WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" - // WorkflowProvisioningStateCompleted ... - WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" - // WorkflowProvisioningStateCreated ... - WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" - // WorkflowProvisioningStateCreating ... - WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" - // WorkflowProvisioningStateDeleted ... - WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" - // WorkflowProvisioningStateDeleting ... - WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" - // WorkflowProvisioningStateFailed ... - WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" - // WorkflowProvisioningStateInProgress ... - WorkflowProvisioningStateInProgress WorkflowProvisioningState = "InProgress" - // WorkflowProvisioningStateMoving ... - WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" - // WorkflowProvisioningStateNotSpecified ... - WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" - // WorkflowProvisioningStatePending ... - WorkflowProvisioningStatePending WorkflowProvisioningState = "Pending" - // WorkflowProvisioningStateReady ... - WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" - // WorkflowProvisioningStateRegistered ... - WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" - // WorkflowProvisioningStateRegistering ... - WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" - // WorkflowProvisioningStateRenewing ... - WorkflowProvisioningStateRenewing WorkflowProvisioningState = "Renewing" - // WorkflowProvisioningStateRunning ... - WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" - // WorkflowProvisioningStateSucceeded ... - WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" - // WorkflowProvisioningStateUnregistered ... - WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" - // WorkflowProvisioningStateUnregistering ... - WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" - // WorkflowProvisioningStateUpdating ... - WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" - // WorkflowProvisioningStateWaiting ... - WorkflowProvisioningStateWaiting WorkflowProvisioningState = "Waiting" -) - -// PossibleWorkflowProvisioningStateValues returns an array of possible values for the WorkflowProvisioningState const type. -func PossibleWorkflowProvisioningStateValues() []WorkflowProvisioningState { - return []WorkflowProvisioningState{WorkflowProvisioningStateAccepted, WorkflowProvisioningStateCanceled, WorkflowProvisioningStateCompleted, WorkflowProvisioningStateCreated, WorkflowProvisioningStateCreating, WorkflowProvisioningStateDeleted, WorkflowProvisioningStateDeleting, WorkflowProvisioningStateFailed, WorkflowProvisioningStateInProgress, WorkflowProvisioningStateMoving, WorkflowProvisioningStateNotSpecified, WorkflowProvisioningStatePending, WorkflowProvisioningStateReady, WorkflowProvisioningStateRegistered, WorkflowProvisioningStateRegistering, WorkflowProvisioningStateRenewing, WorkflowProvisioningStateRunning, WorkflowProvisioningStateSucceeded, WorkflowProvisioningStateUnregistered, WorkflowProvisioningStateUnregistering, WorkflowProvisioningStateUpdating, WorkflowProvisioningStateWaiting} -} - -// WorkflowState enumerates the values for workflow state. -type WorkflowState string - -const ( - // WorkflowStateCompleted ... - WorkflowStateCompleted WorkflowState = "Completed" - // WorkflowStateDeleted ... - WorkflowStateDeleted WorkflowState = "Deleted" - // WorkflowStateDisabled ... - WorkflowStateDisabled WorkflowState = "Disabled" - // WorkflowStateEnabled ... - WorkflowStateEnabled WorkflowState = "Enabled" - // WorkflowStateNotSpecified ... - WorkflowStateNotSpecified WorkflowState = "NotSpecified" - // WorkflowStateSuspended ... - WorkflowStateSuspended WorkflowState = "Suspended" -) - -// PossibleWorkflowStateValues returns an array of possible values for the WorkflowState const type. -func PossibleWorkflowStateValues() []WorkflowState { - return []WorkflowState{WorkflowStateCompleted, WorkflowStateDeleted, WorkflowStateDisabled, WorkflowStateEnabled, WorkflowStateNotSpecified, WorkflowStateSuspended} -} - -// WorkflowStatus enumerates the values for workflow status. -type WorkflowStatus string - -const ( - // WorkflowStatusAborted ... - WorkflowStatusAborted WorkflowStatus = "Aborted" - // WorkflowStatusCancelled ... - WorkflowStatusCancelled WorkflowStatus = "Cancelled" - // WorkflowStatusFailed ... - WorkflowStatusFailed WorkflowStatus = "Failed" - // WorkflowStatusFaulted ... - WorkflowStatusFaulted WorkflowStatus = "Faulted" - // WorkflowStatusIgnored ... - WorkflowStatusIgnored WorkflowStatus = "Ignored" - // WorkflowStatusNotSpecified ... - WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" - // WorkflowStatusPaused ... - WorkflowStatusPaused WorkflowStatus = "Paused" - // WorkflowStatusRunning ... - WorkflowStatusRunning WorkflowStatus = "Running" - // WorkflowStatusSkipped ... - WorkflowStatusSkipped WorkflowStatus = "Skipped" - // WorkflowStatusSucceeded ... - WorkflowStatusSucceeded WorkflowStatus = "Succeeded" - // WorkflowStatusSuspended ... - WorkflowStatusSuspended WorkflowStatus = "Suspended" - // WorkflowStatusTimedOut ... - WorkflowStatusTimedOut WorkflowStatus = "TimedOut" - // WorkflowStatusWaiting ... - WorkflowStatusWaiting WorkflowStatus = "Waiting" -) - -// PossibleWorkflowStatusValues returns an array of possible values for the WorkflowStatus const type. -func PossibleWorkflowStatusValues() []WorkflowStatus { - return []WorkflowStatus{WorkflowStatusAborted, WorkflowStatusCancelled, WorkflowStatusFailed, WorkflowStatusFaulted, WorkflowStatusIgnored, WorkflowStatusNotSpecified, WorkflowStatusPaused, WorkflowStatusRunning, WorkflowStatusSkipped, WorkflowStatusSucceeded, WorkflowStatusSuspended, WorkflowStatusTimedOut, WorkflowStatusWaiting} -} - -// WorkflowTriggerProvisioningState enumerates the values for workflow trigger provisioning state. -type WorkflowTriggerProvisioningState string - -const ( - // WorkflowTriggerProvisioningStateAccepted ... - WorkflowTriggerProvisioningStateAccepted WorkflowTriggerProvisioningState = "Accepted" - // WorkflowTriggerProvisioningStateCanceled ... - WorkflowTriggerProvisioningStateCanceled WorkflowTriggerProvisioningState = "Canceled" - // WorkflowTriggerProvisioningStateCompleted ... - WorkflowTriggerProvisioningStateCompleted WorkflowTriggerProvisioningState = "Completed" - // WorkflowTriggerProvisioningStateCreated ... - WorkflowTriggerProvisioningStateCreated WorkflowTriggerProvisioningState = "Created" - // WorkflowTriggerProvisioningStateCreating ... - WorkflowTriggerProvisioningStateCreating WorkflowTriggerProvisioningState = "Creating" - // WorkflowTriggerProvisioningStateDeleted ... - WorkflowTriggerProvisioningStateDeleted WorkflowTriggerProvisioningState = "Deleted" - // WorkflowTriggerProvisioningStateDeleting ... - WorkflowTriggerProvisioningStateDeleting WorkflowTriggerProvisioningState = "Deleting" - // WorkflowTriggerProvisioningStateFailed ... - WorkflowTriggerProvisioningStateFailed WorkflowTriggerProvisioningState = "Failed" - // WorkflowTriggerProvisioningStateMoving ... - WorkflowTriggerProvisioningStateMoving WorkflowTriggerProvisioningState = "Moving" - // WorkflowTriggerProvisioningStateNotSpecified ... - WorkflowTriggerProvisioningStateNotSpecified WorkflowTriggerProvisioningState = "NotSpecified" - // WorkflowTriggerProvisioningStateReady ... - WorkflowTriggerProvisioningStateReady WorkflowTriggerProvisioningState = "Ready" - // WorkflowTriggerProvisioningStateRegistered ... - WorkflowTriggerProvisioningStateRegistered WorkflowTriggerProvisioningState = "Registered" - // WorkflowTriggerProvisioningStateRegistering ... - WorkflowTriggerProvisioningStateRegistering WorkflowTriggerProvisioningState = "Registering" - // WorkflowTriggerProvisioningStateRunning ... - WorkflowTriggerProvisioningStateRunning WorkflowTriggerProvisioningState = "Running" - // WorkflowTriggerProvisioningStateSucceeded ... - WorkflowTriggerProvisioningStateSucceeded WorkflowTriggerProvisioningState = "Succeeded" - // WorkflowTriggerProvisioningStateUnregistered ... - WorkflowTriggerProvisioningStateUnregistered WorkflowTriggerProvisioningState = "Unregistered" - // WorkflowTriggerProvisioningStateUnregistering ... - WorkflowTriggerProvisioningStateUnregistering WorkflowTriggerProvisioningState = "Unregistering" - // WorkflowTriggerProvisioningStateUpdating ... - WorkflowTriggerProvisioningStateUpdating WorkflowTriggerProvisioningState = "Updating" -) - -// PossibleWorkflowTriggerProvisioningStateValues returns an array of possible values for the WorkflowTriggerProvisioningState const type. -func PossibleWorkflowTriggerProvisioningStateValues() []WorkflowTriggerProvisioningState { - return []WorkflowTriggerProvisioningState{WorkflowTriggerProvisioningStateAccepted, WorkflowTriggerProvisioningStateCanceled, WorkflowTriggerProvisioningStateCompleted, WorkflowTriggerProvisioningStateCreated, WorkflowTriggerProvisioningStateCreating, WorkflowTriggerProvisioningStateDeleted, WorkflowTriggerProvisioningStateDeleting, WorkflowTriggerProvisioningStateFailed, WorkflowTriggerProvisioningStateMoving, WorkflowTriggerProvisioningStateNotSpecified, WorkflowTriggerProvisioningStateReady, WorkflowTriggerProvisioningStateRegistered, WorkflowTriggerProvisioningStateRegistering, WorkflowTriggerProvisioningStateRunning, WorkflowTriggerProvisioningStateSucceeded, WorkflowTriggerProvisioningStateUnregistered, WorkflowTriggerProvisioningStateUnregistering, WorkflowTriggerProvisioningStateUpdating} -} - -// WsdlImportMethod enumerates the values for wsdl import method. -type WsdlImportMethod string - -const ( - // WsdlImportMethodNotSpecified ... - WsdlImportMethodNotSpecified WsdlImportMethod = "NotSpecified" - // WsdlImportMethodSoapPassThrough ... - WsdlImportMethodSoapPassThrough WsdlImportMethod = "SoapPassThrough" - // WsdlImportMethodSoapToRest ... - WsdlImportMethodSoapToRest WsdlImportMethod = "SoapToRest" -) - -// PossibleWsdlImportMethodValues returns an array of possible values for the WsdlImportMethod const type. -func PossibleWsdlImportMethodValues() []WsdlImportMethod { - return []WsdlImportMethod{WsdlImportMethodNotSpecified, WsdlImportMethodSoapPassThrough, WsdlImportMethodSoapToRest} -} - -// X12CharacterSet enumerates the values for x12 character set. -type X12CharacterSet string - -const ( - // X12CharacterSetBasic ... - X12CharacterSetBasic X12CharacterSet = "Basic" - // X12CharacterSetExtended ... - X12CharacterSetExtended X12CharacterSet = "Extended" - // X12CharacterSetNotSpecified ... - X12CharacterSetNotSpecified X12CharacterSet = "NotSpecified" - // X12CharacterSetUTF8 ... - X12CharacterSetUTF8 X12CharacterSet = "UTF8" -) - -// PossibleX12CharacterSetValues returns an array of possible values for the X12CharacterSet const type. -func PossibleX12CharacterSetValues() []X12CharacterSet { - return []X12CharacterSet{X12CharacterSetBasic, X12CharacterSetExtended, X12CharacterSetNotSpecified, X12CharacterSetUTF8} -} - -// X12DateFormat enumerates the values for x12 date format. -type X12DateFormat string - -const ( - // X12DateFormatCCYYMMDD ... - X12DateFormatCCYYMMDD X12DateFormat = "CCYYMMDD" - // X12DateFormatNotSpecified ... - X12DateFormatNotSpecified X12DateFormat = "NotSpecified" - // X12DateFormatYYMMDD ... - X12DateFormatYYMMDD X12DateFormat = "YYMMDD" -) - -// PossibleX12DateFormatValues returns an array of possible values for the X12DateFormat const type. -func PossibleX12DateFormatValues() []X12DateFormat { - return []X12DateFormat{X12DateFormatCCYYMMDD, X12DateFormatNotSpecified, X12DateFormatYYMMDD} -} - -// X12TimeFormat enumerates the values for x12 time format. -type X12TimeFormat string - -const ( - // X12TimeFormatHHMM ... - X12TimeFormatHHMM X12TimeFormat = "HHMM" - // X12TimeFormatHHMMSS ... - X12TimeFormatHHMMSS X12TimeFormat = "HHMMSS" - // X12TimeFormatHHMMSSd ... - X12TimeFormatHHMMSSd X12TimeFormat = "HHMMSSd" - // X12TimeFormatHHMMSSdd ... - X12TimeFormatHHMMSSdd X12TimeFormat = "HHMMSSdd" - // X12TimeFormatNotSpecified ... - X12TimeFormatNotSpecified X12TimeFormat = "NotSpecified" -) - -// PossibleX12TimeFormatValues returns an array of possible values for the X12TimeFormat const type. -func PossibleX12TimeFormatValues() []X12TimeFormat { - return []X12TimeFormat{X12TimeFormatHHMM, X12TimeFormatHHMMSS, X12TimeFormatHHMMSSd, X12TimeFormatHHMMSSdd, X12TimeFormatNotSpecified} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go deleted file mode 100644 index 59bd44134ce6..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go +++ /dev/null @@ -1,910 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountAgreementsClient is the REST API for Azure Logic Apps. -type IntegrationAccountAgreementsClient struct { - BaseClient -} - -// NewIntegrationAccountAgreementsClient creates an instance of the IntegrationAccountAgreementsClient client. -func NewIntegrationAccountAgreementsClient(subscriptionID string) IntegrationAccountAgreementsClient { - return NewIntegrationAccountAgreementsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountAgreementsClientWithBaseURI creates an instance of the IntegrationAccountAgreementsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewIntegrationAccountAgreementsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAgreementsClient { - return IntegrationAccountAgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account agreement. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// agreementName - the integration account agreement name. -// agreement - the integration account agreement. -func (client IntegrationAccountAgreementsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, agreement IntegrationAccountAgreement) (result IntegrationAccountAgreement, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: agreement, - Constraints: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.HostPartner", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.GuestPartner", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.HostIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.HostIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.HostIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.GuestIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.GuestIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.GuestIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.SenderBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.SenderBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.SenderBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ReceiverBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ReceiverBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ReceiverBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MessageConnectionSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MessageConnectionSettings.IgnoreCertificateNameMismatch", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MessageConnectionSettings.SupportHTTPStatusCodeContinue", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MessageConnectionSettings.KeepHTTPConnectionAlive", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MessageConnectionSettings.UnfoldHTTPHeaders", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.AcknowledgementConnectionSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.AcknowledgementConnectionSettings.IgnoreCertificateNameMismatch", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.AcknowledgementConnectionSettings.SupportHTTPStatusCodeContinue", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.AcknowledgementConnectionSettings.KeepHTTPConnectionAlive", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.AcknowledgementConnectionSettings.UnfoldHTTPHeaders", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MdnSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MdnSettings.NeedMDN", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MdnSettings.SignMDN", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MdnSettings.SendMDNAsynchronously", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MdnSettings.SignOutboundMDNIfOptional", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.MdnSettings.SendInboundMDNToMessageBox", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.OverrideGroupSigningCertificate", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.EnableNRRForInboundEncodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.EnableNRRForInboundDecodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.EnableNRRForOutboundMDN", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.EnableNRRForOutboundEncodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.EnableNRRForOutboundDecodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.SecuritySettings.EnableNRRForInboundMDN", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.OverrideMessageProperties", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.EncryptMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.SignMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.CompressMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.InterchangeDuplicatesValidityDays", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckCertificateRevocationListOnSend", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckCertificateRevocationListOnReceive", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.EnvelopeSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.MessageContentType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.TransmitFileNameInMimeHeader", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.FileNameTemplate", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.SuspendMessageOnFileNameGenerationError", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.AutogenerateFileName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ErrorSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ErrorSettings.SuspendDuplicateMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.ReceiveAgreement.ProtocolSettings.ErrorSettings.ResendIfMDNNotReceived", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.SenderBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.SenderBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.SenderBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ReceiverBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ReceiverBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ReceiverBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MessageConnectionSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MessageConnectionSettings.IgnoreCertificateNameMismatch", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MessageConnectionSettings.SupportHTTPStatusCodeContinue", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MessageConnectionSettings.KeepHTTPConnectionAlive", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MessageConnectionSettings.UnfoldHTTPHeaders", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.AcknowledgementConnectionSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.AcknowledgementConnectionSettings.IgnoreCertificateNameMismatch", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.AcknowledgementConnectionSettings.SupportHTTPStatusCodeContinue", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.AcknowledgementConnectionSettings.KeepHTTPConnectionAlive", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.AcknowledgementConnectionSettings.UnfoldHTTPHeaders", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MdnSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MdnSettings.NeedMDN", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MdnSettings.SignMDN", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MdnSettings.SendMDNAsynchronously", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MdnSettings.SignOutboundMDNIfOptional", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.MdnSettings.SendInboundMDNToMessageBox", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.OverrideGroupSigningCertificate", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.EnableNRRForInboundEncodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.EnableNRRForInboundDecodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.EnableNRRForOutboundMDN", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.EnableNRRForOutboundEncodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.EnableNRRForOutboundDecodedMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.SecuritySettings.EnableNRRForInboundMDN", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.OverrideMessageProperties", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.EncryptMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.SignMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.CompressMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.InterchangeDuplicatesValidityDays", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.CheckCertificateRevocationListOnSend", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ValidationSettings.CheckCertificateRevocationListOnReceive", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.EnvelopeSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.EnvelopeSettings.MessageContentType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.EnvelopeSettings.TransmitFileNameInMimeHeader", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.EnvelopeSettings.FileNameTemplate", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.EnvelopeSettings.SuspendMessageOnFileNameGenerationError", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.EnvelopeSettings.AutogenerateFileName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ErrorSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ErrorSettings.SuspendDuplicateMessage", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.AS2.SendAgreement.ProtocolSettings.ErrorSettings.ResendIfMDNNotReceived", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.SenderBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.SenderBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.SenderBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ReceiverBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ReceiverBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ReceiverBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.ValidateCharacterSet", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.InterchangeControlNumberValidityDays", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.ValidateEDITypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.ValidateXSDTypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.AllowLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ValidationSettings.TrimLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.FramingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.FramingSettings.DataElementSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.FramingSettings.ComponentSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.FramingSettings.ReplaceSeparatorsInPayload", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.FramingSettings.ReplaceCharacter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.FramingSettings.SegmentTerminator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.ControlStandardsID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.UseControlStandardsIDAsRepetitionCharacter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.SenderApplicationID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.ReceiverApplicationID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.ControlVersionNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.RolloverInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.EnableDefaultGroupHeaders", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.RolloverGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.GroupHeaderAgencyCode", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.GroupHeaderVersion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.RolloverTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.OverwriteExistingTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedTechnicalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.BatchTechnicalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedFunctionalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.BatchFunctionalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedImplementationAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.BatchImplementationAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedLoopForValidMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.SendSynchronousAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.RolloverAcknowledgementControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.MessageFilter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.SecuritySettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.SecuritySettings.AuthorizationQualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.SecuritySettings.SecurityQualifier", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings.MaskSecurityInfo", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings.ConvertImpliedDecimal", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings.PreserveInterchange", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings.SuspendInterchangeOnError", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings.CreateEmptyXMLTagsForTrailingSeparators", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.ProcessingSettings.UseDotAsDecimalSeparator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.ReceiveAgreement.ProtocolSettings.SchemaReferences", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.SenderBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.SenderBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.SenderBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ReceiverBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ReceiverBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ReceiverBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.ValidateCharacterSet", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.InterchangeControlNumberValidityDays", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.ValidateEDITypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.ValidateXSDTypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.AllowLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ValidationSettings.TrimLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.FramingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.FramingSettings.DataElementSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.FramingSettings.ComponentSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.FramingSettings.ReplaceSeparatorsInPayload", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.FramingSettings.ReplaceCharacter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.FramingSettings.SegmentTerminator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.ControlStandardsID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.UseControlStandardsIDAsRepetitionCharacter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.SenderApplicationID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.ReceiverApplicationID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.ControlVersionNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.RolloverInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.EnableDefaultGroupHeaders", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.RolloverGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.GroupHeaderAgencyCode", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.GroupHeaderVersion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.RolloverTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.EnvelopeSettings.OverwriteExistingTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedTechnicalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.BatchTechnicalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedFunctionalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.BatchFunctionalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedImplementationAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.BatchImplementationAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedLoopForValidMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.SendSynchronousAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.AcknowledgementSettings.RolloverAcknowledgementControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.MessageFilter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.SecuritySettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.SecuritySettings.AuthorizationQualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.SecuritySettings.SecurityQualifier", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings.MaskSecurityInfo", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings.ConvertImpliedDecimal", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings.PreserveInterchange", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings.SuspendInterchangeOnError", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings.CreateEmptyXMLTagsForTrailingSeparators", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.ProcessingSettings.UseDotAsDecimalSeparator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.X12.SendAgreement.ProtocolSettings.SchemaReferences", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.SenderBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.SenderBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.SenderBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ReceiverBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ReceiverBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ReceiverBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.ValidateCharacterSet", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.InterchangeControlNumberValidityDays", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.ValidateEDITypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.ValidateXSDTypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.AllowLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ValidationSettings.TrimLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings.ProtocolVersion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings.DataElementSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings.ComponentSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings.SegmentTerminator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings.ReleaseIndicator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.FramingSettings.RepetitionSeparator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.ApplyDelimiterStringAdvice", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.CreateGroupingSegments", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.EnableDefaultGroupHeaders", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.RolloverInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.RolloverGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.OverwriteExistingTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.RolloverTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.EnvelopeSettings.IsTestInterchange", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedTechnicalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.BatchTechnicalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedFunctionalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.BatchFunctionalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.NeedLoopForValidMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.SendSynchronousAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.AcknowledgementSettings.RolloverAcknowledgementControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.MessageFilter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ProcessingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ProcessingSettings.MaskSecurityInfo", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ProcessingSettings.PreserveInterchange", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ProcessingSettings.SuspendInterchangeOnError", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ProcessingSettings.CreateEmptyXMLTagsForTrailingSeparators", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.ProcessingSettings.UseDotAsDecimalSeparator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.ReceiveAgreement.ProtocolSettings.SchemaReferences", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.SenderBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.SenderBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.SenderBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ReceiverBusinessIdentity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ReceiverBusinessIdentity.Qualifier", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ReceiverBusinessIdentity.Value", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.ValidateCharacterSet", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.InterchangeControlNumberValidityDays", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.CheckDuplicateTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.ValidateEDITypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.ValidateXSDTypes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.AllowLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ValidationSettings.TrimLeadingAndTrailingSpacesAndZeroes", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings.ProtocolVersion", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings.DataElementSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings.ComponentSeparator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings.SegmentTerminator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings.ReleaseIndicator", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.FramingSettings.RepetitionSeparator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.ApplyDelimiterStringAdvice", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.CreateGroupingSegments", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.EnableDefaultGroupHeaders", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.InterchangeControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.RolloverInterchangeControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.GroupControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.RolloverGroupControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.OverwriteExistingTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.TransactionSetControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.RolloverTransactionSetControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.EnvelopeSettings.IsTestInterchange", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedTechnicalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.BatchTechnicalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedFunctionalAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.BatchFunctionalAcknowledgements", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.NeedLoopForValidMessages", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.SendSynchronousAcknowledgement", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberLowerBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.AcknowledgementControlNumberUpperBound", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.AcknowledgementSettings.RolloverAcknowledgementControlNumber", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.MessageFilter", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ProcessingSettings", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ProcessingSettings.MaskSecurityInfo", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ProcessingSettings.PreserveInterchange", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ProcessingSettings.SuspendInterchangeOnError", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ProcessingSettings.CreateEmptyXMLTagsForTrailingSeparators", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.ProcessingSettings.UseDotAsDecimalSeparator", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "agreement.IntegrationAccountAgreementProperties.Content.Edifact.SendAgreement.ProtocolSettings.SchemaReferences", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountAgreementsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, agreementName, agreement) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountAgreementsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, agreement IntegrationAccountAgreement) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agreementName": autorest.Encode("path", agreementName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}", pathParameters), - autorest.WithJSON(agreement), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAgreementsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAgreementsClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccountAgreement, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account agreement. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// agreementName - the integration account agreement name. -func (client IntegrationAccountAgreementsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, agreementName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountAgreementsClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agreementName": autorest.Encode("path", agreementName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAgreementsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAgreementsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account agreement. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// agreementName - the integration account agreement name. -func (client IntegrationAccountAgreementsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result IntegrationAccountAgreement, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, agreementName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountAgreementsClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agreementName": autorest.Encode("path", agreementName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAgreementsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAgreementsClient) GetResponder(resp *http.Response) (result IntegrationAccountAgreement, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of integration account agreements. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: AgreementType. -func (client IntegrationAccountAgreementsClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountAgreementListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementsClient.List") - defer func() { - sc := -1 - if result.iaalr.Response.Response != nil { - sc = result.iaalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iaalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "List", resp, "Failure sending request") - return - } - - result.iaalr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "List", resp, "Failure responding to request") - return - } - if result.iaalr.hasNextLink() && result.iaalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountAgreementsClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAgreementsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAgreementsClient) ListResponder(resp *http.Response) (result IntegrationAccountAgreementListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationAccountAgreementsClient) listNextResults(ctx context.Context, lastResults IntegrationAccountAgreementListResult) (result IntegrationAccountAgreementListResult, err error) { - req, err := lastResults.integrationAccountAgreementListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountAgreementsClient) ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountAgreementListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, integrationAccountName, top, filter) - return -} - -// ListContentCallbackURL get the content callback url. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// agreementName - the integration account agreement name. -func (client IntegrationAccountAgreementsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementsClient.ListContentCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, agreementName, listContentCallbackURL) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "ListContentCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListContentCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "ListContentCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListContentCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAgreementsClient", "ListContentCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request. -func (client IntegrationAccountAgreementsClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "agreementName": autorest.Encode("path", agreementName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl", pathParameters), - autorest.WithJSON(listContentCallbackURL), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAgreementsClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAgreementsClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go deleted file mode 100644 index 783ff1fd02a1..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go +++ /dev/null @@ -1,430 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountAssembliesClient is the REST API for Azure Logic Apps. -type IntegrationAccountAssembliesClient struct { - BaseClient -} - -// NewIntegrationAccountAssembliesClient creates an instance of the IntegrationAccountAssembliesClient client. -func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAccountAssembliesClient { - return NewIntegrationAccountAssembliesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountAssembliesClientWithBaseURI creates an instance of the IntegrationAccountAssembliesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient { - return IntegrationAccountAssembliesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update an assembly for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// assemblyArtifactName - the assembly artifact name. -// assemblyArtifact - the assembly artifact. -func (client IntegrationAccountAssembliesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact AssemblyDefinition) (result AssemblyDefinition, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: assemblyArtifact, - Constraints: []validation.Constraint{{Target: "assemblyArtifact.Properties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "assemblyArtifact.Properties.AssemblyName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountAssembliesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact AssemblyDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", pathParameters), - autorest.WithJSON(assemblyArtifact), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAssembliesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAssembliesClient) CreateOrUpdateResponder(resp *http.Response) (result AssemblyDefinition, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete an assembly for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// assemblyArtifactName - the assembly artifact name. -func (client IntegrationAccountAssembliesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountAssembliesClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAssembliesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAssembliesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get get an assembly for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// assemblyArtifactName - the assembly artifact name. -func (client IntegrationAccountAssembliesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result AssemblyDefinition, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountAssembliesClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAssembliesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAssembliesClient) GetResponder(resp *http.Response) (result AssemblyDefinition, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list the assemblies for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -func (client IntegrationAccountAssembliesClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result AssemblyCollection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountAssembliesClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAssembliesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAssembliesClient) ListResponder(resp *http.Response) (result AssemblyCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListContentCallbackURL get the content callback url for an integration account assembly. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// assemblyArtifactName - the assembly artifact name. -func (client IntegrationAccountAssembliesClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.ListContentCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListContentCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListContentCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request. -func (client IntegrationAccountAssembliesClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "assemblyArtifactName": autorest.Encode("path", assemblyArtifactName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountAssembliesClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always -// closes the http.Response Body. -func (client IntegrationAccountAssembliesClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go deleted file mode 100644 index 6ab6598dc7e9..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go +++ /dev/null @@ -1,355 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountBatchConfigurationsClient is the REST API for Azure Logic Apps. -type IntegrationAccountBatchConfigurationsClient struct { - BaseClient -} - -// NewIntegrationAccountBatchConfigurationsClient creates an instance of the -// IntegrationAccountBatchConfigurationsClient client. -func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) IntegrationAccountBatchConfigurationsClient { - return NewIntegrationAccountBatchConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountBatchConfigurationsClientWithBaseURI creates an instance of the -// IntegrationAccountBatchConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient { - return IntegrationAccountBatchConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update a batch configuration for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// batchConfigurationName - the batch configuration name. -// batchConfiguration - the batch configuration. -func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration BatchConfiguration) (result BatchConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: batchConfiguration, - Constraints: []validation.Constraint{{Target: "batchConfiguration.Properties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "batchConfiguration.Properties.BatchGroupName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "batchConfiguration.Properties.ReleaseCriteria", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration BatchConfiguration) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "batchConfigurationName": autorest.Encode("path", batchConfigurationName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", pathParameters), - autorest.WithJSON(batchConfiguration), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result BatchConfiguration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete delete a batch configuration for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// batchConfigurationName - the batch configuration name. -func (client IntegrationAccountBatchConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountBatchConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "batchConfigurationName": autorest.Encode("path", batchConfigurationName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountBatchConfigurationsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountBatchConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get get a batch configuration for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// batchConfigurationName - the batch configuration name. -func (client IntegrationAccountBatchConfigurationsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result BatchConfiguration, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountBatchConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "batchConfigurationName": autorest.Encode("path", batchConfigurationName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountBatchConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountBatchConfigurationsClient) GetResponder(resp *http.Response) (result BatchConfiguration, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list the batch configurations for an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -func (client IntegrationAccountBatchConfigurationsClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result BatchConfigurationCollection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountBatchConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountBatchConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountBatchConfigurationsClient) ListResponder(resp *http.Response) (result BatchConfigurationCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go deleted file mode 100644 index de2e161d39ef..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go +++ /dev/null @@ -1,402 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountCertificatesClient is the REST API for Azure Logic Apps. -type IntegrationAccountCertificatesClient struct { - BaseClient -} - -// NewIntegrationAccountCertificatesClient creates an instance of the IntegrationAccountCertificatesClient client. -func NewIntegrationAccountCertificatesClient(subscriptionID string) IntegrationAccountCertificatesClient { - return NewIntegrationAccountCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountCertificatesClientWithBaseURI creates an instance of the IntegrationAccountCertificatesClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewIntegrationAccountCertificatesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountCertificatesClient { - return IntegrationAccountCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account certificate. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// certificateName - the integration account certificate name. -// certificate - the integration account certificate. -func (client IntegrationAccountCertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, certificate IntegrationAccountCertificate) (result IntegrationAccountCertificate, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificatesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: certificate, - Constraints: []validation.Constraint{{Target: "certificate.IntegrationAccountCertificateProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "certificate.IntegrationAccountCertificateProperties.Key", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "certificate.IntegrationAccountCertificateProperties.Key.KeyVault", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "certificate.IntegrationAccountCertificateProperties.Key.KeyName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountCertificatesClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, certificateName, certificate) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountCertificatesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, certificate IntegrationAccountCertificate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "certificateName": autorest.Encode("path", certificateName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}", pathParameters), - autorest.WithJSON(certificate), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountCertificatesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountCertificatesClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccountCertificate, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account certificate. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// certificateName - the integration account certificate name. -func (client IntegrationAccountCertificatesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificatesClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, certificateName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountCertificatesClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "certificateName": autorest.Encode("path", certificateName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountCertificatesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountCertificatesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account certificate. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// certificateName - the integration account certificate name. -func (client IntegrationAccountCertificatesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result IntegrationAccountCertificate, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificatesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, certificateName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountCertificatesClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "certificateName": autorest.Encode("path", certificateName), - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountCertificatesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountCertificatesClient) GetResponder(resp *http.Response) (result IntegrationAccountCertificate, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of integration account certificates. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// top - the number of items to be included in the result. -func (client IntegrationAccountCertificatesClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result IntegrationAccountCertificateListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificatesClient.List") - defer func() { - sc := -1 - if result.iaclr.Response.Response != nil { - sc = result.iaclr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName, top) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iaclr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "List", resp, "Failure sending request") - return - } - - result.iaclr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "List", resp, "Failure responding to request") - return - } - if result.iaclr.hasNextLink() && result.iaclr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountCertificatesClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountCertificatesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountCertificatesClient) ListResponder(resp *http.Response) (result IntegrationAccountCertificateListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationAccountCertificatesClient) listNextResults(ctx context.Context, lastResults IntegrationAccountCertificateListResult) (result IntegrationAccountCertificateListResult, err error) { - req, err := lastResults.integrationAccountCertificateListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountCertificatesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountCertificatesClient) ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result IntegrationAccountCertificateListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificatesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, integrationAccountName, top) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go deleted file mode 100644 index 745646819c16..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go +++ /dev/null @@ -1,481 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountMapsClient is the REST API for Azure Logic Apps. -type IntegrationAccountMapsClient struct { - BaseClient -} - -// NewIntegrationAccountMapsClient creates an instance of the IntegrationAccountMapsClient client. -func NewIntegrationAccountMapsClient(subscriptionID string) IntegrationAccountMapsClient { - return NewIntegrationAccountMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewIntegrationAccountMapsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountMapsClient { - return IntegrationAccountMapsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account map. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// mapName - the integration account map name. -// mapParameter - the integration account map. -func (client IntegrationAccountMapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, mapParameter IntegrationAccountMap) (result IntegrationAccountMap, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: mapParameter, - Constraints: []validation.Constraint{{Target: "mapParameter.IntegrationAccountMapProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountMapsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, mapName, mapParameter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountMapsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, mapParameter IntegrationAccountMap) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "mapName": autorest.Encode("path", mapName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", pathParameters), - autorest.WithJSON(mapParameter), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountMapsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountMapsClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccountMap, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account map. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// mapName - the integration account map name. -func (client IntegrationAccountMapsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, mapName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountMapsClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "mapName": autorest.Encode("path", mapName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountMapsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountMapsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account map. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// mapName - the integration account map name. -func (client IntegrationAccountMapsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result IntegrationAccountMap, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, mapName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountMapsClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "mapName": autorest.Encode("path", mapName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountMapsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountMapsClient) GetResponder(resp *http.Response) (result IntegrationAccountMap, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of integration account maps. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: MapType. -func (client IntegrationAccountMapsClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountMapListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapsClient.List") - defer func() { - sc := -1 - if result.iamlr.Response.Response != nil { - sc = result.iamlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iamlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "List", resp, "Failure sending request") - return - } - - result.iamlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "List", resp, "Failure responding to request") - return - } - if result.iamlr.hasNextLink() && result.iamlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountMapsClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountMapsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountMapsClient) ListResponder(resp *http.Response) (result IntegrationAccountMapListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationAccountMapsClient) listNextResults(ctx context.Context, lastResults IntegrationAccountMapListResult) (result IntegrationAccountMapListResult, err error) { - req, err := lastResults.integrationAccountMapListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountMapsClient) ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountMapListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, integrationAccountName, top, filter) - return -} - -// ListContentCallbackURL get the content callback url. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// mapName - the integration account map name. -func (client IntegrationAccountMapsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapsClient.ListContentCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, mapName, listContentCallbackURL) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "ListContentCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListContentCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "ListContentCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListContentCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountMapsClient", "ListContentCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request. -func (client IntegrationAccountMapsClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "mapName": autorest.Encode("path", mapName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl", pathParameters), - autorest.WithJSON(listContentCallbackURL), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountMapsClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always -// closes the http.Response Body. -func (client IntegrationAccountMapsClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go deleted file mode 100644 index 9678635db874..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go +++ /dev/null @@ -1,482 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountPartnersClient is the REST API for Azure Logic Apps. -type IntegrationAccountPartnersClient struct { - BaseClient -} - -// NewIntegrationAccountPartnersClient creates an instance of the IntegrationAccountPartnersClient client. -func NewIntegrationAccountPartnersClient(subscriptionID string) IntegrationAccountPartnersClient { - return NewIntegrationAccountPartnersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewIntegrationAccountPartnersClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountPartnersClient { - return IntegrationAccountPartnersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account partner. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// partnerName - the integration account partner name. -// partner - the integration account partner. -func (client IntegrationAccountPartnersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, partner IntegrationAccountPartner) (result IntegrationAccountPartner, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnersClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: partner, - Constraints: []validation.Constraint{{Target: "partner.IntegrationAccountPartnerProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "partner.IntegrationAccountPartnerProperties.Content", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountPartnersClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, partnerName, partner) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountPartnersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, partner IntegrationAccountPartner) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "partnerName": autorest.Encode("path", partnerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}", pathParameters), - autorest.WithJSON(partner), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountPartnersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountPartnersClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccountPartner, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account partner. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// partnerName - the integration account partner name. -func (client IntegrationAccountPartnersClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnersClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, partnerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountPartnersClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "partnerName": autorest.Encode("path", partnerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountPartnersClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountPartnersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account partner. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// partnerName - the integration account partner name. -func (client IntegrationAccountPartnersClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result IntegrationAccountPartner, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnersClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, partnerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountPartnersClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "partnerName": autorest.Encode("path", partnerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountPartnersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountPartnersClient) GetResponder(resp *http.Response) (result IntegrationAccountPartner, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of integration account partners. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: PartnerType. -func (client IntegrationAccountPartnersClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountPartnerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnersClient.List") - defer func() { - sc := -1 - if result.iaplr.Response.Response != nil { - sc = result.iaplr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "List", resp, "Failure sending request") - return - } - - result.iaplr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "List", resp, "Failure responding to request") - return - } - if result.iaplr.hasNextLink() && result.iaplr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountPartnersClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountPartnersClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountPartnersClient) ListResponder(resp *http.Response) (result IntegrationAccountPartnerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationAccountPartnersClient) listNextResults(ctx context.Context, lastResults IntegrationAccountPartnerListResult) (result IntegrationAccountPartnerListResult, err error) { - req, err := lastResults.integrationAccountPartnerListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountPartnersClient) ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountPartnerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnersClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, integrationAccountName, top, filter) - return -} - -// ListContentCallbackURL get the content callback url. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// partnerName - the integration account partner name. -func (client IntegrationAccountPartnersClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnersClient.ListContentCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, partnerName, listContentCallbackURL) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "ListContentCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListContentCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "ListContentCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListContentCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountPartnersClient", "ListContentCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request. -func (client IntegrationAccountPartnersClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "partnerName": autorest.Encode("path", partnerName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl", pathParameters), - autorest.WithJSON(listContentCallbackURL), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountPartnersClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always -// closes the http.Response Body. -func (client IntegrationAccountPartnersClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccounts.go deleted file mode 100644 index 7241b334c45a..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccounts.go +++ /dev/null @@ -1,908 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountsClient is the REST API for Azure Logic Apps. -type IntegrationAccountsClient struct { - BaseClient -} - -// NewIntegrationAccountsClient creates an instance of the IntegrationAccountsClient client. -func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClient { - return NewIntegrationAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountsClient { - return IntegrationAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// integrationAccount - the integration account. -func (client IntegrationAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (result IntegrationAccount, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, integrationAccount) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", pathParameters), - autorest.WithJSON(integrationAccount), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccount, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -func (client IntegrationAccountsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountsClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -func (client IntegrationAccountsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result IntegrationAccount, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountsClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) GetResponder(resp *http.Response) (result IntegrationAccount, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup gets a list of integration accounts by resource group. -// Parameters: -// resourceGroupName - the resource group name. -// top - the number of items to be included in the result. -func (client IntegrationAccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result IntegrationAccountListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.ialr.Response.Response != nil { - sc = result.ialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.ialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.ialr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.ialr.hasNextLink() && result.ialr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client IntegrationAccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) ListByResourceGroupResponder(resp *http.Response) (result IntegrationAccountListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client IntegrationAccountsClient) listByResourceGroupNextResults(ctx context.Context, lastResults IntegrationAccountListResult) (result IntegrationAccountListResult, err error) { - req, err := lastResults.integrationAccountListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result IntegrationAccountListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, top) - return -} - -// ListBySubscription gets a list of integration accounts by subscription. -// Parameters: -// top - the number of items to be included in the result. -func (client IntegrationAccountsClient) ListBySubscription(ctx context.Context, top *int32) (result IntegrationAccountListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListBySubscription") - defer func() { - sc := -1 - if result.ialr.Response.Response != nil { - sc = result.ialr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx, top) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.ialr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.ialr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.ialr.hasNextLink() && result.ialr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client IntegrationAccountsClient) ListBySubscriptionPreparer(ctx context.Context, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) ListBySubscriptionResponder(resp *http.Response) (result IntegrationAccountListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client IntegrationAccountsClient) listBySubscriptionNextResults(ctx context.Context, lastResults IntegrationAccountListResult) (result IntegrationAccountListResult, err error) { - req, err := lastResults.integrationAccountListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountsClient) ListBySubscriptionComplete(ctx context.Context, top *int32) (result IntegrationAccountListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListBySubscription") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListBySubscription(ctx, top) - return -} - -// ListCallbackURL gets the integration account callback URL. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// parameters - the callback URL parameters. -func (client IntegrationAccountsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters GetCallbackURLParameters) (result CallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListCallbackURLPreparer prepares the ListCallbackURL request. -func (client IntegrationAccountsClient) ListCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCallbackURLSender sends the ListCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) ListCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCallbackURLResponder handles the response to the ListCallbackURL request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) ListCallbackURLResponder(resp *http.Response) (result CallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListKeyVaultKeys gets the integration account's Key Vault keys. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// listKeyVaultKeys - the key vault parameters. -func (client IntegrationAccountsClient) ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys ListKeyVaultKeysDefinition) (result KeyVaultKeyCollection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListKeyVaultKeys") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: listKeyVaultKeys, - Constraints: []validation.Constraint{{Target: "listKeyVaultKeys.KeyVault", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountsClient", "ListKeyVaultKeys", err.Error()) - } - - req, err := client.ListKeyVaultKeysPreparer(ctx, resourceGroupName, integrationAccountName, listKeyVaultKeys) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListKeyVaultKeys", nil, "Failure preparing request") - return - } - - resp, err := client.ListKeyVaultKeysSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListKeyVaultKeys", resp, "Failure sending request") - return - } - - result, err = client.ListKeyVaultKeysResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "ListKeyVaultKeys", resp, "Failure responding to request") - return - } - - return -} - -// ListKeyVaultKeysPreparer prepares the ListKeyVaultKeys request. -func (client IntegrationAccountsClient) ListKeyVaultKeysPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys ListKeyVaultKeysDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys", pathParameters), - autorest.WithJSON(listKeyVaultKeys), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListKeyVaultKeysSender sends the ListKeyVaultKeys request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) ListKeyVaultKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListKeyVaultKeysResponder handles the response to the ListKeyVaultKeys request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) ListKeyVaultKeysResponder(resp *http.Response) (result KeyVaultKeyCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// LogTrackingEvents logs the integration account's tracking events. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// logTrackingEvents - the callback URL parameters. -func (client IntegrationAccountsClient) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents TrackingEventsDefinition) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.LogTrackingEvents") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: logTrackingEvents, - Constraints: []validation.Constraint{{Target: "logTrackingEvents.SourceType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "logTrackingEvents.Events", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountsClient", "LogTrackingEvents", err.Error()) - } - - req, err := client.LogTrackingEventsPreparer(ctx, resourceGroupName, integrationAccountName, logTrackingEvents) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "LogTrackingEvents", nil, "Failure preparing request") - return - } - - resp, err := client.LogTrackingEventsSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "LogTrackingEvents", resp, "Failure sending request") - return - } - - result, err = client.LogTrackingEventsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "LogTrackingEvents", resp, "Failure responding to request") - return - } - - return -} - -// LogTrackingEventsPreparer prepares the LogTrackingEvents request. -func (client IntegrationAccountsClient) LogTrackingEventsPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents TrackingEventsDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents", pathParameters), - autorest.WithJSON(logTrackingEvents), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// LogTrackingEventsSender sends the LogTrackingEvents request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) LogTrackingEventsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// LogTrackingEventsResponder handles the response to the LogTrackingEvents request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) LogTrackingEventsResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// RegenerateAccessKey regenerates the integration account access key. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// regenerateAccessKey - the access key type. -func (client IntegrationAccountsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey RegenerateActionParameter) (result IntegrationAccount, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.RegenerateAccessKey") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RegenerateAccessKeyPreparer(ctx, resourceGroupName, integrationAccountName, regenerateAccessKey) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", nil, "Failure preparing request") - return - } - - resp, err := client.RegenerateAccessKeySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", resp, "Failure sending request") - return - } - - result, err = client.RegenerateAccessKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", resp, "Failure responding to request") - return - } - - return -} - -// RegenerateAccessKeyPreparer prepares the RegenerateAccessKey request. -func (client IntegrationAccountsClient) RegenerateAccessKeyPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey RegenerateActionParameter) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey", pathParameters), - autorest.WithJSON(regenerateAccessKey), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RegenerateAccessKeySender sends the RegenerateAccessKey request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) RegenerateAccessKeySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RegenerateAccessKeyResponder handles the response to the RegenerateAccessKey request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) RegenerateAccessKeyResponder(resp *http.Response) (result IntegrationAccount, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates an integration account. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// integrationAccount - the integration account. -func (client IntegrationAccountsClient) Update(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (result IntegrationAccount, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, integrationAccountName, integrationAccount) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client IntegrationAccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", pathParameters), - autorest.WithJSON(integrationAccount), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client IntegrationAccountsClient) UpdateResponder(resp *http.Response) (result IntegrationAccount, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go deleted file mode 100644 index 936968a1f430..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go +++ /dev/null @@ -1,481 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountSchemasClient is the REST API for Azure Logic Apps. -type IntegrationAccountSchemasClient struct { - BaseClient -} - -// NewIntegrationAccountSchemasClient creates an instance of the IntegrationAccountSchemasClient client. -func NewIntegrationAccountSchemasClient(subscriptionID string) IntegrationAccountSchemasClient { - return NewIntegrationAccountSchemasClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewIntegrationAccountSchemasClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSchemasClient { - return IntegrationAccountSchemasClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account schema. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// schemaName - the integration account schema name. -// schema - the integration account schema. -func (client IntegrationAccountSchemasClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, schema IntegrationAccountSchema) (result IntegrationAccountSchema, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemasClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: schema, - Constraints: []validation.Constraint{{Target: "schema.IntegrationAccountSchemaProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountSchemasClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, schemaName, schema) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountSchemasClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, schema IntegrationAccountSchema) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}", pathParameters), - autorest.WithJSON(schema), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSchemasClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSchemasClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccountSchema, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account schema. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// schemaName - the integration account schema name. -func (client IntegrationAccountSchemasClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemasClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, schemaName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountSchemasClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSchemasClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSchemasClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account schema. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// schemaName - the integration account schema name. -func (client IntegrationAccountSchemasClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result IntegrationAccountSchema, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemasClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, schemaName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountSchemasClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSchemasClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSchemasClient) GetResponder(resp *http.Response) (result IntegrationAccountSchema, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of integration account schemas. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: SchemaType. -func (client IntegrationAccountSchemasClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSchemaListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemasClient.List") - defer func() { - sc := -1 - if result.iaslr.Response.Response != nil { - sc = result.iaslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iaslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "List", resp, "Failure sending request") - return - } - - result.iaslr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "List", resp, "Failure responding to request") - return - } - if result.iaslr.hasNextLink() && result.iaslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountSchemasClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSchemasClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSchemasClient) ListResponder(resp *http.Response) (result IntegrationAccountSchemaListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationAccountSchemasClient) listNextResults(ctx context.Context, lastResults IntegrationAccountSchemaListResult) (result IntegrationAccountSchemaListResult, err error) { - req, err := lastResults.integrationAccountSchemaListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountSchemasClient) ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSchemaListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemasClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, integrationAccountName, top, filter) - return -} - -// ListContentCallbackURL get the content callback url. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// schemaName - the integration account schema name. -func (client IntegrationAccountSchemasClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemasClient.ListContentCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, schemaName, listContentCallbackURL) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "ListContentCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListContentCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "ListContentCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListContentCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSchemasClient", "ListContentCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListContentCallbackURLPreparer prepares the ListContentCallbackURL request. -func (client IntegrationAccountSchemasClient) ListContentCallbackURLPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "schemaName": autorest.Encode("path", schemaName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl", pathParameters), - autorest.WithJSON(listContentCallbackURL), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListContentCallbackURLSender sends the ListContentCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSchemasClient) ListContentCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListContentCallbackURLResponder handles the response to the ListContentCallbackURL request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSchemasClient) ListContentCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go deleted file mode 100644 index ec89be01c744..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go +++ /dev/null @@ -1,401 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationAccountSessionsClient is the REST API for Azure Logic Apps. -type IntegrationAccountSessionsClient struct { - BaseClient -} - -// NewIntegrationAccountSessionsClient creates an instance of the IntegrationAccountSessionsClient client. -func NewIntegrationAccountSessionsClient(subscriptionID string) IntegrationAccountSessionsClient { - return NewIntegrationAccountSessionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationAccountSessionsClientWithBaseURI creates an instance of the IntegrationAccountSessionsClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewIntegrationAccountSessionsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSessionsClient { - return IntegrationAccountSessionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration account session. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// sessionName - the integration account session name. -// session - the integration account session. -func (client IntegrationAccountSessionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, session IntegrationAccountSession) (result IntegrationAccountSession, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: session, - Constraints: []validation.Constraint{{Target: "session.IntegrationAccountSessionProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("logic.IntegrationAccountSessionsClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, sessionName, session) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationAccountSessionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, session IntegrationAccountSession) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sessionName": autorest.Encode("path", sessionName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}", pathParameters), - autorest.WithJSON(session), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSessionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSessionsClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationAccountSession, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration account session. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// sessionName - the integration account session name. -func (client IntegrationAccountSessionsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, sessionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationAccountSessionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sessionName": autorest.Encode("path", sessionName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSessionsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSessionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration account session. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// sessionName - the integration account session name. -func (client IntegrationAccountSessionsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result IntegrationAccountSession, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, sessionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationAccountSessionsClient) GetPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "sessionName": autorest.Encode("path", sessionName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSessionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSessionsClient) GetResponder(resp *http.Response) (result IntegrationAccountSession, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of integration account sessions. -// Parameters: -// resourceGroupName - the resource group name. -// integrationAccountName - the integration account name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: ChangedTime. -func (client IntegrationAccountSessionsClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSessionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionsClient.List") - defer func() { - sc := -1 - if result.iaslr.Response.Response != nil { - sc = result.iaslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.iaslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "List", resp, "Failure sending request") - return - } - - result.iaslr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "List", resp, "Failure responding to request") - return - } - if result.iaslr.hasNextLink() && result.iaslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationAccountSessionsClient) ListPreparer(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationAccountName": autorest.Encode("path", integrationAccountName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationAccountSessionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationAccountSessionsClient) ListResponder(resp *http.Response) (result IntegrationAccountSessionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationAccountSessionsClient) listNextResults(ctx context.Context, lastResults IntegrationAccountSessionListResult) (result IntegrationAccountSessionListResult, err error) { - req, err := lastResults.integrationAccountSessionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationAccountSessionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationAccountSessionsClient) ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSessionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, integrationAccountName, top, filter) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go deleted file mode 100644 index 89be8f7d99b0..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go +++ /dev/null @@ -1,153 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationServiceEnvironmentManagedAPIOperationsClient is the REST API for Azure Logic Apps. -type IntegrationServiceEnvironmentManagedAPIOperationsClient struct { - BaseClient -} - -// NewIntegrationServiceEnvironmentManagedAPIOperationsClient creates an instance of the -// IntegrationServiceEnvironmentManagedAPIOperationsClient client. -func NewIntegrationServiceEnvironmentManagedAPIOperationsClient(subscriptionID string) IntegrationServiceEnvironmentManagedAPIOperationsClient { - return NewIntegrationServiceEnvironmentManagedAPIOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationServiceEnvironmentManagedAPIOperationsClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentManagedAPIOperationsClient client using a custom endpoint. Use this when interacting -// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIntegrationServiceEnvironmentManagedAPIOperationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentManagedAPIOperationsClient { - return IntegrationServiceEnvironmentManagedAPIOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets the managed Api operations. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -// APIName - the api name. -func (client IntegrationServiceEnvironmentManagedAPIOperationsClient) List(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result APIOperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedAPIOperationsClient.List") - defer func() { - sc := -1 - if result.aolr.Response.Response != nil { - sc = result.aolr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroup, integrationServiceEnvironmentName, APIName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedAPIOperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.aolr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedAPIOperationsClient", "List", resp, "Failure sending request") - return - } - - result.aolr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedAPIOperationsClient", "List", resp, "Failure responding to request") - return - } - if result.aolr.hasNextLink() && result.aolr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationServiceEnvironmentManagedAPIOperationsClient) ListPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiName": autorest.Encode("path", APIName), - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentManagedAPIOperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentManagedAPIOperationsClient) ListResponder(resp *http.Response) (result APIOperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationServiceEnvironmentManagedAPIOperationsClient) listNextResults(ctx context.Context, lastResults APIOperationListResult) (result APIOperationListResult, err error) { - req, err := lastResults.aPIOperationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedAPIOperationsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedAPIOperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedAPIOperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationServiceEnvironmentManagedAPIOperationsClient) ListComplete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result APIOperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedAPIOperationsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroup, integrationServiceEnvironmentName, APIName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go deleted file mode 100644 index c884341f5d8a..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go +++ /dev/null @@ -1,393 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationServiceEnvironmentManagedApisClient is the REST API for Azure Logic Apps. -type IntegrationServiceEnvironmentManagedApisClient struct { - BaseClient -} - -// NewIntegrationServiceEnvironmentManagedApisClient creates an instance of the -// IntegrationServiceEnvironmentManagedApisClient client. -func NewIntegrationServiceEnvironmentManagedApisClient(subscriptionID string) IntegrationServiceEnvironmentManagedApisClient { - return NewIntegrationServiceEnvironmentManagedApisClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationServiceEnvironmentManagedApisClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentManagedApisClient client using a custom endpoint. Use this when interacting with an -// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIntegrationServiceEnvironmentManagedApisClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentManagedApisClient { - return IntegrationServiceEnvironmentManagedApisClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Delete deletes the integration service environment managed Api. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -// APIName - the api name. -func (client IntegrationServiceEnvironmentManagedApisClient) Delete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result IntegrationServiceEnvironmentManagedApisDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedApisClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroup, integrationServiceEnvironmentName, APIName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationServiceEnvironmentManagedApisClient) DeletePreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiName": autorest.Encode("path", APIName), - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentManagedApisClient) DeleteSender(req *http.Request) (future IntegrationServiceEnvironmentManagedApisDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentManagedApisClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets the integration service environment managed Api. -// Parameters: -// resourceGroup - the resource group name. -// integrationServiceEnvironmentName - the integration service environment name. -// APIName - the api name. -func (client IntegrationServiceEnvironmentManagedApisClient) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result IntegrationServiceEnvironmentManagedAPI, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedApisClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroup, integrationServiceEnvironmentName, APIName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationServiceEnvironmentManagedApisClient) GetPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiName": autorest.Encode("path", APIName), - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentManagedApisClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentManagedApisClient) GetResponder(resp *http.Response) (result IntegrationServiceEnvironmentManagedAPI, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets the integration service environment managed Apis. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -func (client IntegrationServiceEnvironmentManagedApisClient) List(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result IntegrationServiceEnvironmentManagedAPIListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedApisClient.List") - defer func() { - sc := -1 - if result.isemalr.Response.Response != nil { - sc = result.isemalr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroup, integrationServiceEnvironmentName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.isemalr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "List", resp, "Failure sending request") - return - } - - result.isemalr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "List", resp, "Failure responding to request") - return - } - if result.isemalr.hasNextLink() && result.isemalr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationServiceEnvironmentManagedApisClient) ListPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentManagedApisClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentManagedApisClient) ListResponder(resp *http.Response) (result IntegrationServiceEnvironmentManagedAPIListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationServiceEnvironmentManagedApisClient) listNextResults(ctx context.Context, lastResults IntegrationServiceEnvironmentManagedAPIListResult) (result IntegrationServiceEnvironmentManagedAPIListResult, err error) { - req, err := lastResults.integrationServiceEnvironmentManagedAPIListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationServiceEnvironmentManagedApisClient) ListComplete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result IntegrationServiceEnvironmentManagedAPIListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedApisClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroup, integrationServiceEnvironmentName) - return -} - -// Put puts the integration service environment managed Api. -// Parameters: -// resourceGroup - the resource group name. -// integrationServiceEnvironmentName - the integration service environment name. -// APIName - the api name. -// integrationServiceEnvironmentManagedAPI - the integration service environment managed api. -func (client IntegrationServiceEnvironmentManagedApisClient) Put(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string, integrationServiceEnvironmentManagedAPI IntegrationServiceEnvironmentManagedAPI) (result IntegrationServiceEnvironmentManagedApisPutFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedApisClient.Put") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.PutPreparer(ctx, resourceGroup, integrationServiceEnvironmentName, APIName, integrationServiceEnvironmentManagedAPI) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Put", nil, "Failure preparing request") - return - } - - result, err = client.PutSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisClient", "Put", result.Response(), "Failure sending request") - return - } - - return -} - -// PutPreparer prepares the Put request. -func (client IntegrationServiceEnvironmentManagedApisClient) PutPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string, integrationServiceEnvironmentManagedAPI IntegrationServiceEnvironmentManagedAPI) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiName": autorest.Encode("path", APIName), - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}", pathParameters), - autorest.WithJSON(integrationServiceEnvironmentManagedAPI), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// PutSender sends the Put request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentManagedApisClient) PutSender(req *http.Request) (future IntegrationServiceEnvironmentManagedApisPutFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// PutResponder handles the response to the Put request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentManagedApisClient) PutResponder(resp *http.Response) (result IntegrationServiceEnvironmentManagedAPI, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go deleted file mode 100644 index 8873a8fb7728..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go +++ /dev/null @@ -1,109 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationServiceEnvironmentNetworkHealthClient is the REST API for Azure Logic Apps. -type IntegrationServiceEnvironmentNetworkHealthClient struct { - BaseClient -} - -// NewIntegrationServiceEnvironmentNetworkHealthClient creates an instance of the -// IntegrationServiceEnvironmentNetworkHealthClient client. -func NewIntegrationServiceEnvironmentNetworkHealthClient(subscriptionID string) IntegrationServiceEnvironmentNetworkHealthClient { - return NewIntegrationServiceEnvironmentNetworkHealthClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationServiceEnvironmentNetworkHealthClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentNetworkHealthClient client using a custom endpoint. Use this when interacting with an -// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIntegrationServiceEnvironmentNetworkHealthClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentNetworkHealthClient { - return IntegrationServiceEnvironmentNetworkHealthClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets the integration service environment network health. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -func (client IntegrationServiceEnvironmentNetworkHealthClient) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result SetIntegrationServiceEnvironmentSubnetNetworkHealth, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentNetworkHealthClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroup, integrationServiceEnvironmentName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentNetworkHealthClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentNetworkHealthClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentNetworkHealthClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationServiceEnvironmentNetworkHealthClient) GetPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentNetworkHealthClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentNetworkHealthClient) GetResponder(resp *http.Response) (result SetIntegrationServiceEnvironmentSubnetNetworkHealth, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go deleted file mode 100644 index 80172c8e3aed..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go +++ /dev/null @@ -1,660 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationServiceEnvironmentsClient is the REST API for Azure Logic Apps. -type IntegrationServiceEnvironmentsClient struct { - BaseClient -} - -// NewIntegrationServiceEnvironmentsClient creates an instance of the IntegrationServiceEnvironmentsClient client. -func NewIntegrationServiceEnvironmentsClient(subscriptionID string) IntegrationServiceEnvironmentsClient { - return NewIntegrationServiceEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationServiceEnvironmentsClientWithBaseURI creates an instance of the IntegrationServiceEnvironmentsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewIntegrationServiceEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentsClient { - return IntegrationServiceEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates an integration service environment. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -// integrationServiceEnvironment - the integration service environment. -func (client IntegrationServiceEnvironmentsClient) CreateOrUpdate(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment IntegrationServiceEnvironment) (result IntegrationServiceEnvironmentsCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroup, integrationServiceEnvironmentName, integrationServiceEnvironment) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client IntegrationServiceEnvironmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment IntegrationServiceEnvironment) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}", pathParameters), - autorest.WithJSON(integrationServiceEnvironment), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future IntegrationServiceEnvironmentsCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationServiceEnvironment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes an integration service environment. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -func (client IntegrationServiceEnvironmentsClient) Delete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroup, integrationServiceEnvironmentName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client IntegrationServiceEnvironmentsClient) DeletePreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets an integration service environment. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -func (client IntegrationServiceEnvironmentsClient) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result IntegrationServiceEnvironment, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroup, integrationServiceEnvironmentName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client IntegrationServiceEnvironmentsClient) GetPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) GetResponder(resp *http.Response) (result IntegrationServiceEnvironment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup gets a list of integration service environments by resource group. -// Parameters: -// resourceGroup - the resource group. -// top - the number of items to be included in the result. -func (client IntegrationServiceEnvironmentsClient) ListByResourceGroup(ctx context.Context, resourceGroup string, top *int32) (result IntegrationServiceEnvironmentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.iselr.Response.Response != nil { - sc = result.iselr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroup, top) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.iselr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.iselr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.iselr.hasNextLink() && result.iselr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client IntegrationServiceEnvironmentsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroup string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) ListByResourceGroupResponder(resp *http.Response) (result IntegrationServiceEnvironmentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client IntegrationServiceEnvironmentsClient) listByResourceGroupNextResults(ctx context.Context, lastResults IntegrationServiceEnvironmentListResult) (result IntegrationServiceEnvironmentListResult, err error) { - req, err := lastResults.integrationServiceEnvironmentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationServiceEnvironmentsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroup string, top *int32) (result IntegrationServiceEnvironmentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroup, top) - return -} - -// ListBySubscription gets a list of integration service environments by subscription. -// Parameters: -// top - the number of items to be included in the result. -func (client IntegrationServiceEnvironmentsClient) ListBySubscription(ctx context.Context, top *int32) (result IntegrationServiceEnvironmentListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.ListBySubscription") - defer func() { - sc := -1 - if result.iselr.Response.Response != nil { - sc = result.iselr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx, top) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.iselr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.iselr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.iselr.hasNextLink() && result.iselr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client IntegrationServiceEnvironmentsClient) ListBySubscriptionPreparer(ctx context.Context, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) ListBySubscriptionResponder(resp *http.Response) (result IntegrationServiceEnvironmentListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client IntegrationServiceEnvironmentsClient) listBySubscriptionNextResults(ctx context.Context, lastResults IntegrationServiceEnvironmentListResult) (result IntegrationServiceEnvironmentListResult, err error) { - req, err := lastResults.integrationServiceEnvironmentListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationServiceEnvironmentsClient) ListBySubscriptionComplete(ctx context.Context, top *int32) (result IntegrationServiceEnvironmentListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.ListBySubscription") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListBySubscription(ctx, top) - return -} - -// Restart restarts an integration service environment. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -func (client IntegrationServiceEnvironmentsClient) Restart(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.Restart") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RestartPreparer(ctx, resourceGroup, integrationServiceEnvironmentName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Restart", nil, "Failure preparing request") - return - } - - resp, err := client.RestartSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Restart", resp, "Failure sending request") - return - } - - result, err = client.RestartResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Restart", resp, "Failure responding to request") - return - } - - return -} - -// RestartPreparer prepares the Restart request. -func (client IntegrationServiceEnvironmentsClient) RestartPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RestartSender sends the Restart request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) RestartSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RestartResponder handles the response to the Restart request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates an integration service environment. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -// integrationServiceEnvironment - the integration service environment. -func (client IntegrationServiceEnvironmentsClient) Update(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment IntegrationServiceEnvironment) (result IntegrationServiceEnvironmentsUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentsClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroup, integrationServiceEnvironmentName, integrationServiceEnvironment) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client IntegrationServiceEnvironmentsClient) UpdatePreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment IntegrationServiceEnvironment) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}", pathParameters), - autorest.WithJSON(integrationServiceEnvironment), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentsClient) UpdateSender(req *http.Request) (future IntegrationServiceEnvironmentsUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentsClient) UpdateResponder(resp *http.Response) (result IntegrationServiceEnvironment, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go deleted file mode 100644 index 54bf4bee4777..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go +++ /dev/null @@ -1,151 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// IntegrationServiceEnvironmentSkusClient is the REST API for Azure Logic Apps. -type IntegrationServiceEnvironmentSkusClient struct { - BaseClient -} - -// NewIntegrationServiceEnvironmentSkusClient creates an instance of the IntegrationServiceEnvironmentSkusClient -// client. -func NewIntegrationServiceEnvironmentSkusClient(subscriptionID string) IntegrationServiceEnvironmentSkusClient { - return NewIntegrationServiceEnvironmentSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewIntegrationServiceEnvironmentSkusClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentSkusClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewIntegrationServiceEnvironmentSkusClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentSkusClient { - return IntegrationServiceEnvironmentSkusClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets a list of integration service environment Skus. -// Parameters: -// resourceGroup - the resource group. -// integrationServiceEnvironmentName - the integration service environment name. -func (client IntegrationServiceEnvironmentSkusClient) List(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result IntegrationServiceEnvironmentSkuListPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentSkusClient.List") - defer func() { - sc := -1 - if result.isesl.Response.Response != nil { - sc = result.isesl.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroup, integrationServiceEnvironmentName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentSkusClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.isesl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentSkusClient", "List", resp, "Failure sending request") - return - } - - result.isesl, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentSkusClient", "List", resp, "Failure responding to request") - return - } - if result.isesl.hasNextLink() && result.isesl.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client IntegrationServiceEnvironmentSkusClient) ListPreparer(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "integrationServiceEnvironmentName": autorest.Encode("path", integrationServiceEnvironmentName), - "resourceGroup": autorest.Encode("path", resourceGroup), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client IntegrationServiceEnvironmentSkusClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client IntegrationServiceEnvironmentSkusClient) ListResponder(resp *http.Response) (result IntegrationServiceEnvironmentSkuList, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client IntegrationServiceEnvironmentSkusClient) listNextResults(ctx context.Context, lastResults IntegrationServiceEnvironmentSkuList) (result IntegrationServiceEnvironmentSkuList, err error) { - req, err := lastResults.integrationServiceEnvironmentSkuListPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentSkusClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentSkusClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentSkusClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client IntegrationServiceEnvironmentSkusClient) ListComplete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result IntegrationServiceEnvironmentSkuListIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentSkusClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroup, integrationServiceEnvironmentName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/models.go deleted file mode 100644 index 63d8a1af4974..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/models.go +++ /dev/null @@ -1,8078 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "github.com/gofrs/uuid" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic" - -// AgreementContent the integration account agreement content. -type AgreementContent struct { - // AS2 - The AS2 agreement content. - AS2 *AS2AgreementContent `json:"aS2,omitempty"` - // X12 - The X12 agreement content. - X12 *X12AgreementContent `json:"x12,omitempty"` - // Edifact - The EDIFACT agreement content. - Edifact *EdifactAgreementContent `json:"edifact,omitempty"` -} - -// APIDeploymentParameterMetadata the API deployment parameter metadata. -type APIDeploymentParameterMetadata struct { - // Type - The type. - Type *string `json:"type,omitempty"` - // IsRequired - Indicates whether its required. - IsRequired *bool `json:"isRequired,omitempty"` - // DisplayName - The display name. - DisplayName *string `json:"displayName,omitempty"` - // Description - The description. - Description *string `json:"description,omitempty"` - // Visibility - The visibility. Possible values include: 'APIDeploymentParameterVisibilityNotSpecified', 'APIDeploymentParameterVisibilityDefault', 'APIDeploymentParameterVisibilityInternal' - Visibility APIDeploymentParameterVisibility `json:"visibility,omitempty"` -} - -// APIDeploymentParameterMetadataSet the API deployment parameters metadata. -type APIDeploymentParameterMetadataSet struct { - // PackageContentLink - The package content link parameter. - PackageContentLink *APIDeploymentParameterMetadata `json:"packageContentLink,omitempty"` - // RedisCacheConnectionString - The package content link parameter. - RedisCacheConnectionString *APIDeploymentParameterMetadata `json:"redisCacheConnectionString,omitempty"` -} - -// APIOperation the api operation. -type APIOperation struct { - Properties *APIOperationPropertiesDefinition `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for APIOperation. -func (ao APIOperation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ao.Properties != nil { - objectMap["properties"] = ao.Properties - } - if ao.Location != nil { - objectMap["location"] = ao.Location - } - if ao.Tags != nil { - objectMap["tags"] = ao.Tags - } - return json.Marshal(objectMap) -} - -// APIOperationAnnotation the Api Operation Annotation. -type APIOperationAnnotation struct { - // Status - Possible values include: 'StatusAnnotationNotSpecified', 'StatusAnnotationPreview', 'StatusAnnotationProduction' - Status StatusAnnotation `json:"status,omitempty"` - // Family - The family. - Family *string `json:"family,omitempty"` - // Revision - The revision. - Revision *int32 `json:"revision,omitempty"` -} - -// APIOperationListResult the list of managed API operations. -type APIOperationListResult struct { - autorest.Response `json:"-"` - // Value - The api operation definitions for an API. - Value *[]APIOperation `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// APIOperationListResultIterator provides access to a complete listing of APIOperation values. -type APIOperationListResultIterator struct { - i int - page APIOperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *APIOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *APIOperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter APIOperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter APIOperationListResultIterator) Response() APIOperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter APIOperationListResultIterator) Value() APIOperation { - if !iter.page.NotDone() { - return APIOperation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the APIOperationListResultIterator type. -func NewAPIOperationListResultIterator(page APIOperationListResultPage) APIOperationListResultIterator { - return APIOperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (aolr APIOperationListResult) IsEmpty() bool { - return aolr.Value == nil || len(*aolr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (aolr APIOperationListResult) hasNextLink() bool { - return aolr.NextLink != nil && len(*aolr.NextLink) != 0 -} - -// aPIOperationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (aolr APIOperationListResult) aPIOperationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !aolr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(aolr.NextLink))) -} - -// APIOperationListResultPage contains a page of APIOperation values. -type APIOperationListResultPage struct { - fn func(context.Context, APIOperationListResult) (APIOperationListResult, error) - aolr APIOperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *APIOperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.aolr) - if err != nil { - return err - } - page.aolr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *APIOperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page APIOperationListResultPage) NotDone() bool { - return !page.aolr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page APIOperationListResultPage) Response() APIOperationListResult { - return page.aolr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page APIOperationListResultPage) Values() []APIOperation { - if page.aolr.IsEmpty() { - return nil - } - return *page.aolr.Value -} - -// Creates a new instance of the APIOperationListResultPage type. -func NewAPIOperationListResultPage(cur APIOperationListResult, getNextPage func(context.Context, APIOperationListResult) (APIOperationListResult, error)) APIOperationListResultPage { - return APIOperationListResultPage{ - fn: getNextPage, - aolr: cur, - } -} - -// APIOperationPropertiesDefinition the api operations properties -type APIOperationPropertiesDefinition struct { - // Summary - The summary of the api operation. - Summary *string `json:"summary,omitempty"` - // Description - The description of the api operation. - Description *string `json:"description,omitempty"` - // Visibility - The visibility of the api operation. - Visibility *string `json:"visibility,omitempty"` - // Trigger - The trigger type of api operation. - Trigger *string `json:"trigger,omitempty"` - // TriggerHint - The trigger hint for the api operation. - TriggerHint *string `json:"triggerHint,omitempty"` - // Pageable - Indicates whether the api operation is pageable. - Pageable *bool `json:"pageable,omitempty"` - // Annotation - The annotation of api operation. - Annotation *APIOperationAnnotation `json:"annotation,omitempty"` - // API - The api reference. - API *APIReference `json:"api,omitempty"` - // InputsDefinition - The operation inputs definition schema. - InputsDefinition *SwaggerSchema `json:"inputsDefinition,omitempty"` - // ResponsesDefinition - The operation responses definition schemas. - ResponsesDefinition map[string]*SwaggerSchema `json:"responsesDefinition"` - // IsWebhook - Indicates whether the API operation is webhook or not. - IsWebhook *bool `json:"isWebhook,omitempty"` - // IsNotification - Indicates whether the API operation is notification or not. - IsNotification *bool `json:"isNotification,omitempty"` -} - -// MarshalJSON is the custom marshaler for APIOperationPropertiesDefinition. -func (aopd APIOperationPropertiesDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if aopd.Summary != nil { - objectMap["summary"] = aopd.Summary - } - if aopd.Description != nil { - objectMap["description"] = aopd.Description - } - if aopd.Visibility != nil { - objectMap["visibility"] = aopd.Visibility - } - if aopd.Trigger != nil { - objectMap["trigger"] = aopd.Trigger - } - if aopd.TriggerHint != nil { - objectMap["triggerHint"] = aopd.TriggerHint - } - if aopd.Pageable != nil { - objectMap["pageable"] = aopd.Pageable - } - if aopd.Annotation != nil { - objectMap["annotation"] = aopd.Annotation - } - if aopd.API != nil { - objectMap["api"] = aopd.API - } - if aopd.InputsDefinition != nil { - objectMap["inputsDefinition"] = aopd.InputsDefinition - } - if aopd.ResponsesDefinition != nil { - objectMap["responsesDefinition"] = aopd.ResponsesDefinition - } - if aopd.IsWebhook != nil { - objectMap["isWebhook"] = aopd.IsWebhook - } - if aopd.IsNotification != nil { - objectMap["isNotification"] = aopd.IsNotification - } - return json.Marshal(objectMap) -} - -// APIReference the Api reference. -type APIReference struct { - // DisplayName - The display name of the api. - DisplayName *string `json:"displayName,omitempty"` - // Description - The description of the api. - Description *string `json:"description,omitempty"` - // IconURI - The icon uri of the api. - IconURI *string `json:"iconUri,omitempty"` - // Swagger - The swagger of the api. - Swagger interface{} `json:"swagger,omitempty"` - // BrandColor - The brand color of the api. - BrandColor *string `json:"brandColor,omitempty"` - // Category - The tier. Possible values include: 'APITierNotSpecified', 'APITierEnterprise', 'APITierStandard', 'APITierPremium' - Category APITier `json:"category,omitempty"` - // IntegrationServiceEnvironment - The integration service environment reference. - IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` - // ID - The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for APIReference. -func (ar APIReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ar.DisplayName != nil { - objectMap["displayName"] = ar.DisplayName - } - if ar.Description != nil { - objectMap["description"] = ar.Description - } - if ar.IconURI != nil { - objectMap["iconUri"] = ar.IconURI - } - if ar.Swagger != nil { - objectMap["swagger"] = ar.Swagger - } - if ar.BrandColor != nil { - objectMap["brandColor"] = ar.BrandColor - } - if ar.Category != "" { - objectMap["category"] = ar.Category - } - if ar.IntegrationServiceEnvironment != nil { - objectMap["integrationServiceEnvironment"] = ar.IntegrationServiceEnvironment - } - if ar.ID != nil { - objectMap["id"] = ar.ID - } - return json.Marshal(objectMap) -} - -// APIResourceBackendService the API backend service. -type APIResourceBackendService struct { - // ServiceURL - The service URL. - ServiceURL *string `json:"serviceUrl,omitempty"` -} - -// APIResourceDefinitions the Api resource definition. -type APIResourceDefinitions struct { - // OriginalSwaggerURL - The original swagger url. - OriginalSwaggerURL *string `json:"originalSwaggerUrl,omitempty"` - // ModifiedSwaggerURL - The modified swagger url. - ModifiedSwaggerURL *string `json:"modifiedSwaggerUrl,omitempty"` -} - -// APIResourceGeneralInformation the API general information. -type APIResourceGeneralInformation struct { - // IconURL - The icon url. - IconURL *string `json:"iconUrl,omitempty"` - // DisplayName - The display name. - DisplayName *string `json:"displayName,omitempty"` - // Description - The description. - Description *string `json:"description,omitempty"` - // TermsOfUseURL - The terms of use url. - TermsOfUseURL *string `json:"termsOfUseUrl,omitempty"` - // ReleaseTag - The release tag. - ReleaseTag *string `json:"releaseTag,omitempty"` - // Tier - The tier. Possible values include: 'APITierNotSpecified', 'APITierEnterprise', 'APITierStandard', 'APITierPremium' - Tier APITier `json:"tier,omitempty"` -} - -// APIResourceMetadata the api resource metadata. -type APIResourceMetadata struct { - // Source - The source. - Source *string `json:"source,omitempty"` - // BrandColor - The brand color. - BrandColor *string `json:"brandColor,omitempty"` - // HideKey - The hide key. - HideKey *string `json:"hideKey,omitempty"` - // Tags - The tags. - Tags map[string]*string `json:"tags"` - // APIType - The api type. Possible values include: 'APITypeNotSpecified', 'APITypeRest', 'APITypeSoap' - APIType APIType `json:"ApiType,omitempty"` - // WsdlService - The WSDL service. - WsdlService *WsdlService `json:"wsdlService,omitempty"` - // WsdlImportMethod - The WSDL import method. Possible values include: 'WsdlImportMethodNotSpecified', 'WsdlImportMethodSoapToRest', 'WsdlImportMethodSoapPassThrough' - WsdlImportMethod WsdlImportMethod `json:"wsdlImportMethod,omitempty"` - // ConnectionType - The connection type. - ConnectionType *string `json:"connectionType,omitempty"` - // ProvisioningState - The provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' - ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` - // DeploymentParameters - The connector deployment parameters metadata. - DeploymentParameters *APIDeploymentParameterMetadataSet `json:"deploymentParameters,omitempty"` -} - -// MarshalJSON is the custom marshaler for APIResourceMetadata. -func (arm APIResourceMetadata) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if arm.Source != nil { - objectMap["source"] = arm.Source - } - if arm.BrandColor != nil { - objectMap["brandColor"] = arm.BrandColor - } - if arm.HideKey != nil { - objectMap["hideKey"] = arm.HideKey - } - if arm.Tags != nil { - objectMap["tags"] = arm.Tags - } - if arm.APIType != "" { - objectMap["ApiType"] = arm.APIType - } - if arm.WsdlService != nil { - objectMap["wsdlService"] = arm.WsdlService - } - if arm.WsdlImportMethod != "" { - objectMap["wsdlImportMethod"] = arm.WsdlImportMethod - } - if arm.ConnectionType != nil { - objectMap["connectionType"] = arm.ConnectionType - } - if arm.ProvisioningState != "" { - objectMap["provisioningState"] = arm.ProvisioningState - } - if arm.DeploymentParameters != nil { - objectMap["deploymentParameters"] = arm.DeploymentParameters - } - return json.Marshal(objectMap) -} - -// APIResourcePolicies the API resource policies. -type APIResourcePolicies struct { - // Content - The API level only policies XML as embedded content. - Content *string `json:"content,omitempty"` - // ContentLink - The content link to the policies. - ContentLink *string `json:"contentLink,omitempty"` -} - -// APIResourceProperties the API resource properties. -type APIResourceProperties struct { - // Name - READ-ONLY; The name - Name *string `json:"name,omitempty"` - // ConnectionParameters - READ-ONLY; The connection parameters. - ConnectionParameters map[string]interface{} `json:"connectionParameters"` - // Metadata - READ-ONLY; The metadata. - Metadata *APIResourceMetadata `json:"metadata,omitempty"` - // RuntimeUrls - READ-ONLY; The runtime urls. - RuntimeUrls *[]string `json:"runtimeUrls,omitempty"` - // GeneralInformation - READ-ONLY; The api general information. - GeneralInformation *APIResourceGeneralInformation `json:"generalInformation,omitempty"` - // Capabilities - READ-ONLY; The capabilities. - Capabilities *[]string `json:"capabilities,omitempty"` - // BackendService - READ-ONLY; The backend service. - BackendService *APIResourceBackendService `json:"backendService,omitempty"` - // Policies - READ-ONLY; The policies for the API. - Policies *APIResourcePolicies `json:"policies,omitempty"` - // APIDefinitionURL - READ-ONLY; The API definition. - APIDefinitionURL *string `json:"apiDefinitionUrl,omitempty"` - // APIDefinitions - READ-ONLY; The api definitions. - APIDefinitions *APIResourceDefinitions `json:"apiDefinitions,omitempty"` - // IntegrationServiceEnvironment - The integration service environment reference. - IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' - ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` - // Category - READ-ONLY; The category. Possible values include: 'APITierNotSpecified', 'APITierEnterprise', 'APITierStandard', 'APITierPremium' - Category APITier `json:"category,omitempty"` -} - -// MarshalJSON is the custom marshaler for APIResourceProperties. -func (arp APIResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if arp.IntegrationServiceEnvironment != nil { - objectMap["integrationServiceEnvironment"] = arp.IntegrationServiceEnvironment - } - return json.Marshal(objectMap) -} - -// ArtifactContentPropertiesDefinition the artifact content properties definition. -type ArtifactContentPropertiesDefinition struct { - Content interface{} `json:"content,omitempty"` - // ContentType - The content type. - ContentType *string `json:"contentType,omitempty"` - // ContentLink - The content link. - ContentLink *ContentLink `json:"contentLink,omitempty"` - // CreatedTime - The artifact creation time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - The artifact changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - Metadata interface{} `json:"metadata,omitempty"` -} - -// ArtifactProperties the artifact properties definition. -type ArtifactProperties struct { - // CreatedTime - The artifact creation time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - The artifact changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - Metadata interface{} `json:"metadata,omitempty"` -} - -// AS2AcknowledgementConnectionSettings the AS2 agreement acknowledgement connection settings. -type AS2AcknowledgementConnectionSettings struct { - // IgnoreCertificateNameMismatch - Indicates whether to ignore mismatch in certificate name. - IgnoreCertificateNameMismatch *bool `json:"ignoreCertificateNameMismatch,omitempty"` - // SupportHTTPStatusCodeContinue - Indicates whether to support HTTP status code 'CONTINUE'. - SupportHTTPStatusCodeContinue *bool `json:"supportHttpStatusCodeContinue,omitempty"` - // KeepHTTPConnectionAlive - Indicates whether to keep the connection alive. - KeepHTTPConnectionAlive *bool `json:"keepHttpConnectionAlive,omitempty"` - // UnfoldHTTPHeaders - Indicates whether to unfold the HTTP headers. - UnfoldHTTPHeaders *bool `json:"unfoldHttpHeaders,omitempty"` -} - -// AS2AgreementContent the integration account AS2 agreement content. -type AS2AgreementContent struct { - // ReceiveAgreement - The AS2 one-way receive agreement. - ReceiveAgreement *AS2OneWayAgreement `json:"receiveAgreement,omitempty"` - // SendAgreement - The AS2 one-way send agreement. - SendAgreement *AS2OneWayAgreement `json:"sendAgreement,omitempty"` -} - -// AS2EnvelopeSettings the AS2 agreement envelope settings. -type AS2EnvelopeSettings struct { - // MessageContentType - The message content type. - MessageContentType *string `json:"messageContentType,omitempty"` - // TransmitFileNameInMimeHeader - The value indicating whether to transmit file name in mime header. - TransmitFileNameInMimeHeader *bool `json:"transmitFileNameInMimeHeader,omitempty"` - // FileNameTemplate - The template for file name. - FileNameTemplate *string `json:"fileNameTemplate,omitempty"` - // SuspendMessageOnFileNameGenerationError - The value indicating whether to suspend message on file name generation error. - SuspendMessageOnFileNameGenerationError *bool `json:"suspendMessageOnFileNameGenerationError,omitempty"` - // AutogenerateFileName - The value indicating whether to auto generate file name. - AutogenerateFileName *bool `json:"autogenerateFileName,omitempty"` -} - -// AS2ErrorSettings the AS2 agreement error settings. -type AS2ErrorSettings struct { - // SuspendDuplicateMessage - The value indicating whether to suspend duplicate message. - SuspendDuplicateMessage *bool `json:"suspendDuplicateMessage,omitempty"` - // ResendIfMDNNotReceived - The value indicating whether to resend message If MDN is not received. - ResendIfMDNNotReceived *bool `json:"resendIfMDNNotReceived,omitempty"` -} - -// AS2MdnSettings the AS2 agreement mdn settings. -type AS2MdnSettings struct { - // NeedMDN - The value indicating whether to send or request a MDN. - NeedMDN *bool `json:"needMDN,omitempty"` - // SignMDN - The value indicating whether the MDN needs to be signed or not. - SignMDN *bool `json:"signMDN,omitempty"` - // SendMDNAsynchronously - The value indicating whether to send the asynchronous MDN. - SendMDNAsynchronously *bool `json:"sendMDNAsynchronously,omitempty"` - // ReceiptDeliveryURL - The receipt delivery URL. - ReceiptDeliveryURL *string `json:"receiptDeliveryUrl,omitempty"` - // DispositionNotificationTo - The disposition notification to header value. - DispositionNotificationTo *string `json:"dispositionNotificationTo,omitempty"` - // SignOutboundMDNIfOptional - The value indicating whether to sign the outbound MDN if optional. - SignOutboundMDNIfOptional *bool `json:"signOutboundMDNIfOptional,omitempty"` - // MdnText - The MDN text. - MdnText *string `json:"mdnText,omitempty"` - // SendInboundMDNToMessageBox - The value indicating whether to send inbound MDN to message box. - SendInboundMDNToMessageBox *bool `json:"sendInboundMDNToMessageBox,omitempty"` - // MicHashingAlgorithm - The signing or hashing algorithm. Possible values include: 'HashingAlgorithmNotSpecified', 'HashingAlgorithmNone', 'HashingAlgorithmMD5', 'HashingAlgorithmSHA1', 'HashingAlgorithmSHA2256', 'HashingAlgorithmSHA2384', 'HashingAlgorithmSHA2512' - MicHashingAlgorithm HashingAlgorithm `json:"micHashingAlgorithm,omitempty"` -} - -// AS2MessageConnectionSettings the AS2 agreement message connection settings. -type AS2MessageConnectionSettings struct { - // IgnoreCertificateNameMismatch - The value indicating whether to ignore mismatch in certificate name. - IgnoreCertificateNameMismatch *bool `json:"ignoreCertificateNameMismatch,omitempty"` - // SupportHTTPStatusCodeContinue - The value indicating whether to support HTTP status code 'CONTINUE'. - SupportHTTPStatusCodeContinue *bool `json:"supportHttpStatusCodeContinue,omitempty"` - // KeepHTTPConnectionAlive - The value indicating whether to keep the connection alive. - KeepHTTPConnectionAlive *bool `json:"keepHttpConnectionAlive,omitempty"` - // UnfoldHTTPHeaders - The value indicating whether to unfold the HTTP headers. - UnfoldHTTPHeaders *bool `json:"unfoldHttpHeaders,omitempty"` -} - -// AS2OneWayAgreement the integration account AS2 one-way agreement. -type AS2OneWayAgreement struct { - // SenderBusinessIdentity - The sender business identity - SenderBusinessIdentity *BusinessIdentity `json:"senderBusinessIdentity,omitempty"` - // ReceiverBusinessIdentity - The receiver business identity - ReceiverBusinessIdentity *BusinessIdentity `json:"receiverBusinessIdentity,omitempty"` - // ProtocolSettings - The AS2 protocol settings. - ProtocolSettings *AS2ProtocolSettings `json:"protocolSettings,omitempty"` -} - -// AS2ProtocolSettings the AS2 agreement protocol settings. -type AS2ProtocolSettings struct { - // MessageConnectionSettings - The message connection settings. - MessageConnectionSettings *AS2MessageConnectionSettings `json:"messageConnectionSettings,omitempty"` - // AcknowledgementConnectionSettings - The acknowledgement connection settings. - AcknowledgementConnectionSettings *AS2AcknowledgementConnectionSettings `json:"acknowledgementConnectionSettings,omitempty"` - // MdnSettings - The MDN settings. - MdnSettings *AS2MdnSettings `json:"mdnSettings,omitempty"` - // SecuritySettings - The security settings. - SecuritySettings *AS2SecuritySettings `json:"securitySettings,omitempty"` - // ValidationSettings - The validation settings. - ValidationSettings *AS2ValidationSettings `json:"validationSettings,omitempty"` - // EnvelopeSettings - The envelope settings. - EnvelopeSettings *AS2EnvelopeSettings `json:"envelopeSettings,omitempty"` - // ErrorSettings - The error settings. - ErrorSettings *AS2ErrorSettings `json:"errorSettings,omitempty"` -} - -// AS2SecuritySettings the AS2 agreement security settings. -type AS2SecuritySettings struct { - // OverrideGroupSigningCertificate - The value indicating whether to send or request a MDN. - OverrideGroupSigningCertificate *bool `json:"overrideGroupSigningCertificate,omitempty"` - // SigningCertificateName - The name of the signing certificate. - SigningCertificateName *string `json:"signingCertificateName,omitempty"` - // EncryptionCertificateName - The name of the encryption certificate. - EncryptionCertificateName *string `json:"encryptionCertificateName,omitempty"` - // EnableNRRForInboundEncodedMessages - The value indicating whether to enable NRR for inbound encoded messages. - EnableNRRForInboundEncodedMessages *bool `json:"enableNRRForInboundEncodedMessages,omitempty"` - // EnableNRRForInboundDecodedMessages - The value indicating whether to enable NRR for inbound decoded messages. - EnableNRRForInboundDecodedMessages *bool `json:"enableNRRForInboundDecodedMessages,omitempty"` - // EnableNRRForOutboundMDN - The value indicating whether to enable NRR for outbound MDN. - EnableNRRForOutboundMDN *bool `json:"enableNRRForOutboundMDN,omitempty"` - // EnableNRRForOutboundEncodedMessages - The value indicating whether to enable NRR for outbound encoded messages. - EnableNRRForOutboundEncodedMessages *bool `json:"enableNRRForOutboundEncodedMessages,omitempty"` - // EnableNRRForOutboundDecodedMessages - The value indicating whether to enable NRR for outbound decoded messages. - EnableNRRForOutboundDecodedMessages *bool `json:"enableNRRForOutboundDecodedMessages,omitempty"` - // EnableNRRForInboundMDN - The value indicating whether to enable NRR for inbound MDN. - EnableNRRForInboundMDN *bool `json:"enableNRRForInboundMDN,omitempty"` - // Sha2AlgorithmFormat - The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. - Sha2AlgorithmFormat *string `json:"sha2AlgorithmFormat,omitempty"` -} - -// AS2ValidationSettings the AS2 agreement validation settings. -type AS2ValidationSettings struct { - // OverrideMessageProperties - The value indicating whether to override incoming message properties with those in agreement. - OverrideMessageProperties *bool `json:"overrideMessageProperties,omitempty"` - // EncryptMessage - The value indicating whether the message has to be encrypted. - EncryptMessage *bool `json:"encryptMessage,omitempty"` - // SignMessage - The value indicating whether the message has to be signed. - SignMessage *bool `json:"signMessage,omitempty"` - // CompressMessage - The value indicating whether the message has to be compressed. - CompressMessage *bool `json:"compressMessage,omitempty"` - // CheckDuplicateMessage - The value indicating whether to check for duplicate message. - CheckDuplicateMessage *bool `json:"checkDuplicateMessage,omitempty"` - // InterchangeDuplicatesValidityDays - The number of days to look back for duplicate interchange. - InterchangeDuplicatesValidityDays *int32 `json:"interchangeDuplicatesValidityDays,omitempty"` - // CheckCertificateRevocationListOnSend - The value indicating whether to check for certificate revocation list on send. - CheckCertificateRevocationListOnSend *bool `json:"checkCertificateRevocationListOnSend,omitempty"` - // CheckCertificateRevocationListOnReceive - The value indicating whether to check for certificate revocation list on receive. - CheckCertificateRevocationListOnReceive *bool `json:"checkCertificateRevocationListOnReceive,omitempty"` - // EncryptionAlgorithm - The encryption algorithm. Possible values include: 'EncryptionAlgorithmNotSpecified', 'EncryptionAlgorithmNone', 'EncryptionAlgorithmDES3', 'EncryptionAlgorithmRC2', 'EncryptionAlgorithmAES128', 'EncryptionAlgorithmAES192', 'EncryptionAlgorithmAES256' - EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"` - // SigningAlgorithm - The signing algorithm. Possible values include: 'SigningAlgorithmNotSpecified', 'SigningAlgorithmDefault', 'SigningAlgorithmSHA1', 'SigningAlgorithmSHA2256', 'SigningAlgorithmSHA2384', 'SigningAlgorithmSHA2512' - SigningAlgorithm SigningAlgorithm `json:"signingAlgorithm,omitempty"` -} - -// AssemblyCollection a collection of assembly definitions. -type AssemblyCollection struct { - autorest.Response `json:"-"` - Value *[]AssemblyDefinition `json:"value,omitempty"` -} - -// AssemblyDefinition the assembly definition. -type AssemblyDefinition struct { - autorest.Response `json:"-"` - // Properties - The assembly properties. - Properties *AssemblyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for AssemblyDefinition. -func (ad AssemblyDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ad.Properties != nil { - objectMap["properties"] = ad.Properties - } - if ad.Location != nil { - objectMap["location"] = ad.Location - } - if ad.Tags != nil { - objectMap["tags"] = ad.Tags - } - return json.Marshal(objectMap) -} - -// AssemblyProperties the assembly properties definition. -type AssemblyProperties struct { - // AssemblyName - The assembly name. - AssemblyName *string `json:"assemblyName,omitempty"` - // AssemblyVersion - The assembly version. - AssemblyVersion *string `json:"assemblyVersion,omitempty"` - // AssemblyCulture - The assembly culture. - AssemblyCulture *string `json:"assemblyCulture,omitempty"` - // AssemblyPublicKeyToken - The assembly public key token. - AssemblyPublicKeyToken *string `json:"assemblyPublicKeyToken,omitempty"` - Content interface{} `json:"content,omitempty"` - // ContentType - The content type. - ContentType *string `json:"contentType,omitempty"` - // ContentLink - The content link. - ContentLink *ContentLink `json:"contentLink,omitempty"` - // CreatedTime - The artifact creation time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - The artifact changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - Metadata interface{} `json:"metadata,omitempty"` -} - -// AzureResourceErrorInfo the azure resource error info. -type AzureResourceErrorInfo struct { - // Message - The error message. - Message *string `json:"message,omitempty"` - // Details - The error details. - Details *[]AzureResourceErrorInfo `json:"details,omitempty"` - // Code - The error code. - Code *string `json:"code,omitempty"` -} - -// B2BPartnerContent the B2B partner content. -type B2BPartnerContent struct { - // BusinessIdentities - The list of partner business identities. - BusinessIdentities *[]BusinessIdentity `json:"businessIdentities,omitempty"` -} - -// BatchConfiguration the batch configuration resource definition. -type BatchConfiguration struct { - autorest.Response `json:"-"` - // Properties - The batch configuration properties. - Properties *BatchConfigurationProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for BatchConfiguration. -func (bc BatchConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if bc.Properties != nil { - objectMap["properties"] = bc.Properties - } - if bc.Location != nil { - objectMap["location"] = bc.Location - } - if bc.Tags != nil { - objectMap["tags"] = bc.Tags - } - return json.Marshal(objectMap) -} - -// BatchConfigurationCollection a collection of batch configurations. -type BatchConfigurationCollection struct { - autorest.Response `json:"-"` - Value *[]BatchConfiguration `json:"value,omitempty"` -} - -// BatchConfigurationProperties the batch configuration properties definition. -type BatchConfigurationProperties struct { - // BatchGroupName - The name of the batch group. - BatchGroupName *string `json:"batchGroupName,omitempty"` - // ReleaseCriteria - The batch release criteria. - ReleaseCriteria *BatchReleaseCriteria `json:"releaseCriteria,omitempty"` - // CreatedTime - The artifact creation time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - The artifact changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - Metadata interface{} `json:"metadata,omitempty"` -} - -// BatchReleaseCriteria the batch release criteria. -type BatchReleaseCriteria struct { - // MessageCount - The message count. - MessageCount *int32 `json:"messageCount,omitempty"` - // BatchSize - The batch size in bytes. - BatchSize *int32 `json:"batchSize,omitempty"` - // Recurrence - The recurrence. - Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty"` -} - -// BusinessIdentity the integration account partner's business identity. -type BusinessIdentity struct { - // Qualifier - The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 - Qualifier *string `json:"qualifier,omitempty"` - // Value - The user defined business identity value. - Value *string `json:"value,omitempty"` -} - -// CallbackURL the callback url. -type CallbackURL struct { - autorest.Response `json:"-"` - // Value - The URL value. - Value *string `json:"value,omitempty"` -} - -// ContentHash the content hash. -type ContentHash struct { - // Algorithm - The algorithm of the content hash. - Algorithm *string `json:"algorithm,omitempty"` - // Value - The value of the content hash. - Value *string `json:"value,omitempty"` -} - -// ContentLink the content link. -type ContentLink struct { - // URI - The content link URI. - URI *string `json:"uri,omitempty"` - // ContentVersion - READ-ONLY; The content version. - ContentVersion *string `json:"contentVersion,omitempty"` - // ContentSize - READ-ONLY; The content size. - ContentSize *int64 `json:"contentSize,omitempty"` - // ContentHash - READ-ONLY; The content hash. - ContentHash *ContentHash `json:"contentHash,omitempty"` - // Metadata - READ-ONLY; The metadata. - Metadata interface{} `json:"metadata,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContentLink. -func (cl ContentLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cl.URI != nil { - objectMap["uri"] = cl.URI - } - return json.Marshal(objectMap) -} - -// Correlation the correlation property. -type Correlation struct { - // ClientTrackingID - The client tracking id. - ClientTrackingID *string `json:"clientTrackingId,omitempty"` -} - -// EdifactAcknowledgementSettings the Edifact agreement acknowledgement settings. -type EdifactAcknowledgementSettings struct { - // NeedTechnicalAcknowledgement - The value indicating whether technical acknowledgement is needed. - NeedTechnicalAcknowledgement *bool `json:"needTechnicalAcknowledgement,omitempty"` - // BatchTechnicalAcknowledgements - The value indicating whether to batch the technical acknowledgements. - BatchTechnicalAcknowledgements *bool `json:"batchTechnicalAcknowledgements,omitempty"` - // NeedFunctionalAcknowledgement - The value indicating whether functional acknowledgement is needed. - NeedFunctionalAcknowledgement *bool `json:"needFunctionalAcknowledgement,omitempty"` - // BatchFunctionalAcknowledgements - The value indicating whether to batch functional acknowledgements. - BatchFunctionalAcknowledgements *bool `json:"batchFunctionalAcknowledgements,omitempty"` - // NeedLoopForValidMessages - The value indicating whether a loop is needed for valid messages. - NeedLoopForValidMessages *bool `json:"needLoopForValidMessages,omitempty"` - // SendSynchronousAcknowledgement - The value indicating whether to send synchronous acknowledgement. - SendSynchronousAcknowledgement *bool `json:"sendSynchronousAcknowledgement,omitempty"` - // AcknowledgementControlNumberPrefix - The acknowledgement control number prefix. - AcknowledgementControlNumberPrefix *string `json:"acknowledgementControlNumberPrefix,omitempty"` - // AcknowledgementControlNumberSuffix - The acknowledgement control number suffix. - AcknowledgementControlNumberSuffix *string `json:"acknowledgementControlNumberSuffix,omitempty"` - // AcknowledgementControlNumberLowerBound - The acknowledgement control number lower bound. - AcknowledgementControlNumberLowerBound *int32 `json:"acknowledgementControlNumberLowerBound,omitempty"` - // AcknowledgementControlNumberUpperBound - The acknowledgement control number upper bound. - AcknowledgementControlNumberUpperBound *int32 `json:"acknowledgementControlNumberUpperBound,omitempty"` - // RolloverAcknowledgementControlNumber - The value indicating whether to rollover acknowledgement control number. - RolloverAcknowledgementControlNumber *bool `json:"rolloverAcknowledgementControlNumber,omitempty"` -} - -// EdifactAgreementContent the Edifact agreement content. -type EdifactAgreementContent struct { - // ReceiveAgreement - The EDIFACT one-way receive agreement. - ReceiveAgreement *EdifactOneWayAgreement `json:"receiveAgreement,omitempty"` - // SendAgreement - The EDIFACT one-way send agreement. - SendAgreement *EdifactOneWayAgreement `json:"sendAgreement,omitempty"` -} - -// EdifactDelimiterOverride the Edifact delimiter override settings. -type EdifactDelimiterOverride struct { - // MessageID - The message id. - MessageID *string `json:"messageId,omitempty"` - // MessageVersion - The message version. - MessageVersion *string `json:"messageVersion,omitempty"` - // MessageRelease - The message release. - MessageRelease *string `json:"messageRelease,omitempty"` - // DataElementSeparator - The data element separator. - DataElementSeparator *int32 `json:"dataElementSeparator,omitempty"` - // ComponentSeparator - The component separator. - ComponentSeparator *int32 `json:"componentSeparator,omitempty"` - // SegmentTerminator - The segment terminator. - SegmentTerminator *int32 `json:"segmentTerminator,omitempty"` - // RepetitionSeparator - The repetition separator. - RepetitionSeparator *int32 `json:"repetitionSeparator,omitempty"` - // SegmentTerminatorSuffix - The segment terminator suffix. Possible values include: 'SegmentTerminatorSuffixNotSpecified', 'SegmentTerminatorSuffixNone', 'SegmentTerminatorSuffixCR', 'SegmentTerminatorSuffixLF', 'SegmentTerminatorSuffixCRLF' - SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix,omitempty"` - // DecimalPointIndicator - The decimal point indicator. Possible values include: 'EdifactDecimalIndicatorNotSpecified', 'EdifactDecimalIndicatorComma', 'EdifactDecimalIndicatorDecimal' - DecimalPointIndicator EdifactDecimalIndicator `json:"decimalPointIndicator,omitempty"` - // ReleaseIndicator - The release indicator. - ReleaseIndicator *int32 `json:"releaseIndicator,omitempty"` - // MessageAssociationAssignedCode - The message association assigned code. - MessageAssociationAssignedCode *string `json:"messageAssociationAssignedCode,omitempty"` - // TargetNamespace - The target namespace on which this delimiter settings has to be applied. - TargetNamespace *string `json:"targetNamespace,omitempty"` -} - -// EdifactEnvelopeOverride the Edifact envelope override settings. -type EdifactEnvelopeOverride struct { - // MessageID - The message id on which this envelope settings has to be applied. - MessageID *string `json:"messageId,omitempty"` - // MessageVersion - The message version on which this envelope settings has to be applied. - MessageVersion *string `json:"messageVersion,omitempty"` - // MessageRelease - The message release version on which this envelope settings has to be applied. - MessageRelease *string `json:"messageRelease,omitempty"` - // MessageAssociationAssignedCode - The message association assigned code. - MessageAssociationAssignedCode *string `json:"messageAssociationAssignedCode,omitempty"` - // TargetNamespace - The target namespace on which this envelope settings has to be applied. - TargetNamespace *string `json:"targetNamespace,omitempty"` - // FunctionalGroupID - The functional group id. - FunctionalGroupID *string `json:"functionalGroupId,omitempty"` - // SenderApplicationQualifier - The sender application qualifier. - SenderApplicationQualifier *string `json:"senderApplicationQualifier,omitempty"` - // SenderApplicationID - The sender application id. - SenderApplicationID *string `json:"senderApplicationId,omitempty"` - // ReceiverApplicationQualifier - The receiver application qualifier. - ReceiverApplicationQualifier *string `json:"receiverApplicationQualifier,omitempty"` - // ReceiverApplicationID - The receiver application id. - ReceiverApplicationID *string `json:"receiverApplicationId,omitempty"` - // ControllingAgencyCode - The controlling agency code. - ControllingAgencyCode *string `json:"controllingAgencyCode,omitempty"` - // GroupHeaderMessageVersion - The group header message version. - GroupHeaderMessageVersion *string `json:"groupHeaderMessageVersion,omitempty"` - // GroupHeaderMessageRelease - The group header message release. - GroupHeaderMessageRelease *string `json:"groupHeaderMessageRelease,omitempty"` - // AssociationAssignedCode - The association assigned code. - AssociationAssignedCode *string `json:"associationAssignedCode,omitempty"` - // ApplicationPassword - The application password. - ApplicationPassword *string `json:"applicationPassword,omitempty"` -} - -// EdifactEnvelopeSettings the Edifact agreement envelope settings. -type EdifactEnvelopeSettings struct { - // GroupAssociationAssignedCode - The group association assigned code. - GroupAssociationAssignedCode *string `json:"groupAssociationAssignedCode,omitempty"` - // CommunicationAgreementID - The communication agreement id. - CommunicationAgreementID *string `json:"communicationAgreementId,omitempty"` - // ApplyDelimiterStringAdvice - The value indicating whether to apply delimiter string advice. - ApplyDelimiterStringAdvice *bool `json:"applyDelimiterStringAdvice,omitempty"` - // CreateGroupingSegments - The value indicating whether to create grouping segments. - CreateGroupingSegments *bool `json:"createGroupingSegments,omitempty"` - // EnableDefaultGroupHeaders - The value indicating whether to enable default group headers. - EnableDefaultGroupHeaders *bool `json:"enableDefaultGroupHeaders,omitempty"` - // RecipientReferencePasswordValue - The recipient reference password value. - RecipientReferencePasswordValue *string `json:"recipientReferencePasswordValue,omitempty"` - // RecipientReferencePasswordQualifier - The recipient reference password qualifier. - RecipientReferencePasswordQualifier *string `json:"recipientReferencePasswordQualifier,omitempty"` - // ApplicationReferenceID - The application reference id. - ApplicationReferenceID *string `json:"applicationReferenceId,omitempty"` - // ProcessingPriorityCode - The processing priority code. - ProcessingPriorityCode *string `json:"processingPriorityCode,omitempty"` - // InterchangeControlNumberLowerBound - The interchange control number lower bound. - InterchangeControlNumberLowerBound *int64 `json:"interchangeControlNumberLowerBound,omitempty"` - // InterchangeControlNumberUpperBound - The interchange control number upper bound. - InterchangeControlNumberUpperBound *int64 `json:"interchangeControlNumberUpperBound,omitempty"` - // RolloverInterchangeControlNumber - The value indicating whether to rollover interchange control number. - RolloverInterchangeControlNumber *bool `json:"rolloverInterchangeControlNumber,omitempty"` - // InterchangeControlNumberPrefix - The interchange control number prefix. - InterchangeControlNumberPrefix *string `json:"interchangeControlNumberPrefix,omitempty"` - // InterchangeControlNumberSuffix - The interchange control number suffix. - InterchangeControlNumberSuffix *string `json:"interchangeControlNumberSuffix,omitempty"` - // SenderReverseRoutingAddress - The sender reverse routing address. - SenderReverseRoutingAddress *string `json:"senderReverseRoutingAddress,omitempty"` - // ReceiverReverseRoutingAddress - The receiver reverse routing address. - ReceiverReverseRoutingAddress *string `json:"receiverReverseRoutingAddress,omitempty"` - // FunctionalGroupID - The functional group id. - FunctionalGroupID *string `json:"functionalGroupId,omitempty"` - // GroupControllingAgencyCode - The group controlling agency code. - GroupControllingAgencyCode *string `json:"groupControllingAgencyCode,omitempty"` - // GroupMessageVersion - The group message version. - GroupMessageVersion *string `json:"groupMessageVersion,omitempty"` - // GroupMessageRelease - The group message release. - GroupMessageRelease *string `json:"groupMessageRelease,omitempty"` - // GroupControlNumberLowerBound - The group control number lower bound. - GroupControlNumberLowerBound *int64 `json:"groupControlNumberLowerBound,omitempty"` - // GroupControlNumberUpperBound - The group control number upper bound. - GroupControlNumberUpperBound *int64 `json:"groupControlNumberUpperBound,omitempty"` - // RolloverGroupControlNumber - The value indicating whether to rollover group control number. - RolloverGroupControlNumber *bool `json:"rolloverGroupControlNumber,omitempty"` - // GroupControlNumberPrefix - The group control number prefix. - GroupControlNumberPrefix *string `json:"groupControlNumberPrefix,omitempty"` - // GroupControlNumberSuffix - The group control number suffix. - GroupControlNumberSuffix *string `json:"groupControlNumberSuffix,omitempty"` - // GroupApplicationReceiverQualifier - The group application receiver qualifier. - GroupApplicationReceiverQualifier *string `json:"groupApplicationReceiverQualifier,omitempty"` - // GroupApplicationReceiverID - The group application receiver id. - GroupApplicationReceiverID *string `json:"groupApplicationReceiverId,omitempty"` - // GroupApplicationSenderQualifier - The group application sender qualifier. - GroupApplicationSenderQualifier *string `json:"groupApplicationSenderQualifier,omitempty"` - // GroupApplicationSenderID - The group application sender id. - GroupApplicationSenderID *string `json:"groupApplicationSenderId,omitempty"` - // GroupApplicationPassword - The group application password. - GroupApplicationPassword *string `json:"groupApplicationPassword,omitempty"` - // OverwriteExistingTransactionSetControlNumber - The value indicating whether to overwrite existing transaction set control number. - OverwriteExistingTransactionSetControlNumber *bool `json:"overwriteExistingTransactionSetControlNumber,omitempty"` - // TransactionSetControlNumberPrefix - The transaction set control number prefix. - TransactionSetControlNumberPrefix *string `json:"transactionSetControlNumberPrefix,omitempty"` - // TransactionSetControlNumberSuffix - The transaction set control number suffix. - TransactionSetControlNumberSuffix *string `json:"transactionSetControlNumberSuffix,omitempty"` - // TransactionSetControlNumberLowerBound - The transaction set control number lower bound. - TransactionSetControlNumberLowerBound *int64 `json:"transactionSetControlNumberLowerBound,omitempty"` - // TransactionSetControlNumberUpperBound - The transaction set control number upper bound. - TransactionSetControlNumberUpperBound *int64 `json:"transactionSetControlNumberUpperBound,omitempty"` - // RolloverTransactionSetControlNumber - The value indicating whether to rollover transaction set control number. - RolloverTransactionSetControlNumber *bool `json:"rolloverTransactionSetControlNumber,omitempty"` - // IsTestInterchange - The value indicating whether the message is a test interchange. - IsTestInterchange *bool `json:"isTestInterchange,omitempty"` - // SenderInternalIdentification - The sender internal identification. - SenderInternalIdentification *string `json:"senderInternalIdentification,omitempty"` - // SenderInternalSubIdentification - The sender internal sub identification. - SenderInternalSubIdentification *string `json:"senderInternalSubIdentification,omitempty"` - // ReceiverInternalIdentification - The receiver internal identification. - ReceiverInternalIdentification *string `json:"receiverInternalIdentification,omitempty"` - // ReceiverInternalSubIdentification - The receiver internal sub identification. - ReceiverInternalSubIdentification *string `json:"receiverInternalSubIdentification,omitempty"` -} - -// EdifactFramingSettings the Edifact agreement framing settings. -type EdifactFramingSettings struct { - // ServiceCodeListDirectoryVersion - The service code list directory version. - ServiceCodeListDirectoryVersion *string `json:"serviceCodeListDirectoryVersion,omitempty"` - // CharacterEncoding - The character encoding. - CharacterEncoding *string `json:"characterEncoding,omitempty"` - // ProtocolVersion - The protocol version. - ProtocolVersion *int32 `json:"protocolVersion,omitempty"` - // DataElementSeparator - The data element separator. - DataElementSeparator *int32 `json:"dataElementSeparator,omitempty"` - // ComponentSeparator - The component separator. - ComponentSeparator *int32 `json:"componentSeparator,omitempty"` - // SegmentTerminator - The segment terminator. - SegmentTerminator *int32 `json:"segmentTerminator,omitempty"` - // ReleaseIndicator - The release indicator. - ReleaseIndicator *int32 `json:"releaseIndicator,omitempty"` - // RepetitionSeparator - The repetition separator. - RepetitionSeparator *int32 `json:"repetitionSeparator,omitempty"` - // CharacterSet - The EDIFACT frame setting characterSet. Possible values include: 'EdifactCharacterSetNotSpecified', 'EdifactCharacterSetUNOB', 'EdifactCharacterSetUNOA', 'EdifactCharacterSetUNOC', 'EdifactCharacterSetUNOD', 'EdifactCharacterSetUNOE', 'EdifactCharacterSetUNOF', 'EdifactCharacterSetUNOG', 'EdifactCharacterSetUNOH', 'EdifactCharacterSetUNOI', 'EdifactCharacterSetUNOJ', 'EdifactCharacterSetUNOK', 'EdifactCharacterSetUNOX', 'EdifactCharacterSetUNOY', 'EdifactCharacterSetKECA' - CharacterSet EdifactCharacterSet `json:"characterSet,omitempty"` - // DecimalPointIndicator - The EDIFACT frame setting decimal indicator. Possible values include: 'EdifactDecimalIndicatorNotSpecified', 'EdifactDecimalIndicatorComma', 'EdifactDecimalIndicatorDecimal' - DecimalPointIndicator EdifactDecimalIndicator `json:"decimalPointIndicator,omitempty"` - // SegmentTerminatorSuffix - The EDIFACT frame setting segment terminator suffix. Possible values include: 'SegmentTerminatorSuffixNotSpecified', 'SegmentTerminatorSuffixNone', 'SegmentTerminatorSuffixCR', 'SegmentTerminatorSuffixLF', 'SegmentTerminatorSuffixCRLF' - SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix,omitempty"` -} - -// EdifactMessageFilter the Edifact message filter for odata query. -type EdifactMessageFilter struct { - // MessageFilterType - The message filter type. Possible values include: 'MessageFilterTypeNotSpecified', 'MessageFilterTypeInclude', 'MessageFilterTypeExclude' - MessageFilterType MessageFilterType `json:"messageFilterType,omitempty"` -} - -// EdifactMessageIdentifier the Edifact message identifier. -type EdifactMessageIdentifier struct { - // MessageID - The message id on which this envelope settings has to be applied. - MessageID *string `json:"messageId,omitempty"` -} - -// EdifactOneWayAgreement the Edifact one way agreement. -type EdifactOneWayAgreement struct { - // SenderBusinessIdentity - The sender business identity - SenderBusinessIdentity *BusinessIdentity `json:"senderBusinessIdentity,omitempty"` - // ReceiverBusinessIdentity - The receiver business identity - ReceiverBusinessIdentity *BusinessIdentity `json:"receiverBusinessIdentity,omitempty"` - // ProtocolSettings - The EDIFACT protocol settings. - ProtocolSettings *EdifactProtocolSettings `json:"protocolSettings,omitempty"` -} - -// EdifactProcessingSettings the Edifact agreement protocol settings. -type EdifactProcessingSettings struct { - // MaskSecurityInfo - The value indicating whether to mask security information. - MaskSecurityInfo *bool `json:"maskSecurityInfo,omitempty"` - // PreserveInterchange - The value indicating whether to preserve interchange. - PreserveInterchange *bool `json:"preserveInterchange,omitempty"` - // SuspendInterchangeOnError - The value indicating whether to suspend interchange on error. - SuspendInterchangeOnError *bool `json:"suspendInterchangeOnError,omitempty"` - // CreateEmptyXMLTagsForTrailingSeparators - The value indicating whether to create empty xml tags for trailing separators. - CreateEmptyXMLTagsForTrailingSeparators *bool `json:"createEmptyXmlTagsForTrailingSeparators,omitempty"` - // UseDotAsDecimalSeparator - The value indicating whether to use dot as decimal separator. - UseDotAsDecimalSeparator *bool `json:"useDotAsDecimalSeparator,omitempty"` -} - -// EdifactProtocolSettings the Edifact agreement protocol settings. -type EdifactProtocolSettings struct { - // ValidationSettings - The EDIFACT validation settings. - ValidationSettings *EdifactValidationSettings `json:"validationSettings,omitempty"` - // FramingSettings - The EDIFACT framing settings. - FramingSettings *EdifactFramingSettings `json:"framingSettings,omitempty"` - // EnvelopeSettings - The EDIFACT envelope settings. - EnvelopeSettings *EdifactEnvelopeSettings `json:"envelopeSettings,omitempty"` - // AcknowledgementSettings - The EDIFACT acknowledgement settings. - AcknowledgementSettings *EdifactAcknowledgementSettings `json:"acknowledgementSettings,omitempty"` - // MessageFilter - The EDIFACT message filter. - MessageFilter *EdifactMessageFilter `json:"messageFilter,omitempty"` - // ProcessingSettings - The EDIFACT processing Settings. - ProcessingSettings *EdifactProcessingSettings `json:"processingSettings,omitempty"` - // EnvelopeOverrides - The EDIFACT envelope override settings. - EnvelopeOverrides *[]EdifactEnvelopeOverride `json:"envelopeOverrides,omitempty"` - // MessageFilterList - The EDIFACT message filter list. - MessageFilterList *[]EdifactMessageIdentifier `json:"messageFilterList,omitempty"` - // SchemaReferences - The EDIFACT schema references. - SchemaReferences *[]EdifactSchemaReference `json:"schemaReferences,omitempty"` - // ValidationOverrides - The EDIFACT validation override settings. - ValidationOverrides *[]EdifactValidationOverride `json:"validationOverrides,omitempty"` - // EdifactDelimiterOverrides - The EDIFACT delimiter override settings. - EdifactDelimiterOverrides *[]EdifactDelimiterOverride `json:"edifactDelimiterOverrides,omitempty"` -} - -// EdifactSchemaReference the Edifact schema reference. -type EdifactSchemaReference struct { - // MessageID - The message id. - MessageID *string `json:"messageId,omitempty"` - // MessageVersion - The message version. - MessageVersion *string `json:"messageVersion,omitempty"` - // MessageRelease - The message release version. - MessageRelease *string `json:"messageRelease,omitempty"` - // SenderApplicationID - The sender application id. - SenderApplicationID *string `json:"senderApplicationId,omitempty"` - // SenderApplicationQualifier - The sender application qualifier. - SenderApplicationQualifier *string `json:"senderApplicationQualifier,omitempty"` - // AssociationAssignedCode - The association assigned code. - AssociationAssignedCode *string `json:"associationAssignedCode,omitempty"` - // SchemaName - The schema name. - SchemaName *string `json:"schemaName,omitempty"` -} - -// EdifactValidationOverride the Edifact validation override settings. -type EdifactValidationOverride struct { - // MessageID - The message id on which the validation settings has to be applied. - MessageID *string `json:"messageId,omitempty"` - // EnforceCharacterSet - The value indicating whether to validate character Set. - EnforceCharacterSet *bool `json:"enforceCharacterSet,omitempty"` - // ValidateEDITypes - The value indicating whether to validate EDI types. - ValidateEDITypes *bool `json:"validateEDITypes,omitempty"` - // ValidateXSDTypes - The value indicating whether to validate XSD types. - ValidateXSDTypes *bool `json:"validateXSDTypes,omitempty"` - // AllowLeadingAndTrailingSpacesAndZeroes - The value indicating whether to allow leading and trailing spaces and zeroes. - AllowLeadingAndTrailingSpacesAndZeroes *bool `json:"allowLeadingAndTrailingSpacesAndZeroes,omitempty"` - // TrailingSeparatorPolicy - The trailing separator policy. Possible values include: 'TrailingSeparatorPolicyNotSpecified', 'TrailingSeparatorPolicyNotAllowed', 'TrailingSeparatorPolicyOptional', 'TrailingSeparatorPolicyMandatory' - TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy,omitempty"` - // TrimLeadingAndTrailingSpacesAndZeroes - The value indicating whether to trim leading and trailing spaces and zeroes. - TrimLeadingAndTrailingSpacesAndZeroes *bool `json:"trimLeadingAndTrailingSpacesAndZeroes,omitempty"` -} - -// EdifactValidationSettings the Edifact agreement validation settings. -type EdifactValidationSettings struct { - // ValidateCharacterSet - The value indicating whether to validate character set in the message. - ValidateCharacterSet *bool `json:"validateCharacterSet,omitempty"` - // CheckDuplicateInterchangeControlNumber - The value indicating whether to check for duplicate interchange control number. - CheckDuplicateInterchangeControlNumber *bool `json:"checkDuplicateInterchangeControlNumber,omitempty"` - // InterchangeControlNumberValidityDays - The validity period of interchange control number. - InterchangeControlNumberValidityDays *int32 `json:"interchangeControlNumberValidityDays,omitempty"` - // CheckDuplicateGroupControlNumber - The value indicating whether to check for duplicate group control number. - CheckDuplicateGroupControlNumber *bool `json:"checkDuplicateGroupControlNumber,omitempty"` - // CheckDuplicateTransactionSetControlNumber - The value indicating whether to check for duplicate transaction set control number. - CheckDuplicateTransactionSetControlNumber *bool `json:"checkDuplicateTransactionSetControlNumber,omitempty"` - // ValidateEDITypes - The value indicating whether to Whether to validate EDI types. - ValidateEDITypes *bool `json:"validateEDITypes,omitempty"` - // ValidateXSDTypes - The value indicating whether to Whether to validate XSD types. - ValidateXSDTypes *bool `json:"validateXSDTypes,omitempty"` - // AllowLeadingAndTrailingSpacesAndZeroes - The value indicating whether to allow leading and trailing spaces and zeroes. - AllowLeadingAndTrailingSpacesAndZeroes *bool `json:"allowLeadingAndTrailingSpacesAndZeroes,omitempty"` - // TrimLeadingAndTrailingSpacesAndZeroes - The value indicating whether to trim leading and trailing spaces and zeroes. - TrimLeadingAndTrailingSpacesAndZeroes *bool `json:"trimLeadingAndTrailingSpacesAndZeroes,omitempty"` - // TrailingSeparatorPolicy - The trailing separator policy. Possible values include: 'TrailingSeparatorPolicyNotSpecified', 'TrailingSeparatorPolicyNotAllowed', 'TrailingSeparatorPolicyOptional', 'TrailingSeparatorPolicyMandatory' - TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy,omitempty"` -} - -// ErrorInfo the error info. -type ErrorInfo struct { - // Code - The error code. - Code *string `json:"code,omitempty"` -} - -// ErrorProperties error properties indicate why the Logic service was not able to process the incoming -// request. The reason is provided in the error message. -type ErrorProperties struct { - // Code - Error code. - Code *string `json:"code,omitempty"` - // Message - Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` -} - -// ErrorResponse error response indicates Logic service is not able to process the incoming request. The -// error property contains the error details. -type ErrorResponse struct { - // Error - The error properties. - Error *ErrorProperties `json:"error,omitempty"` -} - -// Expression the expression. -type Expression struct { - // Text - The text. - Text *string `json:"text,omitempty"` - Value interface{} `json:"value,omitempty"` - // Subexpressions - The sub expressions. - Subexpressions *[]Expression `json:"subexpressions,omitempty"` - Error *AzureResourceErrorInfo `json:"error,omitempty"` -} - -// ExpressionRoot the expression root. -type ExpressionRoot struct { - // Path - The path. - Path *string `json:"path,omitempty"` - // Text - The text. - Text *string `json:"text,omitempty"` - Value interface{} `json:"value,omitempty"` - // Subexpressions - The sub expressions. - Subexpressions *[]Expression `json:"subexpressions,omitempty"` - Error *AzureResourceErrorInfo `json:"error,omitempty"` -} - -// ExpressionTraces the expression traces. -type ExpressionTraces struct { - autorest.Response `json:"-"` - Inputs *[]ExpressionRoot `json:"inputs,omitempty"` -} - -// ExtendedErrorInfo the extended error info. -type ExtendedErrorInfo struct { - // Code - The error code. Possible values include: 'ErrorResponseCodeNotSpecified', 'ErrorResponseCodeIntegrationServiceEnvironmentNotFound', 'ErrorResponseCodeInternalServerError', 'ErrorResponseCodeInvalidOperationID' - Code ErrorResponseCode `json:"code,omitempty"` - // Message - The error message. - Message *string `json:"message,omitempty"` - // Details - The error message details. - Details *[]ExtendedErrorInfo `json:"details,omitempty"` - // InnerError - The inner error. - InnerError interface{} `json:"innerError,omitempty"` -} - -// FlowAccessControlConfiguration the access control configuration. -type FlowAccessControlConfiguration struct { - // Triggers - The access control configuration for invoking workflow triggers. - Triggers *FlowAccessControlConfigurationPolicy `json:"triggers,omitempty"` - // Contents - The access control configuration for accessing workflow run contents. - Contents *FlowAccessControlConfigurationPolicy `json:"contents,omitempty"` - // Actions - The access control configuration for workflow actions. - Actions *FlowAccessControlConfigurationPolicy `json:"actions,omitempty"` - // WorkflowManagement - The access control configuration for workflow management. - WorkflowManagement *FlowAccessControlConfigurationPolicy `json:"workflowManagement,omitempty"` -} - -// FlowAccessControlConfigurationPolicy the access control configuration policy. -type FlowAccessControlConfigurationPolicy struct { - // AllowedCallerIPAddresses - The allowed caller IP address ranges. - AllowedCallerIPAddresses *[]IPAddressRange `json:"allowedCallerIpAddresses,omitempty"` - // OpenAuthenticationPolicies - The authentication policies for workflow. - OpenAuthenticationPolicies *OpenAuthenticationAccessPolicies `json:"openAuthenticationPolicies,omitempty"` -} - -// FlowEndpoints the flow endpoints configuration. -type FlowEndpoints struct { - // OutgoingIPAddresses - The outgoing ip address. - OutgoingIPAddresses *[]IPAddress `json:"outgoingIpAddresses,omitempty"` - // AccessEndpointIPAddresses - The access endpoint ip address. - AccessEndpointIPAddresses *[]IPAddress `json:"accessEndpointIpAddresses,omitempty"` -} - -// FlowEndpointsConfiguration the endpoints configuration. -type FlowEndpointsConfiguration struct { - // Workflow - The workflow endpoints. - Workflow *FlowEndpoints `json:"workflow,omitempty"` - // Connector - The connector endpoints. - Connector *FlowEndpoints `json:"connector,omitempty"` -} - -// GenerateUpgradedDefinitionParameters the parameters to generate upgraded definition. -type GenerateUpgradedDefinitionParameters struct { - // TargetSchemaVersion - The target schema version. - TargetSchemaVersion *string `json:"targetSchemaVersion,omitempty"` -} - -// GetCallbackURLParameters the callback url parameters. -type GetCallbackURLParameters struct { - // NotAfter - The expiry time. - NotAfter *date.Time `json:"notAfter,omitempty"` - // KeyType - The key type. Possible values include: 'KeyTypeNotSpecified', 'KeyTypePrimary', 'KeyTypeSecondary' - KeyType KeyType `json:"keyType,omitempty"` -} - -// IntegrationAccount the integration account. -type IntegrationAccount struct { - autorest.Response `json:"-"` - // IntegrationAccountProperties - The integration account properties. - *IntegrationAccountProperties `json:"properties,omitempty"` - // Sku - The sku. - Sku *IntegrationAccountSku `json:"sku,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccount. -func (ia IntegrationAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ia.IntegrationAccountProperties != nil { - objectMap["properties"] = ia.IntegrationAccountProperties - } - if ia.Sku != nil { - objectMap["sku"] = ia.Sku - } - if ia.Location != nil { - objectMap["location"] = ia.Location - } - if ia.Tags != nil { - objectMap["tags"] = ia.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccount struct. -func (ia *IntegrationAccount) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountProperties IntegrationAccountProperties - err = json.Unmarshal(*v, &integrationAccountProperties) - if err != nil { - return err - } - ia.IntegrationAccountProperties = &integrationAccountProperties - } - case "sku": - if v != nil { - var sku IntegrationAccountSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - ia.Sku = &sku - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ia.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ia.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ia.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ia.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ia.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountAgreement the integration account agreement. -type IntegrationAccountAgreement struct { - autorest.Response `json:"-"` - // IntegrationAccountAgreementProperties - The integration account agreement properties. - *IntegrationAccountAgreementProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountAgreement. -func (iaa IntegrationAccountAgreement) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iaa.IntegrationAccountAgreementProperties != nil { - objectMap["properties"] = iaa.IntegrationAccountAgreementProperties - } - if iaa.Location != nil { - objectMap["location"] = iaa.Location - } - if iaa.Tags != nil { - objectMap["tags"] = iaa.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccountAgreement struct. -func (iaa *IntegrationAccountAgreement) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountAgreementProperties IntegrationAccountAgreementProperties - err = json.Unmarshal(*v, &integrationAccountAgreementProperties) - if err != nil { - return err - } - iaa.IntegrationAccountAgreementProperties = &integrationAccountAgreementProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iaa.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iaa.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iaa.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - iaa.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - iaa.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountAgreementFilter the integration account agreement filter for odata query. -type IntegrationAccountAgreementFilter struct { - // AgreementType - The agreement type of integration account agreement. Possible values include: 'AgreementTypeNotSpecified', 'AgreementTypeAS2', 'AgreementTypeX12', 'AgreementTypeEdifact' - AgreementType AgreementType `json:"agreementType,omitempty"` -} - -// IntegrationAccountAgreementListResult the list of integration account agreements. -type IntegrationAccountAgreementListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration account agreements. - Value *[]IntegrationAccountAgreement `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountAgreementListResultIterator provides access to a complete listing of -// IntegrationAccountAgreement values. -type IntegrationAccountAgreementListResultIterator struct { - i int - page IntegrationAccountAgreementListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountAgreementListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountAgreementListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountAgreementListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountAgreementListResultIterator) Response() IntegrationAccountAgreementListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountAgreementListResultIterator) Value() IntegrationAccountAgreement { - if !iter.page.NotDone() { - return IntegrationAccountAgreement{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountAgreementListResultIterator type. -func NewIntegrationAccountAgreementListResultIterator(page IntegrationAccountAgreementListResultPage) IntegrationAccountAgreementListResultIterator { - return IntegrationAccountAgreementListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iaalr IntegrationAccountAgreementListResult) IsEmpty() bool { - return iaalr.Value == nil || len(*iaalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iaalr IntegrationAccountAgreementListResult) hasNextLink() bool { - return iaalr.NextLink != nil && len(*iaalr.NextLink) != 0 -} - -// integrationAccountAgreementListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iaalr IntegrationAccountAgreementListResult) integrationAccountAgreementListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iaalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iaalr.NextLink))) -} - -// IntegrationAccountAgreementListResultPage contains a page of IntegrationAccountAgreement values. -type IntegrationAccountAgreementListResultPage struct { - fn func(context.Context, IntegrationAccountAgreementListResult) (IntegrationAccountAgreementListResult, error) - iaalr IntegrationAccountAgreementListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountAgreementListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iaalr) - if err != nil { - return err - } - page.iaalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountAgreementListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountAgreementListResultPage) NotDone() bool { - return !page.iaalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountAgreementListResultPage) Response() IntegrationAccountAgreementListResult { - return page.iaalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountAgreementListResultPage) Values() []IntegrationAccountAgreement { - if page.iaalr.IsEmpty() { - return nil - } - return *page.iaalr.Value -} - -// Creates a new instance of the IntegrationAccountAgreementListResultPage type. -func NewIntegrationAccountAgreementListResultPage(cur IntegrationAccountAgreementListResult, getNextPage func(context.Context, IntegrationAccountAgreementListResult) (IntegrationAccountAgreementListResult, error)) IntegrationAccountAgreementListResultPage { - return IntegrationAccountAgreementListResultPage{ - fn: getNextPage, - iaalr: cur, - } -} - -// IntegrationAccountAgreementProperties the integration account agreement properties. -type IntegrationAccountAgreementProperties struct { - // CreatedTime - READ-ONLY; The created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` - // AgreementType - The agreement type. Possible values include: 'AgreementTypeNotSpecified', 'AgreementTypeAS2', 'AgreementTypeX12', 'AgreementTypeEdifact' - AgreementType AgreementType `json:"agreementType,omitempty"` - // HostPartner - The integration account partner that is set as host partner for this agreement. - HostPartner *string `json:"hostPartner,omitempty"` - // GuestPartner - The integration account partner that is set as guest partner for this agreement. - GuestPartner *string `json:"guestPartner,omitempty"` - // HostIdentity - The business identity of the host partner. - HostIdentity *BusinessIdentity `json:"hostIdentity,omitempty"` - // GuestIdentity - The business identity of the guest partner. - GuestIdentity *BusinessIdentity `json:"guestIdentity,omitempty"` - // Content - The agreement content. - Content *AgreementContent `json:"content,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountAgreementProperties. -func (iaap IntegrationAccountAgreementProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iaap.Metadata != nil { - objectMap["metadata"] = iaap.Metadata - } - if iaap.AgreementType != "" { - objectMap["agreementType"] = iaap.AgreementType - } - if iaap.HostPartner != nil { - objectMap["hostPartner"] = iaap.HostPartner - } - if iaap.GuestPartner != nil { - objectMap["guestPartner"] = iaap.GuestPartner - } - if iaap.HostIdentity != nil { - objectMap["hostIdentity"] = iaap.HostIdentity - } - if iaap.GuestIdentity != nil { - objectMap["guestIdentity"] = iaap.GuestIdentity - } - if iaap.Content != nil { - objectMap["content"] = iaap.Content - } - return json.Marshal(objectMap) -} - -// IntegrationAccountCertificate the integration account certificate. -type IntegrationAccountCertificate struct { - autorest.Response `json:"-"` - // IntegrationAccountCertificateProperties - The integration account certificate properties. - *IntegrationAccountCertificateProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountCertificate. -func (iac IntegrationAccountCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iac.IntegrationAccountCertificateProperties != nil { - objectMap["properties"] = iac.IntegrationAccountCertificateProperties - } - if iac.Location != nil { - objectMap["location"] = iac.Location - } - if iac.Tags != nil { - objectMap["tags"] = iac.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccountCertificate struct. -func (iac *IntegrationAccountCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountCertificateProperties IntegrationAccountCertificateProperties - err = json.Unmarshal(*v, &integrationAccountCertificateProperties) - if err != nil { - return err - } - iac.IntegrationAccountCertificateProperties = &integrationAccountCertificateProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iac.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iac.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iac.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - iac.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - iac.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountCertificateListResult the list of integration account certificates. -type IntegrationAccountCertificateListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration account certificates. - Value *[]IntegrationAccountCertificate `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountCertificateListResultIterator provides access to a complete listing of -// IntegrationAccountCertificate values. -type IntegrationAccountCertificateListResultIterator struct { - i int - page IntegrationAccountCertificateListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountCertificateListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificateListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountCertificateListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountCertificateListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountCertificateListResultIterator) Response() IntegrationAccountCertificateListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountCertificateListResultIterator) Value() IntegrationAccountCertificate { - if !iter.page.NotDone() { - return IntegrationAccountCertificate{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountCertificateListResultIterator type. -func NewIntegrationAccountCertificateListResultIterator(page IntegrationAccountCertificateListResultPage) IntegrationAccountCertificateListResultIterator { - return IntegrationAccountCertificateListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iaclr IntegrationAccountCertificateListResult) IsEmpty() bool { - return iaclr.Value == nil || len(*iaclr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iaclr IntegrationAccountCertificateListResult) hasNextLink() bool { - return iaclr.NextLink != nil && len(*iaclr.NextLink) != 0 -} - -// integrationAccountCertificateListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iaclr IntegrationAccountCertificateListResult) integrationAccountCertificateListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iaclr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iaclr.NextLink))) -} - -// IntegrationAccountCertificateListResultPage contains a page of IntegrationAccountCertificate values. -type IntegrationAccountCertificateListResultPage struct { - fn func(context.Context, IntegrationAccountCertificateListResult) (IntegrationAccountCertificateListResult, error) - iaclr IntegrationAccountCertificateListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountCertificateListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificateListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iaclr) - if err != nil { - return err - } - page.iaclr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountCertificateListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountCertificateListResultPage) NotDone() bool { - return !page.iaclr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountCertificateListResultPage) Response() IntegrationAccountCertificateListResult { - return page.iaclr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountCertificateListResultPage) Values() []IntegrationAccountCertificate { - if page.iaclr.IsEmpty() { - return nil - } - return *page.iaclr.Value -} - -// Creates a new instance of the IntegrationAccountCertificateListResultPage type. -func NewIntegrationAccountCertificateListResultPage(cur IntegrationAccountCertificateListResult, getNextPage func(context.Context, IntegrationAccountCertificateListResult) (IntegrationAccountCertificateListResult, error)) IntegrationAccountCertificateListResultPage { - return IntegrationAccountCertificateListResultPage{ - fn: getNextPage, - iaclr: cur, - } -} - -// IntegrationAccountCertificateProperties the integration account certificate properties. -type IntegrationAccountCertificateProperties struct { - // CreatedTime - READ-ONLY; The created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` - // Key - The key details in the key vault. - Key *KeyVaultKeyReference `json:"key,omitempty"` - // PublicCertificate - The public certificate. - PublicCertificate *string `json:"publicCertificate,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountCertificateProperties. -func (iacp IntegrationAccountCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iacp.Metadata != nil { - objectMap["metadata"] = iacp.Metadata - } - if iacp.Key != nil { - objectMap["key"] = iacp.Key - } - if iacp.PublicCertificate != nil { - objectMap["publicCertificate"] = iacp.PublicCertificate - } - return json.Marshal(objectMap) -} - -// IntegrationAccountListResult the list of integration accounts. -type IntegrationAccountListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration accounts. - Value *[]IntegrationAccount `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountListResultIterator provides access to a complete listing of IntegrationAccount values. -type IntegrationAccountListResultIterator struct { - i int - page IntegrationAccountListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountListResultIterator) Response() IntegrationAccountListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountListResultIterator) Value() IntegrationAccount { - if !iter.page.NotDone() { - return IntegrationAccount{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountListResultIterator type. -func NewIntegrationAccountListResultIterator(page IntegrationAccountListResultPage) IntegrationAccountListResultIterator { - return IntegrationAccountListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ialr IntegrationAccountListResult) IsEmpty() bool { - return ialr.Value == nil || len(*ialr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ialr IntegrationAccountListResult) hasNextLink() bool { - return ialr.NextLink != nil && len(*ialr.NextLink) != 0 -} - -// integrationAccountListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ialr IntegrationAccountListResult) integrationAccountListResultPreparer(ctx context.Context) (*http.Request, error) { - if !ialr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ialr.NextLink))) -} - -// IntegrationAccountListResultPage contains a page of IntegrationAccount values. -type IntegrationAccountListResultPage struct { - fn func(context.Context, IntegrationAccountListResult) (IntegrationAccountListResult, error) - ialr IntegrationAccountListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.ialr) - if err != nil { - return err - } - page.ialr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountListResultPage) NotDone() bool { - return !page.ialr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountListResultPage) Response() IntegrationAccountListResult { - return page.ialr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountListResultPage) Values() []IntegrationAccount { - if page.ialr.IsEmpty() { - return nil - } - return *page.ialr.Value -} - -// Creates a new instance of the IntegrationAccountListResultPage type. -func NewIntegrationAccountListResultPage(cur IntegrationAccountListResult, getNextPage func(context.Context, IntegrationAccountListResult) (IntegrationAccountListResult, error)) IntegrationAccountListResultPage { - return IntegrationAccountListResultPage{ - fn: getNextPage, - ialr: cur, - } -} - -// IntegrationAccountMap the integration account map. -type IntegrationAccountMap struct { - autorest.Response `json:"-"` - // IntegrationAccountMapProperties - The integration account map properties. - *IntegrationAccountMapProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountMap. -func (iam IntegrationAccountMap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iam.IntegrationAccountMapProperties != nil { - objectMap["properties"] = iam.IntegrationAccountMapProperties - } - if iam.Location != nil { - objectMap["location"] = iam.Location - } - if iam.Tags != nil { - objectMap["tags"] = iam.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccountMap struct. -func (iam *IntegrationAccountMap) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountMapProperties IntegrationAccountMapProperties - err = json.Unmarshal(*v, &integrationAccountMapProperties) - if err != nil { - return err - } - iam.IntegrationAccountMapProperties = &integrationAccountMapProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iam.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iam.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iam.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - iam.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - iam.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountMapFilter the integration account map filter for odata query. -type IntegrationAccountMapFilter struct { - // MapType - The map type of integration account map. Possible values include: 'MapTypeNotSpecified', 'MapTypeXslt', 'MapTypeXslt20', 'MapTypeXslt30', 'MapTypeLiquid' - MapType MapType `json:"mapType,omitempty"` -} - -// IntegrationAccountMapListResult the list of integration account maps. -type IntegrationAccountMapListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration account maps. - Value *[]IntegrationAccountMap `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountMapListResultIterator provides access to a complete listing of IntegrationAccountMap -// values. -type IntegrationAccountMapListResultIterator struct { - i int - page IntegrationAccountMapListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountMapListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountMapListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountMapListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountMapListResultIterator) Response() IntegrationAccountMapListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountMapListResultIterator) Value() IntegrationAccountMap { - if !iter.page.NotDone() { - return IntegrationAccountMap{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountMapListResultIterator type. -func NewIntegrationAccountMapListResultIterator(page IntegrationAccountMapListResultPage) IntegrationAccountMapListResultIterator { - return IntegrationAccountMapListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iamlr IntegrationAccountMapListResult) IsEmpty() bool { - return iamlr.Value == nil || len(*iamlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iamlr IntegrationAccountMapListResult) hasNextLink() bool { - return iamlr.NextLink != nil && len(*iamlr.NextLink) != 0 -} - -// integrationAccountMapListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iamlr IntegrationAccountMapListResult) integrationAccountMapListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iamlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iamlr.NextLink))) -} - -// IntegrationAccountMapListResultPage contains a page of IntegrationAccountMap values. -type IntegrationAccountMapListResultPage struct { - fn func(context.Context, IntegrationAccountMapListResult) (IntegrationAccountMapListResult, error) - iamlr IntegrationAccountMapListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountMapListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iamlr) - if err != nil { - return err - } - page.iamlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountMapListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountMapListResultPage) NotDone() bool { - return !page.iamlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountMapListResultPage) Response() IntegrationAccountMapListResult { - return page.iamlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountMapListResultPage) Values() []IntegrationAccountMap { - if page.iamlr.IsEmpty() { - return nil - } - return *page.iamlr.Value -} - -// Creates a new instance of the IntegrationAccountMapListResultPage type. -func NewIntegrationAccountMapListResultPage(cur IntegrationAccountMapListResult, getNextPage func(context.Context, IntegrationAccountMapListResult) (IntegrationAccountMapListResult, error)) IntegrationAccountMapListResultPage { - return IntegrationAccountMapListResultPage{ - fn: getNextPage, - iamlr: cur, - } -} - -// IntegrationAccountMapProperties the integration account map. -type IntegrationAccountMapProperties struct { - // MapType - The map type. Possible values include: 'MapTypeNotSpecified', 'MapTypeXslt', 'MapTypeXslt20', 'MapTypeXslt30', 'MapTypeLiquid' - MapType MapType `json:"mapType,omitempty"` - // ParametersSchema - The parameters schema of integration account map. - ParametersSchema *IntegrationAccountMapPropertiesParametersSchema `json:"parametersSchema,omitempty"` - // CreatedTime - READ-ONLY; The created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // Content - The content. - Content *string `json:"content,omitempty"` - // ContentType - The content type. - ContentType *string `json:"contentType,omitempty"` - // ContentLink - READ-ONLY; The content link. - ContentLink *ContentLink `json:"contentLink,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountMapProperties. -func (iamp IntegrationAccountMapProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iamp.MapType != "" { - objectMap["mapType"] = iamp.MapType - } - if iamp.ParametersSchema != nil { - objectMap["parametersSchema"] = iamp.ParametersSchema - } - if iamp.Content != nil { - objectMap["content"] = iamp.Content - } - if iamp.ContentType != nil { - objectMap["contentType"] = iamp.ContentType - } - if iamp.Metadata != nil { - objectMap["metadata"] = iamp.Metadata - } - return json.Marshal(objectMap) -} - -// IntegrationAccountMapPropertiesParametersSchema the parameters schema of integration account map. -type IntegrationAccountMapPropertiesParametersSchema struct { - // Ref - The reference name. - Ref *string `json:"ref,omitempty"` -} - -// IntegrationAccountPartner the integration account partner. -type IntegrationAccountPartner struct { - autorest.Response `json:"-"` - // IntegrationAccountPartnerProperties - The integration account partner properties. - *IntegrationAccountPartnerProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountPartner. -func (iap IntegrationAccountPartner) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iap.IntegrationAccountPartnerProperties != nil { - objectMap["properties"] = iap.IntegrationAccountPartnerProperties - } - if iap.Location != nil { - objectMap["location"] = iap.Location - } - if iap.Tags != nil { - objectMap["tags"] = iap.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccountPartner struct. -func (iap *IntegrationAccountPartner) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountPartnerProperties IntegrationAccountPartnerProperties - err = json.Unmarshal(*v, &integrationAccountPartnerProperties) - if err != nil { - return err - } - iap.IntegrationAccountPartnerProperties = &integrationAccountPartnerProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iap.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iap.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - iap.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - iap.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - iap.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountPartnerFilter the integration account partner filter for odata query. -type IntegrationAccountPartnerFilter struct { - // PartnerType - The partner type of integration account partner. Possible values include: 'PartnerTypeNotSpecified', 'PartnerTypeB2B' - PartnerType PartnerType `json:"partnerType,omitempty"` -} - -// IntegrationAccountPartnerListResult the list of integration account partners. -type IntegrationAccountPartnerListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration account partners. - Value *[]IntegrationAccountPartner `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountPartnerListResultIterator provides access to a complete listing of -// IntegrationAccountPartner values. -type IntegrationAccountPartnerListResultIterator struct { - i int - page IntegrationAccountPartnerListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountPartnerListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnerListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountPartnerListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountPartnerListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountPartnerListResultIterator) Response() IntegrationAccountPartnerListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountPartnerListResultIterator) Value() IntegrationAccountPartner { - if !iter.page.NotDone() { - return IntegrationAccountPartner{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountPartnerListResultIterator type. -func NewIntegrationAccountPartnerListResultIterator(page IntegrationAccountPartnerListResultPage) IntegrationAccountPartnerListResultIterator { - return IntegrationAccountPartnerListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iaplr IntegrationAccountPartnerListResult) IsEmpty() bool { - return iaplr.Value == nil || len(*iaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iaplr IntegrationAccountPartnerListResult) hasNextLink() bool { - return iaplr.NextLink != nil && len(*iaplr.NextLink) != 0 -} - -// integrationAccountPartnerListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iaplr IntegrationAccountPartnerListResult) integrationAccountPartnerListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iaplr.NextLink))) -} - -// IntegrationAccountPartnerListResultPage contains a page of IntegrationAccountPartner values. -type IntegrationAccountPartnerListResultPage struct { - fn func(context.Context, IntegrationAccountPartnerListResult) (IntegrationAccountPartnerListResult, error) - iaplr IntegrationAccountPartnerListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountPartnerListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnerListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iaplr) - if err != nil { - return err - } - page.iaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountPartnerListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountPartnerListResultPage) NotDone() bool { - return !page.iaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountPartnerListResultPage) Response() IntegrationAccountPartnerListResult { - return page.iaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountPartnerListResultPage) Values() []IntegrationAccountPartner { - if page.iaplr.IsEmpty() { - return nil - } - return *page.iaplr.Value -} - -// Creates a new instance of the IntegrationAccountPartnerListResultPage type. -func NewIntegrationAccountPartnerListResultPage(cur IntegrationAccountPartnerListResult, getNextPage func(context.Context, IntegrationAccountPartnerListResult) (IntegrationAccountPartnerListResult, error)) IntegrationAccountPartnerListResultPage { - return IntegrationAccountPartnerListResultPage{ - fn: getNextPage, - iaplr: cur, - } -} - -// IntegrationAccountPartnerProperties the integration account partner properties. -type IntegrationAccountPartnerProperties struct { - // PartnerType - The partner type. Possible values include: 'PartnerTypeNotSpecified', 'PartnerTypeB2B' - PartnerType PartnerType `json:"partnerType,omitempty"` - // CreatedTime - READ-ONLY; The created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` - // Content - The partner content. - Content *PartnerContent `json:"content,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountPartnerProperties. -func (iapp IntegrationAccountPartnerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iapp.PartnerType != "" { - objectMap["partnerType"] = iapp.PartnerType - } - if iapp.Metadata != nil { - objectMap["metadata"] = iapp.Metadata - } - if iapp.Content != nil { - objectMap["content"] = iapp.Content - } - return json.Marshal(objectMap) -} - -// IntegrationAccountProperties the integration account properties. -type IntegrationAccountProperties struct { - // IntegrationServiceEnvironment - The integration service environment. - IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` - // State - The workflow state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` -} - -// IntegrationAccountSchema the integration account schema. -type IntegrationAccountSchema struct { - autorest.Response `json:"-"` - // IntegrationAccountSchemaProperties - The integration account schema properties. - *IntegrationAccountSchemaProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountSchema. -func (ias IntegrationAccountSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ias.IntegrationAccountSchemaProperties != nil { - objectMap["properties"] = ias.IntegrationAccountSchemaProperties - } - if ias.Location != nil { - objectMap["location"] = ias.Location - } - if ias.Tags != nil { - objectMap["tags"] = ias.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccountSchema struct. -func (ias *IntegrationAccountSchema) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountSchemaProperties IntegrationAccountSchemaProperties - err = json.Unmarshal(*v, &integrationAccountSchemaProperties) - if err != nil { - return err - } - ias.IntegrationAccountSchemaProperties = &integrationAccountSchemaProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ias.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ias.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ias.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ias.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ias.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountSchemaFilter the integration account schema filter for odata query. -type IntegrationAccountSchemaFilter struct { - // SchemaType - The schema type of integration account schema. Possible values include: 'SchemaTypeNotSpecified', 'SchemaTypeXML' - SchemaType SchemaType `json:"schemaType,omitempty"` -} - -// IntegrationAccountSchemaListResult the list of integration account schemas. -type IntegrationAccountSchemaListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration account schemas. - Value *[]IntegrationAccountSchema `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountSchemaListResultIterator provides access to a complete listing of -// IntegrationAccountSchema values. -type IntegrationAccountSchemaListResultIterator struct { - i int - page IntegrationAccountSchemaListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountSchemaListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemaListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountSchemaListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountSchemaListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountSchemaListResultIterator) Response() IntegrationAccountSchemaListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountSchemaListResultIterator) Value() IntegrationAccountSchema { - if !iter.page.NotDone() { - return IntegrationAccountSchema{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountSchemaListResultIterator type. -func NewIntegrationAccountSchemaListResultIterator(page IntegrationAccountSchemaListResultPage) IntegrationAccountSchemaListResultIterator { - return IntegrationAccountSchemaListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iaslr IntegrationAccountSchemaListResult) IsEmpty() bool { - return iaslr.Value == nil || len(*iaslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iaslr IntegrationAccountSchemaListResult) hasNextLink() bool { - return iaslr.NextLink != nil && len(*iaslr.NextLink) != 0 -} - -// integrationAccountSchemaListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iaslr IntegrationAccountSchemaListResult) integrationAccountSchemaListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iaslr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iaslr.NextLink))) -} - -// IntegrationAccountSchemaListResultPage contains a page of IntegrationAccountSchema values. -type IntegrationAccountSchemaListResultPage struct { - fn func(context.Context, IntegrationAccountSchemaListResult) (IntegrationAccountSchemaListResult, error) - iaslr IntegrationAccountSchemaListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountSchemaListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemaListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iaslr) - if err != nil { - return err - } - page.iaslr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountSchemaListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountSchemaListResultPage) NotDone() bool { - return !page.iaslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountSchemaListResultPage) Response() IntegrationAccountSchemaListResult { - return page.iaslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountSchemaListResultPage) Values() []IntegrationAccountSchema { - if page.iaslr.IsEmpty() { - return nil - } - return *page.iaslr.Value -} - -// Creates a new instance of the IntegrationAccountSchemaListResultPage type. -func NewIntegrationAccountSchemaListResultPage(cur IntegrationAccountSchemaListResult, getNextPage func(context.Context, IntegrationAccountSchemaListResult) (IntegrationAccountSchemaListResult, error)) IntegrationAccountSchemaListResultPage { - return IntegrationAccountSchemaListResultPage{ - fn: getNextPage, - iaslr: cur, - } -} - -// IntegrationAccountSchemaProperties the integration account schema properties. -type IntegrationAccountSchemaProperties struct { - // SchemaType - The schema type. Possible values include: 'SchemaTypeNotSpecified', 'SchemaTypeXML' - SchemaType SchemaType `json:"schemaType,omitempty"` - // TargetNamespace - The target namespace of the schema. - TargetNamespace *string `json:"targetNamespace,omitempty"` - // DocumentName - The document name. - DocumentName *string `json:"documentName,omitempty"` - // FileName - The file name. - FileName *string `json:"fileName,omitempty"` - // CreatedTime - READ-ONLY; The created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` - // Content - The content. - Content *string `json:"content,omitempty"` - // ContentType - The content type. - ContentType *string `json:"contentType,omitempty"` - // ContentLink - READ-ONLY; The content link. - ContentLink *ContentLink `json:"contentLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountSchemaProperties. -func (iasp IntegrationAccountSchemaProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iasp.SchemaType != "" { - objectMap["schemaType"] = iasp.SchemaType - } - if iasp.TargetNamespace != nil { - objectMap["targetNamespace"] = iasp.TargetNamespace - } - if iasp.DocumentName != nil { - objectMap["documentName"] = iasp.DocumentName - } - if iasp.FileName != nil { - objectMap["fileName"] = iasp.FileName - } - if iasp.Metadata != nil { - objectMap["metadata"] = iasp.Metadata - } - if iasp.Content != nil { - objectMap["content"] = iasp.Content - } - if iasp.ContentType != nil { - objectMap["contentType"] = iasp.ContentType - } - return json.Marshal(objectMap) -} - -// IntegrationAccountSession the integration account session. -type IntegrationAccountSession struct { - autorest.Response `json:"-"` - // IntegrationAccountSessionProperties - The integration account session properties. - *IntegrationAccountSessionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountSession. -func (ias IntegrationAccountSession) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ias.IntegrationAccountSessionProperties != nil { - objectMap["properties"] = ias.IntegrationAccountSessionProperties - } - if ias.Location != nil { - objectMap["location"] = ias.Location - } - if ias.Tags != nil { - objectMap["tags"] = ias.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationAccountSession struct. -func (ias *IntegrationAccountSession) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationAccountSessionProperties IntegrationAccountSessionProperties - err = json.Unmarshal(*v, &integrationAccountSessionProperties) - if err != nil { - return err - } - ias.IntegrationAccountSessionProperties = &integrationAccountSessionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ias.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ias.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ias.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ias.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ias.Tags = tags - } - } - } - - return nil -} - -// IntegrationAccountSessionFilter the integration account session filter. -type IntegrationAccountSessionFilter struct { - // ChangedTime - The changed time of integration account sessions. - ChangedTime *date.Time `json:"changedTime,omitempty"` -} - -// IntegrationAccountSessionListResult the list of integration account sessions. -type IntegrationAccountSessionListResult struct { - autorest.Response `json:"-"` - // Value - The list of integration account sessions. - Value *[]IntegrationAccountSession `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationAccountSessionListResultIterator provides access to a complete listing of -// IntegrationAccountSession values. -type IntegrationAccountSessionListResultIterator struct { - i int - page IntegrationAccountSessionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationAccountSessionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationAccountSessionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationAccountSessionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationAccountSessionListResultIterator) Response() IntegrationAccountSessionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationAccountSessionListResultIterator) Value() IntegrationAccountSession { - if !iter.page.NotDone() { - return IntegrationAccountSession{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationAccountSessionListResultIterator type. -func NewIntegrationAccountSessionListResultIterator(page IntegrationAccountSessionListResultPage) IntegrationAccountSessionListResultIterator { - return IntegrationAccountSessionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iaslr IntegrationAccountSessionListResult) IsEmpty() bool { - return iaslr.Value == nil || len(*iaslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iaslr IntegrationAccountSessionListResult) hasNextLink() bool { - return iaslr.NextLink != nil && len(*iaslr.NextLink) != 0 -} - -// integrationAccountSessionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iaslr IntegrationAccountSessionListResult) integrationAccountSessionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iaslr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iaslr.NextLink))) -} - -// IntegrationAccountSessionListResultPage contains a page of IntegrationAccountSession values. -type IntegrationAccountSessionListResultPage struct { - fn func(context.Context, IntegrationAccountSessionListResult) (IntegrationAccountSessionListResult, error) - iaslr IntegrationAccountSessionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationAccountSessionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iaslr) - if err != nil { - return err - } - page.iaslr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationAccountSessionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationAccountSessionListResultPage) NotDone() bool { - return !page.iaslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationAccountSessionListResultPage) Response() IntegrationAccountSessionListResult { - return page.iaslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationAccountSessionListResultPage) Values() []IntegrationAccountSession { - if page.iaslr.IsEmpty() { - return nil - } - return *page.iaslr.Value -} - -// Creates a new instance of the IntegrationAccountSessionListResultPage type. -func NewIntegrationAccountSessionListResultPage(cur IntegrationAccountSessionListResult, getNextPage func(context.Context, IntegrationAccountSessionListResult) (IntegrationAccountSessionListResult, error)) IntegrationAccountSessionListResultPage { - return IntegrationAccountSessionListResultPage{ - fn: getNextPage, - iaslr: cur, - } -} - -// IntegrationAccountSessionProperties the integration account session properties. -type IntegrationAccountSessionProperties struct { - // CreatedTime - READ-ONLY; The created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // Content - The session content. - Content interface{} `json:"content,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationAccountSessionProperties. -func (iasp IntegrationAccountSessionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iasp.Content != nil { - objectMap["content"] = iasp.Content - } - return json.Marshal(objectMap) -} - -// IntegrationAccountSku the integration account sku. -type IntegrationAccountSku struct { - // Name - The sku name. Possible values include: 'IntegrationAccountSkuNameNotSpecified', 'IntegrationAccountSkuNameFree', 'IntegrationAccountSkuNameBasic', 'IntegrationAccountSkuNameStandard' - Name IntegrationAccountSkuName `json:"name,omitempty"` -} - -// IntegrationServiceEnvironmenEncryptionConfiguration the encryption configuration for the integration -// service environment. -type IntegrationServiceEnvironmenEncryptionConfiguration struct { - // EncryptionKeyReference - The encryption key reference. - EncryptionKeyReference *IntegrationServiceEnvironmenEncryptionKeyReference `json:"encryptionKeyReference,omitempty"` -} - -// IntegrationServiceEnvironmenEncryptionKeyReference the encryption key details for the integration -// service environment. -type IntegrationServiceEnvironmenEncryptionKeyReference struct { - // KeyVault - The key vault reference. - KeyVault *ResourceReference `json:"keyVault,omitempty"` - // KeyName - Gets the key name in the Key Vault. - KeyName *string `json:"keyName,omitempty"` - // KeyVersion - Gets the version of the key specified in the keyName property. - KeyVersion *string `json:"keyVersion,omitempty"` -} - -// IntegrationServiceEnvironment the integration service environment. -type IntegrationServiceEnvironment struct { - autorest.Response `json:"-"` - // Properties - The integration service environment properties. - Properties *IntegrationServiceEnvironmentProperties `json:"properties,omitempty"` - // Sku - The sku. - Sku *IntegrationServiceEnvironmentSku `json:"sku,omitempty"` - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationServiceEnvironment. -func (ise IntegrationServiceEnvironment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ise.Properties != nil { - objectMap["properties"] = ise.Properties - } - if ise.Sku != nil { - objectMap["sku"] = ise.Sku - } - if ise.Identity != nil { - objectMap["identity"] = ise.Identity - } - if ise.Location != nil { - objectMap["location"] = ise.Location - } - if ise.Tags != nil { - objectMap["tags"] = ise.Tags - } - return json.Marshal(objectMap) -} - -// IntegrationServiceEnvironmentAccessEndpoint the integration service environment access endpoint. -type IntegrationServiceEnvironmentAccessEndpoint struct { - // Type - The access endpoint type. Possible values include: 'IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified', 'IntegrationServiceEnvironmentAccessEndpointTypeExternal', 'IntegrationServiceEnvironmentAccessEndpointTypeInternal' - Type IntegrationServiceEnvironmentAccessEndpointType `json:"type,omitempty"` -} - -// IntegrationServiceEnvironmentListResult the list of integration service environments. -type IntegrationServiceEnvironmentListResult struct { - autorest.Response `json:"-"` - Value *[]IntegrationServiceEnvironment `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationServiceEnvironmentListResultIterator provides access to a complete listing of -// IntegrationServiceEnvironment values. -type IntegrationServiceEnvironmentListResultIterator struct { - i int - page IntegrationServiceEnvironmentListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationServiceEnvironmentListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationServiceEnvironmentListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationServiceEnvironmentListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationServiceEnvironmentListResultIterator) Response() IntegrationServiceEnvironmentListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationServiceEnvironmentListResultIterator) Value() IntegrationServiceEnvironment { - if !iter.page.NotDone() { - return IntegrationServiceEnvironment{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationServiceEnvironmentListResultIterator type. -func NewIntegrationServiceEnvironmentListResultIterator(page IntegrationServiceEnvironmentListResultPage) IntegrationServiceEnvironmentListResultIterator { - return IntegrationServiceEnvironmentListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (iselr IntegrationServiceEnvironmentListResult) IsEmpty() bool { - return iselr.Value == nil || len(*iselr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (iselr IntegrationServiceEnvironmentListResult) hasNextLink() bool { - return iselr.NextLink != nil && len(*iselr.NextLink) != 0 -} - -// integrationServiceEnvironmentListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (iselr IntegrationServiceEnvironmentListResult) integrationServiceEnvironmentListResultPreparer(ctx context.Context) (*http.Request, error) { - if !iselr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(iselr.NextLink))) -} - -// IntegrationServiceEnvironmentListResultPage contains a page of IntegrationServiceEnvironment values. -type IntegrationServiceEnvironmentListResultPage struct { - fn func(context.Context, IntegrationServiceEnvironmentListResult) (IntegrationServiceEnvironmentListResult, error) - iselr IntegrationServiceEnvironmentListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationServiceEnvironmentListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.iselr) - if err != nil { - return err - } - page.iselr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationServiceEnvironmentListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationServiceEnvironmentListResultPage) NotDone() bool { - return !page.iselr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationServiceEnvironmentListResultPage) Response() IntegrationServiceEnvironmentListResult { - return page.iselr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationServiceEnvironmentListResultPage) Values() []IntegrationServiceEnvironment { - if page.iselr.IsEmpty() { - return nil - } - return *page.iselr.Value -} - -// Creates a new instance of the IntegrationServiceEnvironmentListResultPage type. -func NewIntegrationServiceEnvironmentListResultPage(cur IntegrationServiceEnvironmentListResult, getNextPage func(context.Context, IntegrationServiceEnvironmentListResult) (IntegrationServiceEnvironmentListResult, error)) IntegrationServiceEnvironmentListResultPage { - return IntegrationServiceEnvironmentListResultPage{ - fn: getNextPage, - iselr: cur, - } -} - -// IntegrationServiceEnvironmentManagedAPI the integration service environment managed api. -type IntegrationServiceEnvironmentManagedAPI struct { - autorest.Response `json:"-"` - // IntegrationServiceEnvironmentManagedAPIProperties - The integration service environment managed api properties. - *IntegrationServiceEnvironmentManagedAPIProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for IntegrationServiceEnvironmentManagedAPI. -func (isema IntegrationServiceEnvironmentManagedAPI) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if isema.IntegrationServiceEnvironmentManagedAPIProperties != nil { - objectMap["properties"] = isema.IntegrationServiceEnvironmentManagedAPIProperties - } - if isema.Location != nil { - objectMap["location"] = isema.Location - } - if isema.Tags != nil { - objectMap["tags"] = isema.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for IntegrationServiceEnvironmentManagedAPI struct. -func (isema *IntegrationServiceEnvironmentManagedAPI) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var integrationServiceEnvironmentManagedAPIProperties IntegrationServiceEnvironmentManagedAPIProperties - err = json.Unmarshal(*v, &integrationServiceEnvironmentManagedAPIProperties) - if err != nil { - return err - } - isema.IntegrationServiceEnvironmentManagedAPIProperties = &integrationServiceEnvironmentManagedAPIProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - isema.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - isema.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - isema.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - isema.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - isema.Tags = tags - } - } - } - - return nil -} - -// IntegrationServiceEnvironmentManagedAPIDeploymentParameters the integration service environment managed -// api deployment parameters. -type IntegrationServiceEnvironmentManagedAPIDeploymentParameters struct { - // ContentLinkDefinition - The integration service environment managed api content link for deployment. - ContentLinkDefinition *ContentLink `json:"contentLinkDefinition,omitempty"` -} - -// IntegrationServiceEnvironmentManagedAPIListResult the list of integration service environment managed -// APIs. -type IntegrationServiceEnvironmentManagedAPIListResult struct { - autorest.Response `json:"-"` - // Value - The integration service environment managed APIs. - Value *[]IntegrationServiceEnvironmentManagedAPI `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationServiceEnvironmentManagedAPIListResultIterator provides access to a complete listing of -// IntegrationServiceEnvironmentManagedAPI values. -type IntegrationServiceEnvironmentManagedAPIListResultIterator struct { - i int - page IntegrationServiceEnvironmentManagedAPIListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationServiceEnvironmentManagedAPIListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedAPIListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationServiceEnvironmentManagedAPIListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationServiceEnvironmentManagedAPIListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationServiceEnvironmentManagedAPIListResultIterator) Response() IntegrationServiceEnvironmentManagedAPIListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationServiceEnvironmentManagedAPIListResultIterator) Value() IntegrationServiceEnvironmentManagedAPI { - if !iter.page.NotDone() { - return IntegrationServiceEnvironmentManagedAPI{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationServiceEnvironmentManagedAPIListResultIterator type. -func NewIntegrationServiceEnvironmentManagedAPIListResultIterator(page IntegrationServiceEnvironmentManagedAPIListResultPage) IntegrationServiceEnvironmentManagedAPIListResultIterator { - return IntegrationServiceEnvironmentManagedAPIListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (isemalr IntegrationServiceEnvironmentManagedAPIListResult) IsEmpty() bool { - return isemalr.Value == nil || len(*isemalr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (isemalr IntegrationServiceEnvironmentManagedAPIListResult) hasNextLink() bool { - return isemalr.NextLink != nil && len(*isemalr.NextLink) != 0 -} - -// integrationServiceEnvironmentManagedAPIListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (isemalr IntegrationServiceEnvironmentManagedAPIListResult) integrationServiceEnvironmentManagedAPIListResultPreparer(ctx context.Context) (*http.Request, error) { - if !isemalr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(isemalr.NextLink))) -} - -// IntegrationServiceEnvironmentManagedAPIListResultPage contains a page of -// IntegrationServiceEnvironmentManagedAPI values. -type IntegrationServiceEnvironmentManagedAPIListResultPage struct { - fn func(context.Context, IntegrationServiceEnvironmentManagedAPIListResult) (IntegrationServiceEnvironmentManagedAPIListResult, error) - isemalr IntegrationServiceEnvironmentManagedAPIListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationServiceEnvironmentManagedAPIListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentManagedAPIListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.isemalr) - if err != nil { - return err - } - page.isemalr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationServiceEnvironmentManagedAPIListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationServiceEnvironmentManagedAPIListResultPage) NotDone() bool { - return !page.isemalr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationServiceEnvironmentManagedAPIListResultPage) Response() IntegrationServiceEnvironmentManagedAPIListResult { - return page.isemalr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationServiceEnvironmentManagedAPIListResultPage) Values() []IntegrationServiceEnvironmentManagedAPI { - if page.isemalr.IsEmpty() { - return nil - } - return *page.isemalr.Value -} - -// Creates a new instance of the IntegrationServiceEnvironmentManagedAPIListResultPage type. -func NewIntegrationServiceEnvironmentManagedAPIListResultPage(cur IntegrationServiceEnvironmentManagedAPIListResult, getNextPage func(context.Context, IntegrationServiceEnvironmentManagedAPIListResult) (IntegrationServiceEnvironmentManagedAPIListResult, error)) IntegrationServiceEnvironmentManagedAPIListResultPage { - return IntegrationServiceEnvironmentManagedAPIListResultPage{ - fn: getNextPage, - isemalr: cur, - } -} - -// IntegrationServiceEnvironmentManagedAPIProperties the integration service environment managed api -// properties. -type IntegrationServiceEnvironmentManagedAPIProperties struct { - // DeploymentParameters - The integration service environment managed api deployment parameters. - DeploymentParameters *IntegrationServiceEnvironmentManagedAPIDeploymentParameters `json:"deploymentParameters,omitempty"` - // Name - READ-ONLY; The name - Name *string `json:"name,omitempty"` - // ConnectionParameters - READ-ONLY; The connection parameters. - ConnectionParameters map[string]interface{} `json:"connectionParameters"` - // Metadata - READ-ONLY; The metadata. - Metadata *APIResourceMetadata `json:"metadata,omitempty"` - // RuntimeUrls - READ-ONLY; The runtime urls. - RuntimeUrls *[]string `json:"runtimeUrls,omitempty"` - // GeneralInformation - READ-ONLY; The api general information. - GeneralInformation *APIResourceGeneralInformation `json:"generalInformation,omitempty"` - // Capabilities - READ-ONLY; The capabilities. - Capabilities *[]string `json:"capabilities,omitempty"` - // BackendService - READ-ONLY; The backend service. - BackendService *APIResourceBackendService `json:"backendService,omitempty"` - // Policies - READ-ONLY; The policies for the API. - Policies *APIResourcePolicies `json:"policies,omitempty"` - // APIDefinitionURL - READ-ONLY; The API definition. - APIDefinitionURL *string `json:"apiDefinitionUrl,omitempty"` - // APIDefinitions - READ-ONLY; The api definitions. - APIDefinitions *APIResourceDefinitions `json:"apiDefinitions,omitempty"` - // IntegrationServiceEnvironment - The integration service environment reference. - IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' - ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` - // Category - READ-ONLY; The category. Possible values include: 'APITierNotSpecified', 'APITierEnterprise', 'APITierStandard', 'APITierPremium' - Category APITier `json:"category,omitempty"` -} - -// MarshalJSON is the custom marshaler for IntegrationServiceEnvironmentManagedAPIProperties. -func (isemap IntegrationServiceEnvironmentManagedAPIProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if isemap.DeploymentParameters != nil { - objectMap["deploymentParameters"] = isemap.DeploymentParameters - } - if isemap.IntegrationServiceEnvironment != nil { - objectMap["integrationServiceEnvironment"] = isemap.IntegrationServiceEnvironment - } - return json.Marshal(objectMap) -} - -// IntegrationServiceEnvironmentManagedApisDeleteFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type IntegrationServiceEnvironmentManagedApisDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(IntegrationServiceEnvironmentManagedApisClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *IntegrationServiceEnvironmentManagedApisDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for IntegrationServiceEnvironmentManagedApisDeleteFuture.Result. -func (future *IntegrationServiceEnvironmentManagedApisDeleteFuture) result(client IntegrationServiceEnvironmentManagedApisClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("logic.IntegrationServiceEnvironmentManagedApisDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// IntegrationServiceEnvironmentManagedApisPutFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type IntegrationServiceEnvironmentManagedApisPutFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(IntegrationServiceEnvironmentManagedApisClient) (IntegrationServiceEnvironmentManagedAPI, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *IntegrationServiceEnvironmentManagedApisPutFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for IntegrationServiceEnvironmentManagedApisPutFuture.Result. -func (future *IntegrationServiceEnvironmentManagedApisPutFuture) result(client IntegrationServiceEnvironmentManagedApisClient) (isema IntegrationServiceEnvironmentManagedAPI, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisPutFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - isema.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("logic.IntegrationServiceEnvironmentManagedApisPutFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if isema.Response.Response, err = future.GetResult(sender); err == nil && isema.Response.Response.StatusCode != http.StatusNoContent { - isema, err = client.PutResponder(isema.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentManagedApisPutFuture", "Result", isema.Response.Response, "Failure responding to request") - } - } - return -} - -// IntegrationServiceEnvironmentNetworkDependency the azure async operation resource. -type IntegrationServiceEnvironmentNetworkDependency struct { - // Category - The network dependency category type. Possible values include: 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeNotSpecified', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureStorage', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureManagement', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAzureActiveDirectory', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSSLCertificateVerification', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeDiagnosticLogsAndMetrics', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeIntegrationServiceEnvironmentConnectors', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRedisCache', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeAccessEndpoints', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRecoveryService', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeSQL', 'IntegrationServiceEnvironmentNetworkDependencyCategoryTypeRegionalService' - Category IntegrationServiceEnvironmentNetworkDependencyCategoryType `json:"category,omitempty"` - // DisplayName - The display name. - DisplayName *string `json:"displayName,omitempty"` - // Endpoints - The endpoints. - Endpoints *[]IntegrationServiceEnvironmentNetworkEndpoint `json:"endpoints,omitempty"` -} - -// IntegrationServiceEnvironmentNetworkDependencyHealth the integration service environment subnet network -// health. -type IntegrationServiceEnvironmentNetworkDependencyHealth struct { - // Error - The error if any occurred during the operation. - Error *ExtendedErrorInfo `json:"error,omitempty"` - // State - The network dependency health state. Possible values include: 'IntegrationServiceEnvironmentNetworkDependencyHealthStateNotSpecified', 'IntegrationServiceEnvironmentNetworkDependencyHealthStateHealthy', 'IntegrationServiceEnvironmentNetworkDependencyHealthStateUnhealthy', 'IntegrationServiceEnvironmentNetworkDependencyHealthStateUnknown' - State IntegrationServiceEnvironmentNetworkDependencyHealthState `json:"state,omitempty"` -} - -// IntegrationServiceEnvironmentNetworkEndpoint the network endpoint. -type IntegrationServiceEnvironmentNetworkEndpoint struct { - // Accessibility - The accessibility state. Possible values include: 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotSpecified', 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateUnknown', 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateAvailable', 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotAvailable' - Accessibility IntegrationServiceEnvironmentNetworkEndPointAccessibilityState `json:"accessibility,omitempty"` - // DomainName - The domain name. - DomainName *string `json:"domainName,omitempty"` - // Ports - The ports. - Ports *[]string `json:"ports,omitempty"` -} - -// IntegrationServiceEnvironmentProperties the integration service environment properties. -type IntegrationServiceEnvironmentProperties struct { - // ProvisioningState - The provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' - ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` - // State - The integration service environment state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` - // IntegrationServiceEnvironmentID - Gets the tracking id. - IntegrationServiceEnvironmentID *string `json:"integrationServiceEnvironmentId,omitempty"` - // EndpointsConfiguration - The endpoints configuration. - EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` - // NetworkConfiguration - The network configuration. - NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` - // EncryptionConfiguration - The encryption configuration. - EncryptionConfiguration *IntegrationServiceEnvironmenEncryptionConfiguration `json:"encryptionConfiguration,omitempty"` -} - -// IntegrationServiceEnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type IntegrationServiceEnvironmentsCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(IntegrationServiceEnvironmentsClient) (IntegrationServiceEnvironment, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *IntegrationServiceEnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for IntegrationServiceEnvironmentsCreateOrUpdateFuture.Result. -func (future *IntegrationServiceEnvironmentsCreateOrUpdateFuture) result(client IntegrationServiceEnvironmentsClient) (ise IntegrationServiceEnvironment, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ise.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("logic.IntegrationServiceEnvironmentsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ise.Response.Response, err = future.GetResult(sender); err == nil && ise.Response.Response.StatusCode != http.StatusNoContent { - ise, err = client.CreateOrUpdateResponder(ise.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsCreateOrUpdateFuture", "Result", ise.Response.Response, "Failure responding to request") - } - } - return -} - -// IntegrationServiceEnvironmentSku the integration service environment sku. -type IntegrationServiceEnvironmentSku struct { - // Name - The sku name. Possible values include: 'IntegrationServiceEnvironmentSkuNameNotSpecified', 'IntegrationServiceEnvironmentSkuNamePremium', 'IntegrationServiceEnvironmentSkuNameDeveloper' - Name IntegrationServiceEnvironmentSkuName `json:"name,omitempty"` - // Capacity - The sku capacity. - Capacity *int32 `json:"capacity,omitempty"` -} - -// IntegrationServiceEnvironmentSkuCapacity the integration service environment sku capacity. -type IntegrationServiceEnvironmentSkuCapacity struct { - // Minimum - The minimum capacity. - Minimum *int32 `json:"minimum,omitempty"` - // Maximum - The maximum capacity. - Maximum *int32 `json:"maximum,omitempty"` - // Default - The default capacity. - Default *int32 `json:"default,omitempty"` - // ScaleType - The sku scale type. Possible values include: 'IntegrationServiceEnvironmentSkuScaleTypeManual', 'IntegrationServiceEnvironmentSkuScaleTypeAutomatic', 'IntegrationServiceEnvironmentSkuScaleTypeNone' - ScaleType IntegrationServiceEnvironmentSkuScaleType `json:"scaleType,omitempty"` -} - -// IntegrationServiceEnvironmentSkuDefinition the integration service environment sku definition. -type IntegrationServiceEnvironmentSkuDefinition struct { - // ResourceType - The resource type. - ResourceType *string `json:"resourceType,omitempty"` - // Sku - The sku. - Sku *IntegrationServiceEnvironmentSkuDefinitionSku `json:"sku,omitempty"` - // Capacity - The sku capacity. - Capacity *IntegrationServiceEnvironmentSkuCapacity `json:"capacity,omitempty"` -} - -// IntegrationServiceEnvironmentSkuDefinitionSku the sku. -type IntegrationServiceEnvironmentSkuDefinitionSku struct { - // Name - The sku name. Possible values include: 'IntegrationServiceEnvironmentSkuNameNotSpecified', 'IntegrationServiceEnvironmentSkuNamePremium', 'IntegrationServiceEnvironmentSkuNameDeveloper' - Name IntegrationServiceEnvironmentSkuName `json:"name,omitempty"` - // Tier - The sku tier. - Tier *string `json:"tier,omitempty"` -} - -// IntegrationServiceEnvironmentSkuList the list of integration service environment skus. -type IntegrationServiceEnvironmentSkuList struct { - autorest.Response `json:"-"` - // Value - The list of integration service environment skus. - Value *[]IntegrationServiceEnvironmentSkuDefinition `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// IntegrationServiceEnvironmentSkuListIterator provides access to a complete listing of -// IntegrationServiceEnvironmentSkuDefinition values. -type IntegrationServiceEnvironmentSkuListIterator struct { - i int - page IntegrationServiceEnvironmentSkuListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *IntegrationServiceEnvironmentSkuListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentSkuListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *IntegrationServiceEnvironmentSkuListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter IntegrationServiceEnvironmentSkuListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter IntegrationServiceEnvironmentSkuListIterator) Response() IntegrationServiceEnvironmentSkuList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter IntegrationServiceEnvironmentSkuListIterator) Value() IntegrationServiceEnvironmentSkuDefinition { - if !iter.page.NotDone() { - return IntegrationServiceEnvironmentSkuDefinition{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the IntegrationServiceEnvironmentSkuListIterator type. -func NewIntegrationServiceEnvironmentSkuListIterator(page IntegrationServiceEnvironmentSkuListPage) IntegrationServiceEnvironmentSkuListIterator { - return IntegrationServiceEnvironmentSkuListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (isesl IntegrationServiceEnvironmentSkuList) IsEmpty() bool { - return isesl.Value == nil || len(*isesl.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (isesl IntegrationServiceEnvironmentSkuList) hasNextLink() bool { - return isesl.NextLink != nil && len(*isesl.NextLink) != 0 -} - -// integrationServiceEnvironmentSkuListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (isesl IntegrationServiceEnvironmentSkuList) integrationServiceEnvironmentSkuListPreparer(ctx context.Context) (*http.Request, error) { - if !isesl.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(isesl.NextLink))) -} - -// IntegrationServiceEnvironmentSkuListPage contains a page of IntegrationServiceEnvironmentSkuDefinition -// values. -type IntegrationServiceEnvironmentSkuListPage struct { - fn func(context.Context, IntegrationServiceEnvironmentSkuList) (IntegrationServiceEnvironmentSkuList, error) - isesl IntegrationServiceEnvironmentSkuList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *IntegrationServiceEnvironmentSkuListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationServiceEnvironmentSkuListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.isesl) - if err != nil { - return err - } - page.isesl = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *IntegrationServiceEnvironmentSkuListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page IntegrationServiceEnvironmentSkuListPage) NotDone() bool { - return !page.isesl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page IntegrationServiceEnvironmentSkuListPage) Response() IntegrationServiceEnvironmentSkuList { - return page.isesl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page IntegrationServiceEnvironmentSkuListPage) Values() []IntegrationServiceEnvironmentSkuDefinition { - if page.isesl.IsEmpty() { - return nil - } - return *page.isesl.Value -} - -// Creates a new instance of the IntegrationServiceEnvironmentSkuListPage type. -func NewIntegrationServiceEnvironmentSkuListPage(cur IntegrationServiceEnvironmentSkuList, getNextPage func(context.Context, IntegrationServiceEnvironmentSkuList) (IntegrationServiceEnvironmentSkuList, error)) IntegrationServiceEnvironmentSkuListPage { - return IntegrationServiceEnvironmentSkuListPage{ - fn: getNextPage, - isesl: cur, - } -} - -// IntegrationServiceEnvironmentSubnetNetworkHealth the integration service environment subnet network -// health. -type IntegrationServiceEnvironmentSubnetNetworkHealth struct { - // OutboundNetworkDependencies - The outbound network dependencies. - OutboundNetworkDependencies *[]IntegrationServiceEnvironmentNetworkDependency `json:"outboundNetworkDependencies,omitempty"` - // OutboundNetworkHealth - The integration service environment network health. - OutboundNetworkHealth *IntegrationServiceEnvironmentNetworkDependencyHealth `json:"outboundNetworkHealth,omitempty"` - // NetworkDependencyHealthState - The integration service environment network health state. Possible values include: 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotSpecified', 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateUnknown', 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateAvailable', 'IntegrationServiceEnvironmentNetworkEndPointAccessibilityStateNotAvailable' - NetworkDependencyHealthState IntegrationServiceEnvironmentNetworkEndPointAccessibilityState `json:"networkDependencyHealthState,omitempty"` -} - -// IntegrationServiceEnvironmentsUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type IntegrationServiceEnvironmentsUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(IntegrationServiceEnvironmentsClient) (IntegrationServiceEnvironment, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *IntegrationServiceEnvironmentsUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for IntegrationServiceEnvironmentsUpdateFuture.Result. -func (future *IntegrationServiceEnvironmentsUpdateFuture) result(client IntegrationServiceEnvironmentsClient) (ise IntegrationServiceEnvironment, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ise.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("logic.IntegrationServiceEnvironmentsUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ise.Response.Response, err = future.GetResult(sender); err == nil && ise.Response.Response.StatusCode != http.StatusNoContent { - ise, err = client.UpdateResponder(ise.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.IntegrationServiceEnvironmentsUpdateFuture", "Result", ise.Response.Response, "Failure responding to request") - } - } - return -} - -// IPAddress the ip address. -type IPAddress struct { - // Address - The address. - Address *string `json:"address,omitempty"` -} - -// IPAddressRange the ip address range. -type IPAddressRange struct { - // AddressRange - The IP address range. - AddressRange *string `json:"addressRange,omitempty"` -} - -// JSONSchema the JSON schema. -type JSONSchema struct { - autorest.Response `json:"-"` - // Title - The JSON title. - Title *string `json:"title,omitempty"` - // Content - The JSON content. - Content *string `json:"content,omitempty"` -} - -// KeyVaultKey the key vault key. -type KeyVaultKey struct { - // Kid - The key id. - Kid *string `json:"kid,omitempty"` - // Attributes - The key attributes. - Attributes *KeyVaultKeyAttributes `json:"attributes,omitempty"` -} - -// KeyVaultKeyAttributes the key attributes. -type KeyVaultKeyAttributes struct { - // Enabled - Whether the key is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - // Created - When the key was created. - Created *int64 `json:"created,omitempty"` - // Updated - When the key was updated. - Updated *int64 `json:"updated,omitempty"` -} - -// KeyVaultKeyCollection collection of key vault keys. -type KeyVaultKeyCollection struct { - autorest.Response `json:"-"` - // Value - The key vault keys. - Value *[]KeyVaultKey `json:"value,omitempty"` - // SkipToken - The skip token. - SkipToken *string `json:"skipToken,omitempty"` -} - -// KeyVaultKeyReference the reference to the key vault key. -type KeyVaultKeyReference struct { - // KeyVault - The key vault reference. - KeyVault *KeyVaultKeyReferenceKeyVault `json:"keyVault,omitempty"` - // KeyName - The private key name in key vault. - KeyName *string `json:"keyName,omitempty"` - // KeyVersion - The private key version in key vault. - KeyVersion *string `json:"keyVersion,omitempty"` -} - -// KeyVaultKeyReferenceKeyVault the key vault reference. -type KeyVaultKeyReferenceKeyVault struct { - // ID - The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for KeyVaultKeyReferenceKeyVault. -func (kvkrV KeyVaultKeyReferenceKeyVault) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if kvkrV.ID != nil { - objectMap["id"] = kvkrV.ID - } - return json.Marshal(objectMap) -} - -// KeyVaultReference the key vault reference. -type KeyVaultReference struct { - // ID - The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for KeyVaultReference. -func (kvr KeyVaultReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if kvr.ID != nil { - objectMap["id"] = kvr.ID - } - return json.Marshal(objectMap) -} - -// ListKeyVaultKeysDefinition the list key vault keys definition. -type ListKeyVaultKeysDefinition struct { - // KeyVault - The key vault reference. - KeyVault *KeyVaultReference `json:"keyVault,omitempty"` - // SkipToken - The skip token. - SkipToken *string `json:"skipToken,omitempty"` -} - -// ManagedAPI the managed api definition. -type ManagedAPI struct { - // Properties - The api resource properties. - Properties *APIResourceProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ManagedAPI. -func (ma ManagedAPI) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ma.Properties != nil { - objectMap["properties"] = ma.Properties - } - if ma.Location != nil { - objectMap["location"] = ma.Location - } - if ma.Tags != nil { - objectMap["tags"] = ma.Tags - } - return json.Marshal(objectMap) -} - -// ManagedAPIListResult the list of managed APIs. -type ManagedAPIListResult struct { - // Value - The managed APIs. - Value *[]ManagedAPI `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ManagedServiceIdentity managed service identity properties. -type ManagedServiceIdentity struct { - // Type - Type of managed service identity. The type 'SystemAssigned' includes an implicitly created identity. The type 'None' will remove any identities from the resource. Possible values include: 'ManagedServiceIdentityTypeSystemAssigned', 'ManagedServiceIdentityTypeUserAssigned', 'ManagedServiceIdentityTypeNone' - Type ManagedServiceIdentityType `json:"type,omitempty"` - // TenantID - READ-ONLY; Tenant of managed service identity. - TenantID *uuid.UUID `json:"tenantId,omitempty"` - // PrincipalID - READ-ONLY; Principal Id of managed service identity. - PrincipalID *uuid.UUID `json:"principalId,omitempty"` - // UserAssignedIdentities - The list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"` -} - -// MarshalJSON is the custom marshaler for ManagedServiceIdentity. -func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if msi.Type != "" { - objectMap["type"] = msi.Type - } - if msi.UserAssignedIdentities != nil { - objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities - } - return json.Marshal(objectMap) -} - -// NetworkConfiguration the network configuration. -type NetworkConfiguration struct { - // VirtualNetworkAddressSpace - Gets the virtual network address space. - VirtualNetworkAddressSpace *string `json:"virtualNetworkAddressSpace,omitempty"` - // AccessEndpoint - The access endpoint. - AccessEndpoint *IntegrationServiceEnvironmentAccessEndpoint `json:"accessEndpoint,omitempty"` - // Subnets - The subnets. - Subnets *[]ResourceReference `json:"subnets,omitempty"` -} - -// OpenAuthenticationAccessPolicies authenticationPolicy of type Open. -type OpenAuthenticationAccessPolicies struct { - // Policies - Open authentication policies. - Policies map[string]*OpenAuthenticationAccessPolicy `json:"policies"` -} - -// MarshalJSON is the custom marshaler for OpenAuthenticationAccessPolicies. -func (oaap OpenAuthenticationAccessPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if oaap.Policies != nil { - objectMap["policies"] = oaap.Policies - } - return json.Marshal(objectMap) -} - -// OpenAuthenticationAccessPolicy open authentication access policy defined by user. -type OpenAuthenticationAccessPolicy struct { - // Type - Type of provider for OAuth. Possible values include: 'OpenAuthenticationProviderTypeAAD' - Type OpenAuthenticationProviderType `json:"type,omitempty"` - // Claims - The access policy claims. - Claims *[]OpenAuthenticationPolicyClaim `json:"claims,omitempty"` -} - -// OpenAuthenticationPolicyClaim open authentication policy claim. -type OpenAuthenticationPolicyClaim struct { - // Name - The name of the claim. - Name *string `json:"name,omitempty"` - // Value - The value of the claim. - Value *string `json:"value,omitempty"` -} - -// Operation logic REST API operation -type Operation struct { - // Origin - Operation: origin - Origin *string `json:"origin,omitempty"` - // Name - Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` - // Display - The object that represents the operation. - Display *OperationDisplay `json:"display,omitempty"` - // Properties - The properties. - Properties interface{} `json:"properties,omitempty"` -} - -// OperationDisplay the object that represents the operation. -type OperationDisplay struct { - // Provider - Service provider: Microsoft.Logic - Provider *string `json:"provider,omitempty"` - // Resource - Resource on which the operation is performed: Profile, endpoint, etc. - Resource *string `json:"resource,omitempty"` - // Operation - Operation type: Read, write, delete, etc. - Operation *string `json:"operation,omitempty"` - // Description - Operation: description. - Description *string `json:"description,omitempty"` -} - -// OperationListResult result of the request to list Logic operations. It contains a list of operations and -// a URL link to get the next set of results. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - List of Logic operations supported by the Logic resource provider. - Value *[]Operation `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` -} - -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { - i int - page OperationListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter OperationListResultIterator) Response() OperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter OperationListResultIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (olr OperationListResult) IsEmpty() bool { - return olr.Value == nil || len(*olr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (olr OperationListResult) hasNextLink() bool { - return olr.NextLink != nil && len(*olr.NextLink) != 0 -} - -// operationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if !olr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.olr) - if err != nil { - return err - } - page.olr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { - return nil - } - return *page.olr.Value -} - -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{ - fn: getNextPage, - olr: cur, - } -} - -// OperationResult the operation result definition. -type OperationResult struct { - // TrackingID - READ-ONLY; Gets the tracking id. - TrackingID *string `json:"trackingId,omitempty"` - // Inputs - READ-ONLY; Gets the inputs. - Inputs interface{} `json:"inputs,omitempty"` - // InputsLink - READ-ONLY; Gets the link to inputs. - InputsLink *ContentLink `json:"inputsLink,omitempty"` - // Outputs - READ-ONLY; Gets the outputs. - Outputs interface{} `json:"outputs,omitempty"` - // OutputsLink - READ-ONLY; Gets the link to outputs. - OutputsLink *ContentLink `json:"outputsLink,omitempty"` - // TrackedProperties - READ-ONLY; Gets the tracked properties. - TrackedProperties interface{} `json:"trackedProperties,omitempty"` - // RetryHistory - Gets the retry histories. - RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` - IterationCount *int32 `json:"iterationCount,omitempty"` - // StartTime - The start time of the workflow scope repetition. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the workflow scope repetition. - EndTime *date.Time `json:"endTime,omitempty"` - // Correlation - The correlation properties. - Correlation *RunActionCorrelation `json:"correlation,omitempty"` - // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Code - The workflow scope repetition code. - Code *string `json:"code,omitempty"` - Error interface{} `json:"error,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationResult. -func (or OperationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if or.RetryHistory != nil { - objectMap["retryHistory"] = or.RetryHistory - } - if or.IterationCount != nil { - objectMap["iterationCount"] = or.IterationCount - } - if or.StartTime != nil { - objectMap["startTime"] = or.StartTime - } - if or.EndTime != nil { - objectMap["endTime"] = or.EndTime - } - if or.Correlation != nil { - objectMap["correlation"] = or.Correlation - } - if or.Status != "" { - objectMap["status"] = or.Status - } - if or.Code != nil { - objectMap["code"] = or.Code - } - if or.Error != nil { - objectMap["error"] = or.Error - } - return json.Marshal(objectMap) -} - -// OperationResultProperties the run operation result properties. -type OperationResultProperties struct { - // StartTime - The start time of the workflow scope repetition. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the workflow scope repetition. - EndTime *date.Time `json:"endTime,omitempty"` - // Correlation - The correlation properties. - Correlation *RunActionCorrelation `json:"correlation,omitempty"` - // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Code - The workflow scope repetition code. - Code *string `json:"code,omitempty"` - Error interface{} `json:"error,omitempty"` -} - -// PartnerContent the integration account partner content. -type PartnerContent struct { - // B2b - The B2B partner content. - B2b *B2BPartnerContent `json:"b2b,omitempty"` -} - -// RecurrenceSchedule the recurrence schedule. -type RecurrenceSchedule struct { - // Minutes - The minutes. - Minutes *[]int32 `json:"minutes,omitempty"` - // Hours - The hours. - Hours *[]int32 `json:"hours,omitempty"` - // WeekDays - The days of the week. - WeekDays *[]DaysOfWeek `json:"weekDays,omitempty"` - // MonthDays - The month days. - MonthDays *[]int32 `json:"monthDays,omitempty"` - // MonthlyOccurrences - The monthly occurrences. - MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"` -} - -// RecurrenceScheduleOccurrence the recurrence schedule occurrence. -type RecurrenceScheduleOccurrence struct { - // Day - The day of the week. Possible values include: 'DayOfWeekSunday', 'DayOfWeekMonday', 'DayOfWeekTuesday', 'DayOfWeekWednesday', 'DayOfWeekThursday', 'DayOfWeekFriday', 'DayOfWeekSaturday' - Day DayOfWeek `json:"day,omitempty"` - // Occurrence - The occurrence. - Occurrence *int32 `json:"occurrence,omitempty"` -} - -// RegenerateActionParameter the access key regenerate action content. -type RegenerateActionParameter struct { - // KeyType - The key type. Possible values include: 'KeyTypeNotSpecified', 'KeyTypePrimary', 'KeyTypeSecondary' - KeyType KeyType `json:"keyType,omitempty"` -} - -// RepetitionIndex the workflow run action repetition index. -type RepetitionIndex struct { - // ScopeName - The scope. - ScopeName *string `json:"scopeName,omitempty"` - // ItemIndex - The index. - ItemIndex *int32 `json:"itemIndex,omitempty"` -} - -// Request a request. -type Request struct { - // Headers - A list of all the headers attached to the request. - Headers interface{} `json:"headers,omitempty"` - // URI - The destination for the request. - URI *string `json:"uri,omitempty"` - // Method - The HTTP method used for the request. - Method *string `json:"method,omitempty"` -} - -// RequestHistory the request history. -type RequestHistory struct { - autorest.Response `json:"-"` - // Properties - The request history properties. - Properties *RequestHistoryProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for RequestHistory. -func (rh RequestHistory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rh.Properties != nil { - objectMap["properties"] = rh.Properties - } - if rh.Location != nil { - objectMap["location"] = rh.Location - } - if rh.Tags != nil { - objectMap["tags"] = rh.Tags - } - return json.Marshal(objectMap) -} - -// RequestHistoryListResult the list of workflow request histories. -type RequestHistoryListResult struct { - autorest.Response `json:"-"` - // Value - A list of workflow request histories. - Value *[]RequestHistory `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// RequestHistoryListResultIterator provides access to a complete listing of RequestHistory values. -type RequestHistoryListResultIterator struct { - i int - page RequestHistoryListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *RequestHistoryListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RequestHistoryListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *RequestHistoryListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RequestHistoryListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter RequestHistoryListResultIterator) Response() RequestHistoryListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter RequestHistoryListResultIterator) Value() RequestHistory { - if !iter.page.NotDone() { - return RequestHistory{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RequestHistoryListResultIterator type. -func NewRequestHistoryListResultIterator(page RequestHistoryListResultPage) RequestHistoryListResultIterator { - return RequestHistoryListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rhlr RequestHistoryListResult) IsEmpty() bool { - return rhlr.Value == nil || len(*rhlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rhlr RequestHistoryListResult) hasNextLink() bool { - return rhlr.NextLink != nil && len(*rhlr.NextLink) != 0 -} - -// requestHistoryListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rhlr RequestHistoryListResult) requestHistoryListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rhlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rhlr.NextLink))) -} - -// RequestHistoryListResultPage contains a page of RequestHistory values. -type RequestHistoryListResultPage struct { - fn func(context.Context, RequestHistoryListResult) (RequestHistoryListResult, error) - rhlr RequestHistoryListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *RequestHistoryListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RequestHistoryListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.rhlr) - if err != nil { - return err - } - page.rhlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *RequestHistoryListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RequestHistoryListResultPage) NotDone() bool { - return !page.rhlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RequestHistoryListResultPage) Response() RequestHistoryListResult { - return page.rhlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RequestHistoryListResultPage) Values() []RequestHistory { - if page.rhlr.IsEmpty() { - return nil - } - return *page.rhlr.Value -} - -// Creates a new instance of the RequestHistoryListResultPage type. -func NewRequestHistoryListResultPage(cur RequestHistoryListResult, getNextPage func(context.Context, RequestHistoryListResult) (RequestHistoryListResult, error)) RequestHistoryListResultPage { - return RequestHistoryListResultPage{ - fn: getNextPage, - rhlr: cur, - } -} - -// RequestHistoryProperties the request history. -type RequestHistoryProperties struct { - // StartTime - The time the request started. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The time the request ended. - EndTime *date.Time `json:"endTime,omitempty"` - // Request - The request. - Request *Request `json:"request,omitempty"` - // Response - The response. - Response *Response `json:"response,omitempty"` -} - -// Resource the base resource type. -type Resource struct { - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// ResourceReference the resource reference. -type ResourceReference struct { - // ID - The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceReference. -func (rr ResourceReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rr.ID != nil { - objectMap["id"] = rr.ID - } - return json.Marshal(objectMap) -} - -// Response a response. -type Response struct { - // Headers - A list of all the headers attached to the response. - Headers interface{} `json:"headers,omitempty"` - // StatusCode - The status code of the response. - StatusCode *int32 `json:"statusCode,omitempty"` - // BodyLink - Details on the location of the body content. - BodyLink *ContentLink `json:"bodyLink,omitempty"` -} - -// RetryHistory the retry history. -type RetryHistory struct { - // StartTime - Gets the start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - Gets the end time. - EndTime *date.Time `json:"endTime,omitempty"` - // Code - Gets the status code. - Code *string `json:"code,omitempty"` - // ClientRequestID - Gets the client request Id. - ClientRequestID *string `json:"clientRequestId,omitempty"` - // ServiceRequestID - Gets the service request Id. - ServiceRequestID *string `json:"serviceRequestId,omitempty"` - // Error - Gets the error response. - Error *ErrorResponse `json:"error,omitempty"` -} - -// RunActionCorrelation the workflow run action correlation properties. -type RunActionCorrelation struct { - // ActionTrackingID - The action tracking identifier. - ActionTrackingID *string `json:"actionTrackingId,omitempty"` - // ClientTrackingID - The client tracking identifier. - ClientTrackingID *string `json:"clientTrackingId,omitempty"` - // ClientKeywords - The client keywords. - ClientKeywords *[]string `json:"clientKeywords,omitempty"` -} - -// RunCorrelation the correlation properties. -type RunCorrelation struct { - // ClientTrackingID - The client tracking identifier. - ClientTrackingID *string `json:"clientTrackingId,omitempty"` - // ClientKeywords - The client keywords. - ClientKeywords *[]string `json:"clientKeywords,omitempty"` -} - -// SetIntegrationServiceEnvironmentSubnetNetworkHealth ... -type SetIntegrationServiceEnvironmentSubnetNetworkHealth struct { - autorest.Response `json:"-"` - Value map[string]*IntegrationServiceEnvironmentSubnetNetworkHealth `json:"value"` -} - -// MarshalJSON is the custom marshaler for SetIntegrationServiceEnvironmentSubnetNetworkHealth. -func (sisesnh SetIntegrationServiceEnvironmentSubnetNetworkHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sisesnh.Value != nil { - objectMap["value"] = sisesnh.Value - } - return json.Marshal(objectMap) -} - -// SetObject ... -type SetObject struct { - autorest.Response `json:"-"` - Value interface{} `json:"value,omitempty"` -} - -// SetTriggerStateActionDefinition the set trigger state action definition. -type SetTriggerStateActionDefinition struct { - // Source - The source. - Source *WorkflowTriggerReference `json:"source,omitempty"` -} - -// Sku the sku type. -type Sku struct { - // Name - The name. Possible values include: 'SkuNameNotSpecified', 'SkuNameFree', 'SkuNameShared', 'SkuNameBasic', 'SkuNameStandard', 'SkuNamePremium' - Name SkuName `json:"name,omitempty"` - // Plan - The reference to plan. - Plan *ResourceReference `json:"plan,omitempty"` -} - -// SubResource the sub resource type. -type SubResource struct { - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for SubResource. -func (sr SubResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SwaggerCustomDynamicList the swagger custom dynamic list. -type SwaggerCustomDynamicList struct { - // OperationID - The operation id to fetch dynamic schema. - OperationID *string `json:"operationId,omitempty"` - // BuiltInOperation - The built in operation. - BuiltInOperation *string `json:"builtInOperation,omitempty"` - // ItemsPath - The path to a response property (relative to the response object, not the response body) which contains an array of dynamic value items. - ItemsPath *string `json:"itemsPath,omitempty"` - // ItemValuePath - The path to a property which defines the value which should be used. - ItemValuePath *string `json:"itemValuePath,omitempty"` - // ItemTitlePath - The path to an item property which defines the display name of the item. - ItemTitlePath *string `json:"itemTitlePath,omitempty"` - // Parameters - The parameters. - Parameters map[string]*SwaggerCustomDynamicProperties `json:"parameters"` -} - -// MarshalJSON is the custom marshaler for SwaggerCustomDynamicList. -func (scdl SwaggerCustomDynamicList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scdl.OperationID != nil { - objectMap["operationId"] = scdl.OperationID - } - if scdl.BuiltInOperation != nil { - objectMap["builtInOperation"] = scdl.BuiltInOperation - } - if scdl.ItemsPath != nil { - objectMap["itemsPath"] = scdl.ItemsPath - } - if scdl.ItemValuePath != nil { - objectMap["itemValuePath"] = scdl.ItemValuePath - } - if scdl.ItemTitlePath != nil { - objectMap["itemTitlePath"] = scdl.ItemTitlePath - } - if scdl.Parameters != nil { - objectMap["parameters"] = scdl.Parameters - } - return json.Marshal(objectMap) -} - -// SwaggerCustomDynamicProperties the swagger custom dynamic properties. -type SwaggerCustomDynamicProperties struct { - // OperationID - The operation id to fetch dynamic schema. - OperationID *string `json:"operationId,omitempty"` - // ValuePath - Json pointer to the dynamic schema on the response body. - ValuePath *string `json:"valuePath,omitempty"` - // Parameters - The operation parameters. - Parameters map[string]*SwaggerCustomDynamicProperties `json:"parameters"` -} - -// MarshalJSON is the custom marshaler for SwaggerCustomDynamicProperties. -func (scdp SwaggerCustomDynamicProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scdp.OperationID != nil { - objectMap["operationId"] = scdp.OperationID - } - if scdp.ValuePath != nil { - objectMap["valuePath"] = scdp.ValuePath - } - if scdp.Parameters != nil { - objectMap["parameters"] = scdp.Parameters - } - return json.Marshal(objectMap) -} - -// SwaggerCustomDynamicSchema the swagger custom dynamic schema. -type SwaggerCustomDynamicSchema struct { - // OperationID - The operation id to fetch dynamic schema. - OperationID *string `json:"operationId,omitempty"` - // ValuePath - Json pointer to the dynamic schema on the response body. - ValuePath *string `json:"valuePath,omitempty"` - // Parameters - The operation parameters. - Parameters map[string]interface{} `json:"parameters"` -} - -// MarshalJSON is the custom marshaler for SwaggerCustomDynamicSchema. -func (scds SwaggerCustomDynamicSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scds.OperationID != nil { - objectMap["operationId"] = scds.OperationID - } - if scds.ValuePath != nil { - objectMap["valuePath"] = scds.ValuePath - } - if scds.Parameters != nil { - objectMap["parameters"] = scds.Parameters - } - return json.Marshal(objectMap) -} - -// SwaggerCustomDynamicTree the swagger custom dynamic tree. -type SwaggerCustomDynamicTree struct { - // Settings - The tree settings - Settings *SwaggerCustomDynamicTreeSettings `json:"settings,omitempty"` - // Open - The tree on-open configuration - Open *SwaggerCustomDynamicTreeCommand `json:"open,omitempty"` - // Browse - The tree on-browse configuration - Browse *SwaggerCustomDynamicTreeCommand `json:"browse,omitempty"` -} - -// SwaggerCustomDynamicTreeCommand the swagger tree command. -type SwaggerCustomDynamicTreeCommand struct { - // OperationID - The path to an item property which defines the display name of the item. - OperationID *string `json:"operationId,omitempty"` - // ItemsPath - The path to an item property which defines the display name of the item. - ItemsPath *string `json:"itemsPath,omitempty"` - // ItemValuePath - The path to an item property which defines the display name of the item. - ItemValuePath *string `json:"itemValuePath,omitempty"` - // ItemTitlePath - The path to an item property which defines the display name of the item. - ItemTitlePath *string `json:"itemTitlePath,omitempty"` - // ItemFullTitlePath - The path to an item property which defines the display name of the item. - ItemFullTitlePath *string `json:"itemFullTitlePath,omitempty"` - // ItemIsParent - The path to an item property which defines the display name of the item. - ItemIsParent *string `json:"itemIsParent,omitempty"` - // SelectableFilter - The path to an item property which defines the display name of the item. - SelectableFilter *string `json:"selectableFilter,omitempty"` - Parameters map[string]*SwaggerCustomDynamicTreeParameter `json:"parameters"` -} - -// MarshalJSON is the custom marshaler for SwaggerCustomDynamicTreeCommand. -func (scdtc SwaggerCustomDynamicTreeCommand) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if scdtc.OperationID != nil { - objectMap["operationId"] = scdtc.OperationID - } - if scdtc.ItemsPath != nil { - objectMap["itemsPath"] = scdtc.ItemsPath - } - if scdtc.ItemValuePath != nil { - objectMap["itemValuePath"] = scdtc.ItemValuePath - } - if scdtc.ItemTitlePath != nil { - objectMap["itemTitlePath"] = scdtc.ItemTitlePath - } - if scdtc.ItemFullTitlePath != nil { - objectMap["itemFullTitlePath"] = scdtc.ItemFullTitlePath - } - if scdtc.ItemIsParent != nil { - objectMap["itemIsParent"] = scdtc.ItemIsParent - } - if scdtc.SelectableFilter != nil { - objectMap["selectableFilter"] = scdtc.SelectableFilter - } - if scdtc.Parameters != nil { - objectMap["parameters"] = scdtc.Parameters - } - return json.Marshal(objectMap) -} - -// SwaggerCustomDynamicTreeParameter the swagger custom dynamic tree parameter. -type SwaggerCustomDynamicTreeParameter struct { - // SelectedItemValuePath - Gets or sets a path to a property in the currently selected item to pass as a value to a parameter for the given operation. - SelectedItemValuePath *string `json:"selectedItemValuePath,omitempty"` - // Value - The parameter value. - Value interface{} `json:"value,omitempty"` - // ParameterReference - The parameter reference. - ParameterReference *string `json:"parameterReference,omitempty"` - // Required - Indicates whether the parameter is required. - Required *bool `json:"required,omitempty"` -} - -// SwaggerCustomDynamicTreeSettings the swagger custom dynamic tree settings. -type SwaggerCustomDynamicTreeSettings struct { - // CanSelectParentNodes - Indicates whether parent nodes can be selected. - CanSelectParentNodes *bool `json:"CanSelectParentNodes,omitempty"` - // CanSelectLeafNodes - Indicates whether leaf nodes can be selected. - CanSelectLeafNodes *bool `json:"CanSelectLeafNodes,omitempty"` -} - -// SwaggerExternalDocumentation the swagger external documentation -type SwaggerExternalDocumentation struct { - // Description - The document description. - Description *string `json:"description,omitempty"` - // URI - The documentation Uri. - URI *string `json:"uri,omitempty"` - // Extensions - The vendor extensions. - Extensions map[string]interface{} `json:"extensions"` -} - -// MarshalJSON is the custom marshaler for SwaggerExternalDocumentation. -func (sed SwaggerExternalDocumentation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sed.Description != nil { - objectMap["description"] = sed.Description - } - if sed.URI != nil { - objectMap["uri"] = sed.URI - } - if sed.Extensions != nil { - objectMap["extensions"] = sed.Extensions - } - return json.Marshal(objectMap) -} - -// SwaggerSchema the swagger schema. -type SwaggerSchema struct { - // Ref - The reference. - Ref *string `json:"ref,omitempty"` - // Type - The type. Possible values include: 'SwaggerSchemaTypeString', 'SwaggerSchemaTypeNumber', 'SwaggerSchemaTypeInteger', 'SwaggerSchemaTypeBoolean', 'SwaggerSchemaTypeArray', 'SwaggerSchemaTypeFile', 'SwaggerSchemaTypeObject', 'SwaggerSchemaTypeNull' - Type SwaggerSchemaType `json:"type,omitempty"` - // Title - The title. - Title *string `json:"title,omitempty"` - // Items - The items schema. - Items *SwaggerSchema `json:"items,omitempty"` - // Properties - The object properties - Properties map[string]*SwaggerSchema `json:"properties"` - // AdditionalProperties - The additional properties. - AdditionalProperties interface{} `json:"additionalProperties,omitempty"` - // Required - The object required properties. - Required *[]string `json:"required,omitempty"` - // MaxProperties - The maximum number of allowed properties. - MaxProperties *int32 `json:"maxProperties,omitempty"` - // MinProperties - The minimum number of allowed properties. - MinProperties *int32 `json:"minProperties,omitempty"` - // AllOf - The schemas which must pass validation when this schema is used. - AllOf *[]SwaggerSchema `json:"allOf,omitempty"` - // Discriminator - The discriminator. - Discriminator *string `json:"discriminator,omitempty"` - // ReadOnly - Indicates whether this property must be present in the a request. - ReadOnly *bool `json:"readOnly,omitempty"` - // XML - The xml representation format for a property. - XML *SwaggerXML `json:"xml,omitempty"` - // ExternalDocs - The external documentation. - ExternalDocs *SwaggerExternalDocumentation `json:"externalDocs,omitempty"` - // Example - The example value. - Example interface{} `json:"example,omitempty"` - // NotificationURLExtension - Indicates the notification url extension. If this is set, the property's value should be a callback url for a webhook. - NotificationURLExtension *bool `json:"notificationUrlExtension,omitempty"` - // DynamicSchemaOld - The dynamic schema configuration. - DynamicSchemaOld *SwaggerCustomDynamicSchema `json:"dynamicSchemaOld,omitempty"` - // DynamicSchemaNew - The dynamic schema configuration. - DynamicSchemaNew *SwaggerCustomDynamicProperties `json:"dynamicSchemaNew,omitempty"` - // DynamicListNew - The dynamic list. - DynamicListNew *SwaggerCustomDynamicList `json:"dynamicListNew,omitempty"` - // DynamicTree - The dynamic values tree configuration. - DynamicTree *SwaggerCustomDynamicTree `json:"dynamicTree,omitempty"` -} - -// MarshalJSON is the custom marshaler for SwaggerSchema. -func (ss SwaggerSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ss.Ref != nil { - objectMap["ref"] = ss.Ref - } - if ss.Type != "" { - objectMap["type"] = ss.Type - } - if ss.Title != nil { - objectMap["title"] = ss.Title - } - if ss.Items != nil { - objectMap["items"] = ss.Items - } - if ss.Properties != nil { - objectMap["properties"] = ss.Properties - } - if ss.AdditionalProperties != nil { - objectMap["additionalProperties"] = ss.AdditionalProperties - } - if ss.Required != nil { - objectMap["required"] = ss.Required - } - if ss.MaxProperties != nil { - objectMap["maxProperties"] = ss.MaxProperties - } - if ss.MinProperties != nil { - objectMap["minProperties"] = ss.MinProperties - } - if ss.AllOf != nil { - objectMap["allOf"] = ss.AllOf - } - if ss.Discriminator != nil { - objectMap["discriminator"] = ss.Discriminator - } - if ss.ReadOnly != nil { - objectMap["readOnly"] = ss.ReadOnly - } - if ss.XML != nil { - objectMap["xml"] = ss.XML - } - if ss.ExternalDocs != nil { - objectMap["externalDocs"] = ss.ExternalDocs - } - if ss.Example != nil { - objectMap["example"] = ss.Example - } - if ss.NotificationURLExtension != nil { - objectMap["notificationUrlExtension"] = ss.NotificationURLExtension - } - if ss.DynamicSchemaOld != nil { - objectMap["dynamicSchemaOld"] = ss.DynamicSchemaOld - } - if ss.DynamicSchemaNew != nil { - objectMap["dynamicSchemaNew"] = ss.DynamicSchemaNew - } - if ss.DynamicListNew != nil { - objectMap["dynamicListNew"] = ss.DynamicListNew - } - if ss.DynamicTree != nil { - objectMap["dynamicTree"] = ss.DynamicTree - } - return json.Marshal(objectMap) -} - -// SwaggerXML the Swagger XML. -type SwaggerXML struct { - // Name - The xml element or attribute name. - Name *string `json:"name,omitempty"` - // Namespace - The xml namespace. - Namespace *string `json:"namespace,omitempty"` - // Prefix - The name prefix. - Prefix *string `json:"prefix,omitempty"` - // Attribute - Indicates whether the property should be an attribute instead of an element. - Attribute *bool `json:"attribute,omitempty"` - // Wrapped - Indicates whether the array elements are wrapped in a container element. - Wrapped *bool `json:"wrapped,omitempty"` - // Extensions - The vendor extensions. - Extensions map[string]interface{} `json:"extensions"` -} - -// MarshalJSON is the custom marshaler for SwaggerXML. -func (sx SwaggerXML) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sx.Name != nil { - objectMap["name"] = sx.Name - } - if sx.Namespace != nil { - objectMap["namespace"] = sx.Namespace - } - if sx.Prefix != nil { - objectMap["prefix"] = sx.Prefix - } - if sx.Attribute != nil { - objectMap["attribute"] = sx.Attribute - } - if sx.Wrapped != nil { - objectMap["wrapped"] = sx.Wrapped - } - if sx.Extensions != nil { - objectMap["extensions"] = sx.Extensions - } - return json.Marshal(objectMap) -} - -// TrackingEvent the tracking event. -type TrackingEvent struct { - // EventLevel - The event level. Possible values include: 'EventLevelLogAlways', 'EventLevelCritical', 'EventLevelError', 'EventLevelWarning', 'EventLevelInformational', 'EventLevelVerbose' - EventLevel EventLevel `json:"eventLevel,omitempty"` - // EventTime - The event time. - EventTime *date.Time `json:"eventTime,omitempty"` - // RecordType - The record type. Possible values include: 'TrackingRecordTypeNotSpecified', 'TrackingRecordTypeCustom', 'TrackingRecordTypeAS2Message', 'TrackingRecordTypeAS2MDN', 'TrackingRecordTypeX12Interchange', 'TrackingRecordTypeX12FunctionalGroup', 'TrackingRecordTypeX12TransactionSet', 'TrackingRecordTypeX12InterchangeAcknowledgment', 'TrackingRecordTypeX12FunctionalGroupAcknowledgment', 'TrackingRecordTypeX12TransactionSetAcknowledgment', 'TrackingRecordTypeEdifactInterchange', 'TrackingRecordTypeEdifactFunctionalGroup', 'TrackingRecordTypeEdifactTransactionSet', 'TrackingRecordTypeEdifactInterchangeAcknowledgment', 'TrackingRecordTypeEdifactFunctionalGroupAcknowledgment', 'TrackingRecordTypeEdifactTransactionSetAcknowledgment' - RecordType TrackingRecordType `json:"recordType,omitempty"` - // Record - The record. - Record interface{} `json:"record,omitempty"` - // Error - The error. - Error *TrackingEventErrorInfo `json:"error,omitempty"` -} - -// TrackingEventErrorInfo the tracking event error info. -type TrackingEventErrorInfo struct { - // Message - The message. - Message *string `json:"message,omitempty"` - // Code - The code. - Code *string `json:"code,omitempty"` -} - -// TrackingEventsDefinition the tracking events definition. -type TrackingEventsDefinition struct { - // SourceType - The source type. - SourceType *string `json:"sourceType,omitempty"` - // TrackEventsOptions - The track events options. Possible values include: 'TrackEventsOperationOptionsNone', 'TrackEventsOperationOptionsDisableSourceInfoEnrich' - TrackEventsOptions TrackEventsOperationOptions `json:"trackEventsOptions,omitempty"` - // Events - The events. - Events *[]TrackingEvent `json:"events,omitempty"` -} - -// UserAssignedIdentity user Assigned identity properties. -type UserAssignedIdentity struct { - // PrincipalID - READ-ONLY; Principal Id of user assigned identity - PrincipalID *string `json:"principalId,omitempty"` - // ClientID - READ-ONLY; Client Id of user assigned identity - ClientID *string `json:"clientId,omitempty"` -} - -// MarshalJSON is the custom marshaler for UserAssignedIdentity. -func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// Workflow the workflow type. -type Workflow struct { - autorest.Response `json:"-"` - // WorkflowProperties - The workflow properties. - *WorkflowProperties `json:"properties,omitempty"` - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Workflow. -func (w Workflow) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if w.WorkflowProperties != nil { - objectMap["properties"] = w.WorkflowProperties - } - if w.Identity != nil { - objectMap["identity"] = w.Identity - } - if w.Location != nil { - objectMap["location"] = w.Location - } - if w.Tags != nil { - objectMap["tags"] = w.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Workflow struct. -func (w *Workflow) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowProperties WorkflowProperties - err = json.Unmarshal(*v, &workflowProperties) - if err != nil { - return err - } - w.WorkflowProperties = &workflowProperties - } - case "identity": - if v != nil { - var identity ManagedServiceIdentity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - w.Identity = &identity - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - w.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - w.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - w.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - w.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - w.Tags = tags - } - } - } - - return nil -} - -// WorkflowFilter the workflow filter. -type WorkflowFilter struct { - // State - The state of workflows. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` -} - -// WorkflowListResult the list of workflows. -type WorkflowListResult struct { - autorest.Response `json:"-"` - // Value - The list of workflows. - Value *[]Workflow `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// WorkflowListResultIterator provides access to a complete listing of Workflow values. -type WorkflowListResultIterator struct { - i int - page WorkflowListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WorkflowListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WorkflowListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkflowListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WorkflowListResultIterator) Response() WorkflowListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WorkflowListResultIterator) Value() Workflow { - if !iter.page.NotDone() { - return Workflow{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WorkflowListResultIterator type. -func NewWorkflowListResultIterator(page WorkflowListResultPage) WorkflowListResultIterator { - return WorkflowListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wlr WorkflowListResult) IsEmpty() bool { - return wlr.Value == nil || len(*wlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wlr WorkflowListResult) hasNextLink() bool { - return wlr.NextLink != nil && len(*wlr.NextLink) != 0 -} - -// workflowListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wlr WorkflowListResult) workflowListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wlr.NextLink))) -} - -// WorkflowListResultPage contains a page of Workflow values. -type WorkflowListResultPage struct { - fn func(context.Context, WorkflowListResult) (WorkflowListResult, error) - wlr WorkflowListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WorkflowListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wlr) - if err != nil { - return err - } - page.wlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WorkflowListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkflowListResultPage) NotDone() bool { - return !page.wlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WorkflowListResultPage) Response() WorkflowListResult { - return page.wlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WorkflowListResultPage) Values() []Workflow { - if page.wlr.IsEmpty() { - return nil - } - return *page.wlr.Value -} - -// Creates a new instance of the WorkflowListResultPage type. -func NewWorkflowListResultPage(cur WorkflowListResult, getNextPage func(context.Context, WorkflowListResult) (WorkflowListResult, error)) WorkflowListResultPage { - return WorkflowListResultPage{ - fn: getNextPage, - wlr: cur, - } -} - -// WorkflowOutputParameter the workflow output parameter. -type WorkflowOutputParameter struct { - // Error - READ-ONLY; Gets the error. - Error interface{} `json:"error,omitempty"` - // Type - The type. Possible values include: 'ParameterTypeNotSpecified', 'ParameterTypeString', 'ParameterTypeSecureString', 'ParameterTypeInt', 'ParameterTypeFloat', 'ParameterTypeBool', 'ParameterTypeArray', 'ParameterTypeObject', 'ParameterTypeSecureObject' - Type ParameterType `json:"type,omitempty"` - // Value - The value. - Value interface{} `json:"value,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` - // Description - The description. - Description *string `json:"description,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowOutputParameter. -func (wop WorkflowOutputParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wop.Type != "" { - objectMap["type"] = wop.Type - } - if wop.Value != nil { - objectMap["value"] = wop.Value - } - if wop.Metadata != nil { - objectMap["metadata"] = wop.Metadata - } - if wop.Description != nil { - objectMap["description"] = wop.Description - } - return json.Marshal(objectMap) -} - -// WorkflowParameter the workflow parameters. -type WorkflowParameter struct { - // Type - The type. Possible values include: 'ParameterTypeNotSpecified', 'ParameterTypeString', 'ParameterTypeSecureString', 'ParameterTypeInt', 'ParameterTypeFloat', 'ParameterTypeBool', 'ParameterTypeArray', 'ParameterTypeObject', 'ParameterTypeSecureObject' - Type ParameterType `json:"type,omitempty"` - // Value - The value. - Value interface{} `json:"value,omitempty"` - // Metadata - The metadata. - Metadata interface{} `json:"metadata,omitempty"` - // Description - The description. - Description *string `json:"description,omitempty"` -} - -// WorkflowProperties the workflow properties. -type WorkflowProperties struct { - // ProvisioningState - READ-ONLY; Gets the provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' - ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` - // CreatedTime - READ-ONLY; Gets the created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; Gets the changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // State - The state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` - // Version - READ-ONLY; Gets the version. - Version *string `json:"version,omitempty"` - // AccessEndpoint - READ-ONLY; Gets the access endpoint. - AccessEndpoint *string `json:"accessEndpoint,omitempty"` - // EndpointsConfiguration - The endpoints configuration. - EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` - // AccessControl - The access control configuration. - AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` - // Sku - READ-ONLY; The sku. - Sku *Sku `json:"sku,omitempty"` - // IntegrationAccount - The integration account. - IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` - // IntegrationServiceEnvironment - The integration service environment. - IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` - // Definition - The definition. - Definition interface{} `json:"definition,omitempty"` - // Parameters - The parameters. - Parameters map[string]*WorkflowParameter `json:"parameters"` -} - -// MarshalJSON is the custom marshaler for WorkflowProperties. -func (wp WorkflowProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wp.State != "" { - objectMap["state"] = wp.State - } - if wp.EndpointsConfiguration != nil { - objectMap["endpointsConfiguration"] = wp.EndpointsConfiguration - } - if wp.AccessControl != nil { - objectMap["accessControl"] = wp.AccessControl - } - if wp.IntegrationAccount != nil { - objectMap["integrationAccount"] = wp.IntegrationAccount - } - if wp.IntegrationServiceEnvironment != nil { - objectMap["integrationServiceEnvironment"] = wp.IntegrationServiceEnvironment - } - if wp.Definition != nil { - objectMap["definition"] = wp.Definition - } - if wp.Parameters != nil { - objectMap["parameters"] = wp.Parameters - } - return json.Marshal(objectMap) -} - -// WorkflowReference the workflow reference. -type WorkflowReference struct { - // ID - The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowReference. -func (wr WorkflowReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wr.ID != nil { - objectMap["id"] = wr.ID - } - return json.Marshal(objectMap) -} - -// WorkflowRun the workflow run. -type WorkflowRun struct { - autorest.Response `json:"-"` - // WorkflowRunProperties - The workflow run properties. - *WorkflowRunProperties `json:"properties,omitempty"` - // Name - READ-ONLY; Gets the workflow run name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the workflow run type. - Type *string `json:"type,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowRun. -func (wr WorkflowRun) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wr.WorkflowRunProperties != nil { - objectMap["properties"] = wr.WorkflowRunProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WorkflowRun struct. -func (wr *WorkflowRun) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowRunProperties WorkflowRunProperties - err = json.Unmarshal(*v, &workflowRunProperties) - if err != nil { - return err - } - wr.WorkflowRunProperties = &workflowRunProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wr.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wr.ID = &ID - } - } - } - - return nil -} - -// WorkflowRunAction the workflow run action. -type WorkflowRunAction struct { - autorest.Response `json:"-"` - // WorkflowRunActionProperties - The workflow run action properties. - *WorkflowRunActionProperties `json:"properties,omitempty"` - // Name - READ-ONLY; Gets the workflow run action name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the workflow run action type. - Type *string `json:"type,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowRunAction. -func (wra WorkflowRunAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wra.WorkflowRunActionProperties != nil { - objectMap["properties"] = wra.WorkflowRunActionProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WorkflowRunAction struct. -func (wra *WorkflowRunAction) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowRunActionProperties WorkflowRunActionProperties - err = json.Unmarshal(*v, &workflowRunActionProperties) - if err != nil { - return err - } - wra.WorkflowRunActionProperties = &workflowRunActionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wra.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wra.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wra.ID = &ID - } - } - } - - return nil -} - -// WorkflowRunActionFilter the workflow run action filter. -type WorkflowRunActionFilter struct { - // Status - The status of workflow run action. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` -} - -// WorkflowRunActionListResult the list of workflow run actions. -type WorkflowRunActionListResult struct { - autorest.Response `json:"-"` - // Value - A list of workflow run actions. - Value *[]WorkflowRunAction `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// WorkflowRunActionListResultIterator provides access to a complete listing of WorkflowRunAction values. -type WorkflowRunActionListResultIterator struct { - i int - page WorkflowRunActionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WorkflowRunActionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WorkflowRunActionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkflowRunActionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WorkflowRunActionListResultIterator) Response() WorkflowRunActionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WorkflowRunActionListResultIterator) Value() WorkflowRunAction { - if !iter.page.NotDone() { - return WorkflowRunAction{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WorkflowRunActionListResultIterator type. -func NewWorkflowRunActionListResultIterator(page WorkflowRunActionListResultPage) WorkflowRunActionListResultIterator { - return WorkflowRunActionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wralr WorkflowRunActionListResult) IsEmpty() bool { - return wralr.Value == nil || len(*wralr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wralr WorkflowRunActionListResult) hasNextLink() bool { - return wralr.NextLink != nil && len(*wralr.NextLink) != 0 -} - -// workflowRunActionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wralr WorkflowRunActionListResult) workflowRunActionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wralr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wralr.NextLink))) -} - -// WorkflowRunActionListResultPage contains a page of WorkflowRunAction values. -type WorkflowRunActionListResultPage struct { - fn func(context.Context, WorkflowRunActionListResult) (WorkflowRunActionListResult, error) - wralr WorkflowRunActionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WorkflowRunActionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wralr) - if err != nil { - return err - } - page.wralr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WorkflowRunActionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkflowRunActionListResultPage) NotDone() bool { - return !page.wralr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WorkflowRunActionListResultPage) Response() WorkflowRunActionListResult { - return page.wralr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WorkflowRunActionListResultPage) Values() []WorkflowRunAction { - if page.wralr.IsEmpty() { - return nil - } - return *page.wralr.Value -} - -// Creates a new instance of the WorkflowRunActionListResultPage type. -func NewWorkflowRunActionListResultPage(cur WorkflowRunActionListResult, getNextPage func(context.Context, WorkflowRunActionListResult) (WorkflowRunActionListResult, error)) WorkflowRunActionListResultPage { - return WorkflowRunActionListResultPage{ - fn: getNextPage, - wralr: cur, - } -} - -// WorkflowRunActionProperties the workflow run action properties. -type WorkflowRunActionProperties struct { - // StartTime - READ-ONLY; Gets the start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; Gets the end time. - EndTime *date.Time `json:"endTime,omitempty"` - // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Code - READ-ONLY; Gets the code. - Code *string `json:"code,omitempty"` - // Error - READ-ONLY; Gets the error. - Error interface{} `json:"error,omitempty"` - // TrackingID - READ-ONLY; Gets the tracking id. - TrackingID *string `json:"trackingId,omitempty"` - // Correlation - The correlation properties. - Correlation *RunActionCorrelation `json:"correlation,omitempty"` - // InputsLink - READ-ONLY; Gets the link to inputs. - InputsLink *ContentLink `json:"inputsLink,omitempty"` - // OutputsLink - READ-ONLY; Gets the link to outputs. - OutputsLink *ContentLink `json:"outputsLink,omitempty"` - // TrackedProperties - READ-ONLY; Gets the tracked properties. - TrackedProperties interface{} `json:"trackedProperties,omitempty"` - // RetryHistory - Gets the retry histories. - RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowRunActionProperties. -func (wrap WorkflowRunActionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wrap.Correlation != nil { - objectMap["correlation"] = wrap.Correlation - } - if wrap.RetryHistory != nil { - objectMap["retryHistory"] = wrap.RetryHistory - } - return json.Marshal(objectMap) -} - -// WorkflowRunActionRepetitionDefinition the workflow run action repetition definition. -type WorkflowRunActionRepetitionDefinition struct { - autorest.Response `json:"-"` - // WorkflowRunActionRepetitionProperties - The workflow run action repetition properties definition. - *WorkflowRunActionRepetitionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for WorkflowRunActionRepetitionDefinition. -func (wrard WorkflowRunActionRepetitionDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wrard.WorkflowRunActionRepetitionProperties != nil { - objectMap["properties"] = wrard.WorkflowRunActionRepetitionProperties - } - if wrard.Location != nil { - objectMap["location"] = wrard.Location - } - if wrard.Tags != nil { - objectMap["tags"] = wrard.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WorkflowRunActionRepetitionDefinition struct. -func (wrard *WorkflowRunActionRepetitionDefinition) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowRunActionRepetitionProperties WorkflowRunActionRepetitionProperties - err = json.Unmarshal(*v, &workflowRunActionRepetitionProperties) - if err != nil { - return err - } - wrard.WorkflowRunActionRepetitionProperties = &workflowRunActionRepetitionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wrard.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wrard.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wrard.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - wrard.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - wrard.Tags = tags - } - } - } - - return nil -} - -// WorkflowRunActionRepetitionDefinitionCollection a collection of workflow run action repetitions. -type WorkflowRunActionRepetitionDefinitionCollection struct { - autorest.Response `json:"-"` - // NextLink - The link used to get the next page of recommendations. - NextLink *string `json:"nextLink,omitempty"` - Value *[]WorkflowRunActionRepetitionDefinition `json:"value,omitempty"` -} - -// WorkflowRunActionRepetitionProperties the workflow run action repetition properties definition. -type WorkflowRunActionRepetitionProperties struct { - // RepetitionIndexes - The repetition indexes. - RepetitionIndexes *[]RepetitionIndex `json:"repetitionIndexes,omitempty"` - // TrackingID - READ-ONLY; Gets the tracking id. - TrackingID *string `json:"trackingId,omitempty"` - // Inputs - READ-ONLY; Gets the inputs. - Inputs interface{} `json:"inputs,omitempty"` - // InputsLink - READ-ONLY; Gets the link to inputs. - InputsLink *ContentLink `json:"inputsLink,omitempty"` - // Outputs - READ-ONLY; Gets the outputs. - Outputs interface{} `json:"outputs,omitempty"` - // OutputsLink - READ-ONLY; Gets the link to outputs. - OutputsLink *ContentLink `json:"outputsLink,omitempty"` - // TrackedProperties - READ-ONLY; Gets the tracked properties. - TrackedProperties interface{} `json:"trackedProperties,omitempty"` - // RetryHistory - Gets the retry histories. - RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` - IterationCount *int32 `json:"iterationCount,omitempty"` - // StartTime - The start time of the workflow scope repetition. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the workflow scope repetition. - EndTime *date.Time `json:"endTime,omitempty"` - // Correlation - The correlation properties. - Correlation *RunActionCorrelation `json:"correlation,omitempty"` - // Status - The status of the workflow scope repetition. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Code - The workflow scope repetition code. - Code *string `json:"code,omitempty"` - Error interface{} `json:"error,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowRunActionRepetitionProperties. -func (wrarp WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wrarp.RepetitionIndexes != nil { - objectMap["repetitionIndexes"] = wrarp.RepetitionIndexes - } - if wrarp.RetryHistory != nil { - objectMap["retryHistory"] = wrarp.RetryHistory - } - if wrarp.IterationCount != nil { - objectMap["iterationCount"] = wrarp.IterationCount - } - if wrarp.StartTime != nil { - objectMap["startTime"] = wrarp.StartTime - } - if wrarp.EndTime != nil { - objectMap["endTime"] = wrarp.EndTime - } - if wrarp.Correlation != nil { - objectMap["correlation"] = wrarp.Correlation - } - if wrarp.Status != "" { - objectMap["status"] = wrarp.Status - } - if wrarp.Code != nil { - objectMap["code"] = wrarp.Code - } - if wrarp.Error != nil { - objectMap["error"] = wrarp.Error - } - return json.Marshal(objectMap) -} - -// WorkflowRunFilter the workflow run filter. -type WorkflowRunFilter struct { - // Status - The status of workflow run. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` -} - -// WorkflowRunListResult the list of workflow runs. -type WorkflowRunListResult struct { - autorest.Response `json:"-"` - // Value - A list of workflow runs. - Value *[]WorkflowRun `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// WorkflowRunListResultIterator provides access to a complete listing of WorkflowRun values. -type WorkflowRunListResultIterator struct { - i int - page WorkflowRunListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WorkflowRunListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WorkflowRunListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkflowRunListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WorkflowRunListResultIterator) Response() WorkflowRunListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WorkflowRunListResultIterator) Value() WorkflowRun { - if !iter.page.NotDone() { - return WorkflowRun{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WorkflowRunListResultIterator type. -func NewWorkflowRunListResultIterator(page WorkflowRunListResultPage) WorkflowRunListResultIterator { - return WorkflowRunListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wrlr WorkflowRunListResult) IsEmpty() bool { - return wrlr.Value == nil || len(*wrlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wrlr WorkflowRunListResult) hasNextLink() bool { - return wrlr.NextLink != nil && len(*wrlr.NextLink) != 0 -} - -// workflowRunListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wrlr WorkflowRunListResult) workflowRunListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wrlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wrlr.NextLink))) -} - -// WorkflowRunListResultPage contains a page of WorkflowRun values. -type WorkflowRunListResultPage struct { - fn func(context.Context, WorkflowRunListResult) (WorkflowRunListResult, error) - wrlr WorkflowRunListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WorkflowRunListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wrlr) - if err != nil { - return err - } - page.wrlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WorkflowRunListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkflowRunListResultPage) NotDone() bool { - return !page.wrlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WorkflowRunListResultPage) Response() WorkflowRunListResult { - return page.wrlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WorkflowRunListResultPage) Values() []WorkflowRun { - if page.wrlr.IsEmpty() { - return nil - } - return *page.wrlr.Value -} - -// Creates a new instance of the WorkflowRunListResultPage type. -func NewWorkflowRunListResultPage(cur WorkflowRunListResult, getNextPage func(context.Context, WorkflowRunListResult) (WorkflowRunListResult, error)) WorkflowRunListResultPage { - return WorkflowRunListResultPage{ - fn: getNextPage, - wrlr: cur, - } -} - -// WorkflowRunProperties the workflow run properties. -type WorkflowRunProperties struct { - // WaitEndTime - READ-ONLY; Gets the wait end time. - WaitEndTime *date.Time `json:"waitEndTime,omitempty"` - // StartTime - READ-ONLY; Gets the start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; Gets the end time. - EndTime *date.Time `json:"endTime,omitempty"` - // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Code - READ-ONLY; Gets the code. - Code *string `json:"code,omitempty"` - // Error - READ-ONLY; Gets the error. - Error interface{} `json:"error,omitempty"` - // CorrelationID - READ-ONLY; Gets the correlation id. - CorrelationID *string `json:"correlationId,omitempty"` - // Correlation - The run correlation. - Correlation *Correlation `json:"correlation,omitempty"` - // Workflow - READ-ONLY; Gets the reference to workflow version. - Workflow *ResourceReference `json:"workflow,omitempty"` - // Trigger - READ-ONLY; Gets the fired trigger. - Trigger *WorkflowRunTrigger `json:"trigger,omitempty"` - // Outputs - READ-ONLY; Gets the outputs. - Outputs map[string]*WorkflowOutputParameter `json:"outputs"` - // Response - READ-ONLY; Gets the response of the flow run. - Response *WorkflowRunTrigger `json:"response,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowRunProperties. -func (wrp WorkflowRunProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wrp.Correlation != nil { - objectMap["correlation"] = wrp.Correlation - } - return json.Marshal(objectMap) -} - -// WorkflowRunTrigger the workflow run trigger. -type WorkflowRunTrigger struct { - // Name - READ-ONLY; Gets the name. - Name *string `json:"name,omitempty"` - // Inputs - READ-ONLY; Gets the inputs. - Inputs interface{} `json:"inputs,omitempty"` - // InputsLink - READ-ONLY; Gets the link to inputs. - InputsLink *ContentLink `json:"inputsLink,omitempty"` - // Outputs - READ-ONLY; Gets the outputs. - Outputs interface{} `json:"outputs,omitempty"` - // OutputsLink - READ-ONLY; Gets the link to outputs. - OutputsLink *ContentLink `json:"outputsLink,omitempty"` - // ScheduledTime - READ-ONLY; Gets the scheduled time. - ScheduledTime *date.Time `json:"scheduledTime,omitempty"` - // StartTime - READ-ONLY; Gets the start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; Gets the end time. - EndTime *date.Time `json:"endTime,omitempty"` - // TrackingID - READ-ONLY; Gets the tracking id. - TrackingID *string `json:"trackingId,omitempty"` - // Correlation - The run correlation. - Correlation *Correlation `json:"correlation,omitempty"` - // Code - READ-ONLY; Gets the code. - Code *string `json:"code,omitempty"` - // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Error - READ-ONLY; Gets the error. - Error interface{} `json:"error,omitempty"` - // TrackedProperties - READ-ONLY; Gets the tracked properties. - TrackedProperties interface{} `json:"trackedProperties,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowRunTrigger. -func (wrt WorkflowRunTrigger) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wrt.Correlation != nil { - objectMap["correlation"] = wrt.Correlation - } - return json.Marshal(objectMap) -} - -// WorkflowsMoveFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type WorkflowsMoveFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(WorkflowsClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *WorkflowsMoveFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for WorkflowsMoveFuture.Result. -func (future *WorkflowsMoveFuture) result(client WorkflowsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsMoveFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("logic.WorkflowsMoveFuture") - return - } - ar.Response = future.Response() - return -} - -// WorkflowTrigger the workflow trigger. -type WorkflowTrigger struct { - autorest.Response `json:"-"` - // WorkflowTriggerProperties - The workflow trigger properties. - *WorkflowTriggerProperties `json:"properties,omitempty"` - // Name - READ-ONLY; Gets the workflow trigger name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the workflow trigger type. - Type *string `json:"type,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowTrigger. -func (wt WorkflowTrigger) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wt.WorkflowTriggerProperties != nil { - objectMap["properties"] = wt.WorkflowTriggerProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WorkflowTrigger struct. -func (wt *WorkflowTrigger) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowTriggerProperties WorkflowTriggerProperties - err = json.Unmarshal(*v, &workflowTriggerProperties) - if err != nil { - return err - } - wt.WorkflowTriggerProperties = &workflowTriggerProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wt.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wt.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wt.ID = &ID - } - } - } - - return nil -} - -// WorkflowTriggerCallbackURL the workflow trigger callback URL. -type WorkflowTriggerCallbackURL struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Gets the workflow trigger callback URL. - Value *string `json:"value,omitempty"` - // Method - READ-ONLY; Gets the workflow trigger callback URL HTTP method. - Method *string `json:"method,omitempty"` - // BasePath - READ-ONLY; Gets the workflow trigger callback URL base path. - BasePath *string `json:"basePath,omitempty"` - // RelativePath - READ-ONLY; Gets the workflow trigger callback URL relative path. - RelativePath *string `json:"relativePath,omitempty"` - // RelativePathParameters - Gets the workflow trigger callback URL relative path parameters. - RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` - // Queries - Gets the workflow trigger callback URL query parameters. - Queries *WorkflowTriggerListCallbackURLQueries `json:"queries,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowTriggerCallbackURL. -func (wtcu WorkflowTriggerCallbackURL) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wtcu.RelativePathParameters != nil { - objectMap["relativePathParameters"] = wtcu.RelativePathParameters - } - if wtcu.Queries != nil { - objectMap["queries"] = wtcu.Queries - } - return json.Marshal(objectMap) -} - -// WorkflowTriggerFilter the workflow trigger filter. -type WorkflowTriggerFilter struct { - // State - The state of workflow trigger. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` -} - -// WorkflowTriggerHistory the workflow trigger history. -type WorkflowTriggerHistory struct { - autorest.Response `json:"-"` - // WorkflowTriggerHistoryProperties - Gets the workflow trigger history properties. - *WorkflowTriggerHistoryProperties `json:"properties,omitempty"` - // Name - READ-ONLY; Gets the workflow trigger history name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the workflow trigger history type. - Type *string `json:"type,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowTriggerHistory. -func (wth WorkflowTriggerHistory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wth.WorkflowTriggerHistoryProperties != nil { - objectMap["properties"] = wth.WorkflowTriggerHistoryProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WorkflowTriggerHistory struct. -func (wth *WorkflowTriggerHistory) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowTriggerHistoryProperties WorkflowTriggerHistoryProperties - err = json.Unmarshal(*v, &workflowTriggerHistoryProperties) - if err != nil { - return err - } - wth.WorkflowTriggerHistoryProperties = &workflowTriggerHistoryProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wth.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wth.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wth.ID = &ID - } - } - } - - return nil -} - -// WorkflowTriggerHistoryFilter the workflow trigger history filter. -type WorkflowTriggerHistoryFilter struct { - // Status - The status of workflow trigger history. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` -} - -// WorkflowTriggerHistoryListResult the list of workflow trigger histories. -type WorkflowTriggerHistoryListResult struct { - autorest.Response `json:"-"` - // Value - A list of workflow trigger histories. - Value *[]WorkflowTriggerHistory `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// WorkflowTriggerHistoryListResultIterator provides access to a complete listing of WorkflowTriggerHistory -// values. -type WorkflowTriggerHistoryListResultIterator struct { - i int - page WorkflowTriggerHistoryListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WorkflowTriggerHistoryListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoryListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WorkflowTriggerHistoryListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkflowTriggerHistoryListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WorkflowTriggerHistoryListResultIterator) Response() WorkflowTriggerHistoryListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WorkflowTriggerHistoryListResultIterator) Value() WorkflowTriggerHistory { - if !iter.page.NotDone() { - return WorkflowTriggerHistory{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WorkflowTriggerHistoryListResultIterator type. -func NewWorkflowTriggerHistoryListResultIterator(page WorkflowTriggerHistoryListResultPage) WorkflowTriggerHistoryListResultIterator { - return WorkflowTriggerHistoryListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wthlr WorkflowTriggerHistoryListResult) IsEmpty() bool { - return wthlr.Value == nil || len(*wthlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wthlr WorkflowTriggerHistoryListResult) hasNextLink() bool { - return wthlr.NextLink != nil && len(*wthlr.NextLink) != 0 -} - -// workflowTriggerHistoryListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wthlr WorkflowTriggerHistoryListResult) workflowTriggerHistoryListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wthlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wthlr.NextLink))) -} - -// WorkflowTriggerHistoryListResultPage contains a page of WorkflowTriggerHistory values. -type WorkflowTriggerHistoryListResultPage struct { - fn func(context.Context, WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error) - wthlr WorkflowTriggerHistoryListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WorkflowTriggerHistoryListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoryListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wthlr) - if err != nil { - return err - } - page.wthlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WorkflowTriggerHistoryListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkflowTriggerHistoryListResultPage) NotDone() bool { - return !page.wthlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WorkflowTriggerHistoryListResultPage) Response() WorkflowTriggerHistoryListResult { - return page.wthlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WorkflowTriggerHistoryListResultPage) Values() []WorkflowTriggerHistory { - if page.wthlr.IsEmpty() { - return nil - } - return *page.wthlr.Value -} - -// Creates a new instance of the WorkflowTriggerHistoryListResultPage type. -func NewWorkflowTriggerHistoryListResultPage(cur WorkflowTriggerHistoryListResult, getNextPage func(context.Context, WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error)) WorkflowTriggerHistoryListResultPage { - return WorkflowTriggerHistoryListResultPage{ - fn: getNextPage, - wthlr: cur, - } -} - -// WorkflowTriggerHistoryProperties the workflow trigger history properties. -type WorkflowTriggerHistoryProperties struct { - // StartTime - READ-ONLY; Gets the start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - READ-ONLY; Gets the end time. - EndTime *date.Time `json:"endTime,omitempty"` - // ScheduledTime - READ-ONLY; The scheduled time. - ScheduledTime *date.Time `json:"scheduledTime,omitempty"` - // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // Code - READ-ONLY; Gets the code. - Code *string `json:"code,omitempty"` - // Error - READ-ONLY; Gets the error. - Error interface{} `json:"error,omitempty"` - // TrackingID - READ-ONLY; Gets the tracking id. - TrackingID *string `json:"trackingId,omitempty"` - // Correlation - The run correlation. - Correlation *Correlation `json:"correlation,omitempty"` - // InputsLink - READ-ONLY; Gets the link to input parameters. - InputsLink *ContentLink `json:"inputsLink,omitempty"` - // OutputsLink - READ-ONLY; Gets the link to output parameters. - OutputsLink *ContentLink `json:"outputsLink,omitempty"` - // Fired - READ-ONLY; The value indicating whether trigger was fired. - Fired *bool `json:"fired,omitempty"` - // Run - READ-ONLY; Gets the reference to workflow run. - Run *ResourceReference `json:"run,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowTriggerHistoryProperties. -func (wthp WorkflowTriggerHistoryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wthp.Correlation != nil { - objectMap["correlation"] = wthp.Correlation - } - return json.Marshal(objectMap) -} - -// WorkflowTriggerListCallbackURLQueries gets the workflow trigger callback URL query parameters. -type WorkflowTriggerListCallbackURLQueries struct { - // APIVersion - The api version. - APIVersion *string `json:"api-version,omitempty"` - // Sp - The SAS permissions. - Sp *string `json:"sp,omitempty"` - // Sv - The SAS version. - Sv *string `json:"sv,omitempty"` - // Sig - The SAS signature. - Sig *string `json:"sig,omitempty"` - // Se - The SAS timestamp. - Se *string `json:"se,omitempty"` -} - -// WorkflowTriggerListResult the list of workflow triggers. -type WorkflowTriggerListResult struct { - autorest.Response `json:"-"` - // Value - A list of workflow triggers. - Value *[]WorkflowTrigger `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// WorkflowTriggerListResultIterator provides access to a complete listing of WorkflowTrigger values. -type WorkflowTriggerListResultIterator struct { - i int - page WorkflowTriggerListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WorkflowTriggerListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WorkflowTriggerListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkflowTriggerListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WorkflowTriggerListResultIterator) Response() WorkflowTriggerListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WorkflowTriggerListResultIterator) Value() WorkflowTrigger { - if !iter.page.NotDone() { - return WorkflowTrigger{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WorkflowTriggerListResultIterator type. -func NewWorkflowTriggerListResultIterator(page WorkflowTriggerListResultPage) WorkflowTriggerListResultIterator { - return WorkflowTriggerListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wtlr WorkflowTriggerListResult) IsEmpty() bool { - return wtlr.Value == nil || len(*wtlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wtlr WorkflowTriggerListResult) hasNextLink() bool { - return wtlr.NextLink != nil && len(*wtlr.NextLink) != 0 -} - -// workflowTriggerListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wtlr WorkflowTriggerListResult) workflowTriggerListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wtlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wtlr.NextLink))) -} - -// WorkflowTriggerListResultPage contains a page of WorkflowTrigger values. -type WorkflowTriggerListResultPage struct { - fn func(context.Context, WorkflowTriggerListResult) (WorkflowTriggerListResult, error) - wtlr WorkflowTriggerListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WorkflowTriggerListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wtlr) - if err != nil { - return err - } - page.wtlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WorkflowTriggerListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkflowTriggerListResultPage) NotDone() bool { - return !page.wtlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WorkflowTriggerListResultPage) Response() WorkflowTriggerListResult { - return page.wtlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WorkflowTriggerListResultPage) Values() []WorkflowTrigger { - if page.wtlr.IsEmpty() { - return nil - } - return *page.wtlr.Value -} - -// Creates a new instance of the WorkflowTriggerListResultPage type. -func NewWorkflowTriggerListResultPage(cur WorkflowTriggerListResult, getNextPage func(context.Context, WorkflowTriggerListResult) (WorkflowTriggerListResult, error)) WorkflowTriggerListResultPage { - return WorkflowTriggerListResultPage{ - fn: getNextPage, - wtlr: cur, - } -} - -// WorkflowTriggerProperties the workflow trigger properties. -type WorkflowTriggerProperties struct { - // ProvisioningState - READ-ONLY; Gets the provisioning state. Possible values include: 'WorkflowTriggerProvisioningStateNotSpecified', 'WorkflowTriggerProvisioningStateAccepted', 'WorkflowTriggerProvisioningStateRunning', 'WorkflowTriggerProvisioningStateReady', 'WorkflowTriggerProvisioningStateCreating', 'WorkflowTriggerProvisioningStateCreated', 'WorkflowTriggerProvisioningStateDeleting', 'WorkflowTriggerProvisioningStateDeleted', 'WorkflowTriggerProvisioningStateCanceled', 'WorkflowTriggerProvisioningStateFailed', 'WorkflowTriggerProvisioningStateSucceeded', 'WorkflowTriggerProvisioningStateMoving', 'WorkflowTriggerProvisioningStateUpdating', 'WorkflowTriggerProvisioningStateRegistering', 'WorkflowTriggerProvisioningStateRegistered', 'WorkflowTriggerProvisioningStateUnregistering', 'WorkflowTriggerProvisioningStateUnregistered', 'WorkflowTriggerProvisioningStateCompleted' - ProvisioningState WorkflowTriggerProvisioningState `json:"provisioningState,omitempty"` - // CreatedTime - READ-ONLY; Gets the created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; Gets the changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // State - READ-ONLY; Gets the state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` - // Status - READ-ONLY; Gets the status. Possible values include: 'WorkflowStatusNotSpecified', 'WorkflowStatusPaused', 'WorkflowStatusRunning', 'WorkflowStatusWaiting', 'WorkflowStatusSucceeded', 'WorkflowStatusSkipped', 'WorkflowStatusSuspended', 'WorkflowStatusCancelled', 'WorkflowStatusFailed', 'WorkflowStatusFaulted', 'WorkflowStatusTimedOut', 'WorkflowStatusAborted', 'WorkflowStatusIgnored' - Status WorkflowStatus `json:"status,omitempty"` - // LastExecutionTime - READ-ONLY; Gets the last execution time. - LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"` - // NextExecutionTime - READ-ONLY; Gets the next execution time. - NextExecutionTime *date.Time `json:"nextExecutionTime,omitempty"` - // Recurrence - READ-ONLY; Gets the workflow trigger recurrence. - Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty"` - // Workflow - READ-ONLY; Gets the reference to workflow. - Workflow *ResourceReference `json:"workflow,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowTriggerProperties. -func (wtp WorkflowTriggerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// WorkflowTriggerRecurrence the workflow trigger recurrence. -type WorkflowTriggerRecurrence struct { - // Frequency - The frequency. Possible values include: 'RecurrenceFrequencyNotSpecified', 'RecurrenceFrequencySecond', 'RecurrenceFrequencyMinute', 'RecurrenceFrequencyHour', 'RecurrenceFrequencyDay', 'RecurrenceFrequencyWeek', 'RecurrenceFrequencyMonth', 'RecurrenceFrequencyYear' - Frequency RecurrenceFrequency `json:"frequency,omitempty"` - // Interval - The interval. - Interval *int32 `json:"interval,omitempty"` - // StartTime - The start time. - StartTime *string `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *string `json:"endTime,omitempty"` - // TimeZone - The time zone. - TimeZone *string `json:"timeZone,omitempty"` - // Schedule - The recurrence schedule. - Schedule *RecurrenceSchedule `json:"schedule,omitempty"` -} - -// WorkflowTriggerReference the workflow trigger reference. -type WorkflowTriggerReference struct { - // FlowName - The workflow name. - FlowName *string `json:"flowName,omitempty"` - // TriggerName - The workflow trigger name. - TriggerName *string `json:"triggerName,omitempty"` - // ID - The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for WorkflowTriggerReference. -func (wtr WorkflowTriggerReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wtr.FlowName != nil { - objectMap["flowName"] = wtr.FlowName - } - if wtr.TriggerName != nil { - objectMap["triggerName"] = wtr.TriggerName - } - if wtr.ID != nil { - objectMap["id"] = wtr.ID - } - return json.Marshal(objectMap) -} - -// WorkflowVersion the workflow version. -type WorkflowVersion struct { - autorest.Response `json:"-"` - // WorkflowVersionProperties - The workflow version properties. - *WorkflowVersionProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The resource id. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Gets the resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Gets the resource type. - Type *string `json:"type,omitempty"` - // Location - The resource location. - Location *string `json:"location,omitempty"` - // Tags - The resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for WorkflowVersion. -func (wv WorkflowVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wv.WorkflowVersionProperties != nil { - objectMap["properties"] = wv.WorkflowVersionProperties - } - if wv.Location != nil { - objectMap["location"] = wv.Location - } - if wv.Tags != nil { - objectMap["tags"] = wv.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for WorkflowVersion struct. -func (wv *WorkflowVersion) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var workflowVersionProperties WorkflowVersionProperties - err = json.Unmarshal(*v, &workflowVersionProperties) - if err != nil { - return err - } - wv.WorkflowVersionProperties = &workflowVersionProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - wv.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - wv.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - wv.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - wv.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - wv.Tags = tags - } - } - } - - return nil -} - -// WorkflowVersionListResult the list of workflow versions. -type WorkflowVersionListResult struct { - autorest.Response `json:"-"` - // Value - A list of workflow versions. - Value *[]WorkflowVersion `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// WorkflowVersionListResultIterator provides access to a complete listing of WorkflowVersion values. -type WorkflowVersionListResultIterator struct { - i int - page WorkflowVersionListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *WorkflowVersionListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *WorkflowVersionListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter WorkflowVersionListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter WorkflowVersionListResultIterator) Response() WorkflowVersionListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter WorkflowVersionListResultIterator) Value() WorkflowVersion { - if !iter.page.NotDone() { - return WorkflowVersion{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the WorkflowVersionListResultIterator type. -func NewWorkflowVersionListResultIterator(page WorkflowVersionListResultPage) WorkflowVersionListResultIterator { - return WorkflowVersionListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (wvlr WorkflowVersionListResult) IsEmpty() bool { - return wvlr.Value == nil || len(*wvlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (wvlr WorkflowVersionListResult) hasNextLink() bool { - return wvlr.NextLink != nil && len(*wvlr.NextLink) != 0 -} - -// workflowVersionListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (wvlr WorkflowVersionListResult) workflowVersionListResultPreparer(ctx context.Context) (*http.Request, error) { - if !wvlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(wvlr.NextLink))) -} - -// WorkflowVersionListResultPage contains a page of WorkflowVersion values. -type WorkflowVersionListResultPage struct { - fn func(context.Context, WorkflowVersionListResult) (WorkflowVersionListResult, error) - wvlr WorkflowVersionListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *WorkflowVersionListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.wvlr) - if err != nil { - return err - } - page.wvlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *WorkflowVersionListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page WorkflowVersionListResultPage) NotDone() bool { - return !page.wvlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page WorkflowVersionListResultPage) Response() WorkflowVersionListResult { - return page.wvlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page WorkflowVersionListResultPage) Values() []WorkflowVersion { - if page.wvlr.IsEmpty() { - return nil - } - return *page.wvlr.Value -} - -// Creates a new instance of the WorkflowVersionListResultPage type. -func NewWorkflowVersionListResultPage(cur WorkflowVersionListResult, getNextPage func(context.Context, WorkflowVersionListResult) (WorkflowVersionListResult, error)) WorkflowVersionListResultPage { - return WorkflowVersionListResultPage{ - fn: getNextPage, - wvlr: cur, - } -} - -// WorkflowVersionProperties the workflow version properties. -type WorkflowVersionProperties struct { - // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'WorkflowProvisioningStateNotSpecified', 'WorkflowProvisioningStateAccepted', 'WorkflowProvisioningStateRunning', 'WorkflowProvisioningStateReady', 'WorkflowProvisioningStateCreating', 'WorkflowProvisioningStateCreated', 'WorkflowProvisioningStateDeleting', 'WorkflowProvisioningStateDeleted', 'WorkflowProvisioningStateCanceled', 'WorkflowProvisioningStateFailed', 'WorkflowProvisioningStateSucceeded', 'WorkflowProvisioningStateMoving', 'WorkflowProvisioningStateUpdating', 'WorkflowProvisioningStateRegistering', 'WorkflowProvisioningStateRegistered', 'WorkflowProvisioningStateUnregistering', 'WorkflowProvisioningStateUnregistered', 'WorkflowProvisioningStateCompleted', 'WorkflowProvisioningStateRenewing', 'WorkflowProvisioningStatePending', 'WorkflowProvisioningStateWaiting', 'WorkflowProvisioningStateInProgress' - ProvisioningState WorkflowProvisioningState `json:"provisioningState,omitempty"` - // CreatedTime - READ-ONLY; Gets the created time. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; Gets the changed time. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // State - The state. Possible values include: 'WorkflowStateNotSpecified', 'WorkflowStateCompleted', 'WorkflowStateEnabled', 'WorkflowStateDisabled', 'WorkflowStateDeleted', 'WorkflowStateSuspended' - State WorkflowState `json:"state,omitempty"` - // Version - READ-ONLY; Gets the version. - Version *string `json:"version,omitempty"` - // AccessEndpoint - READ-ONLY; Gets the access endpoint. - AccessEndpoint *string `json:"accessEndpoint,omitempty"` - // EndpointsConfiguration - The endpoints configuration. - EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` - // AccessControl - The access control configuration. - AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` - // Sku - READ-ONLY; The sku. - Sku *Sku `json:"sku,omitempty"` - // IntegrationAccount - The integration account. - IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` - // Definition - The definition. - Definition interface{} `json:"definition,omitempty"` - // Parameters - The parameters. - Parameters map[string]*WorkflowParameter `json:"parameters"` -} - -// MarshalJSON is the custom marshaler for WorkflowVersionProperties. -func (wvp WorkflowVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if wvp.State != "" { - objectMap["state"] = wvp.State - } - if wvp.EndpointsConfiguration != nil { - objectMap["endpointsConfiguration"] = wvp.EndpointsConfiguration - } - if wvp.AccessControl != nil { - objectMap["accessControl"] = wvp.AccessControl - } - if wvp.IntegrationAccount != nil { - objectMap["integrationAccount"] = wvp.IntegrationAccount - } - if wvp.Definition != nil { - objectMap["definition"] = wvp.Definition - } - if wvp.Parameters != nil { - objectMap["parameters"] = wvp.Parameters - } - return json.Marshal(objectMap) -} - -// WsdlService the WSDL service. -type WsdlService struct { - // QualifiedName - The qualified name. - QualifiedName *string `json:"qualifiedName,omitempty"` - // EndpointQualifiedNames - The list of endpoints' qualified names. - EndpointQualifiedNames *[]string `json:"EndpointQualifiedNames,omitempty"` -} - -// X12AcknowledgementSettings the X12 agreement acknowledgement settings. -type X12AcknowledgementSettings struct { - // NeedTechnicalAcknowledgement - The value indicating whether technical acknowledgement is needed. - NeedTechnicalAcknowledgement *bool `json:"needTechnicalAcknowledgement,omitempty"` - // BatchTechnicalAcknowledgements - The value indicating whether to batch the technical acknowledgements. - BatchTechnicalAcknowledgements *bool `json:"batchTechnicalAcknowledgements,omitempty"` - // NeedFunctionalAcknowledgement - The value indicating whether functional acknowledgement is needed. - NeedFunctionalAcknowledgement *bool `json:"needFunctionalAcknowledgement,omitempty"` - // FunctionalAcknowledgementVersion - The functional acknowledgement version. - FunctionalAcknowledgementVersion *string `json:"functionalAcknowledgementVersion,omitempty"` - // BatchFunctionalAcknowledgements - The value indicating whether to batch functional acknowledgements. - BatchFunctionalAcknowledgements *bool `json:"batchFunctionalAcknowledgements,omitempty"` - // NeedImplementationAcknowledgement - The value indicating whether implementation acknowledgement is needed. - NeedImplementationAcknowledgement *bool `json:"needImplementationAcknowledgement,omitempty"` - // ImplementationAcknowledgementVersion - The implementation acknowledgement version. - ImplementationAcknowledgementVersion *string `json:"implementationAcknowledgementVersion,omitempty"` - // BatchImplementationAcknowledgements - The value indicating whether to batch implementation acknowledgements. - BatchImplementationAcknowledgements *bool `json:"batchImplementationAcknowledgements,omitempty"` - // NeedLoopForValidMessages - The value indicating whether a loop is needed for valid messages. - NeedLoopForValidMessages *bool `json:"needLoopForValidMessages,omitempty"` - // SendSynchronousAcknowledgement - The value indicating whether to send synchronous acknowledgement. - SendSynchronousAcknowledgement *bool `json:"sendSynchronousAcknowledgement,omitempty"` - // AcknowledgementControlNumberPrefix - The acknowledgement control number prefix. - AcknowledgementControlNumberPrefix *string `json:"acknowledgementControlNumberPrefix,omitempty"` - // AcknowledgementControlNumberSuffix - The acknowledgement control number suffix. - AcknowledgementControlNumberSuffix *string `json:"acknowledgementControlNumberSuffix,omitempty"` - // AcknowledgementControlNumberLowerBound - The acknowledgement control number lower bound. - AcknowledgementControlNumberLowerBound *int32 `json:"acknowledgementControlNumberLowerBound,omitempty"` - // AcknowledgementControlNumberUpperBound - The acknowledgement control number upper bound. - AcknowledgementControlNumberUpperBound *int32 `json:"acknowledgementControlNumberUpperBound,omitempty"` - // RolloverAcknowledgementControlNumber - The value indicating whether to rollover acknowledgement control number. - RolloverAcknowledgementControlNumber *bool `json:"rolloverAcknowledgementControlNumber,omitempty"` -} - -// X12AgreementContent the X12 agreement content. -type X12AgreementContent struct { - // ReceiveAgreement - The X12 one-way receive agreement. - ReceiveAgreement *X12OneWayAgreement `json:"receiveAgreement,omitempty"` - // SendAgreement - The X12 one-way send agreement. - SendAgreement *X12OneWayAgreement `json:"sendAgreement,omitempty"` -} - -// X12DelimiterOverrides the X12 delimiter override settings. -type X12DelimiterOverrides struct { - // ProtocolVersion - The protocol version. - ProtocolVersion *string `json:"protocolVersion,omitempty"` - // MessageID - The message id. - MessageID *string `json:"messageId,omitempty"` - // DataElementSeparator - The data element separator. - DataElementSeparator *int32 `json:"dataElementSeparator,omitempty"` - // ComponentSeparator - The component separator. - ComponentSeparator *int32 `json:"componentSeparator,omitempty"` - // SegmentTerminator - The segment terminator. - SegmentTerminator *int32 `json:"segmentTerminator,omitempty"` - // SegmentTerminatorSuffix - The segment terminator suffix. Possible values include: 'SegmentTerminatorSuffixNotSpecified', 'SegmentTerminatorSuffixNone', 'SegmentTerminatorSuffixCR', 'SegmentTerminatorSuffixLF', 'SegmentTerminatorSuffixCRLF' - SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix,omitempty"` - // ReplaceCharacter - The replacement character. - ReplaceCharacter *int32 `json:"replaceCharacter,omitempty"` - // ReplaceSeparatorsInPayload - The value indicating whether to replace separators in payload. - ReplaceSeparatorsInPayload *bool `json:"replaceSeparatorsInPayload,omitempty"` - // TargetNamespace - The target namespace on which this delimiter settings has to be applied. - TargetNamespace *string `json:"targetNamespace,omitempty"` -} - -// X12EnvelopeOverride the X12 envelope override settings. -type X12EnvelopeOverride struct { - // TargetNamespace - The target namespace on which this envelope settings has to be applied. - TargetNamespace *string `json:"targetNamespace,omitempty"` - // ProtocolVersion - The protocol version on which this envelope settings has to be applied. - ProtocolVersion *string `json:"protocolVersion,omitempty"` - // MessageID - The message id on which this envelope settings has to be applied. - MessageID *string `json:"messageId,omitempty"` - // ResponsibleAgencyCode - The responsible agency code. - ResponsibleAgencyCode *string `json:"responsibleAgencyCode,omitempty"` - // HeaderVersion - The header version. - HeaderVersion *string `json:"headerVersion,omitempty"` - // SenderApplicationID - The sender application id. - SenderApplicationID *string `json:"senderApplicationId,omitempty"` - // ReceiverApplicationID - The receiver application id. - ReceiverApplicationID *string `json:"receiverApplicationId,omitempty"` - // FunctionalIdentifierCode - The functional identifier code. - FunctionalIdentifierCode *string `json:"functionalIdentifierCode,omitempty"` - // DateFormat - The date format. Possible values include: 'X12DateFormatNotSpecified', 'X12DateFormatCCYYMMDD', 'X12DateFormatYYMMDD' - DateFormat X12DateFormat `json:"dateFormat,omitempty"` - // TimeFormat - The time format. Possible values include: 'X12TimeFormatNotSpecified', 'X12TimeFormatHHMM', 'X12TimeFormatHHMMSS', 'X12TimeFormatHHMMSSdd', 'X12TimeFormatHHMMSSd' - TimeFormat X12TimeFormat `json:"timeFormat,omitempty"` -} - -// X12EnvelopeSettings the X12 agreement envelope settings. -type X12EnvelopeSettings struct { - // ControlStandardsID - The controls standards id. - ControlStandardsID *int32 `json:"controlStandardsId,omitempty"` - // UseControlStandardsIDAsRepetitionCharacter - The value indicating whether to use control standards id as repetition character. - UseControlStandardsIDAsRepetitionCharacter *bool `json:"useControlStandardsIdAsRepetitionCharacter,omitempty"` - // SenderApplicationID - The sender application id. - SenderApplicationID *string `json:"senderApplicationId,omitempty"` - // ReceiverApplicationID - The receiver application id. - ReceiverApplicationID *string `json:"receiverApplicationId,omitempty"` - // ControlVersionNumber - The control version number. - ControlVersionNumber *string `json:"controlVersionNumber,omitempty"` - // InterchangeControlNumberLowerBound - The interchange control number lower bound. - InterchangeControlNumberLowerBound *int32 `json:"interchangeControlNumberLowerBound,omitempty"` - // InterchangeControlNumberUpperBound - The interchange control number upper bound. - InterchangeControlNumberUpperBound *int32 `json:"interchangeControlNumberUpperBound,omitempty"` - // RolloverInterchangeControlNumber - The value indicating whether to rollover interchange control number. - RolloverInterchangeControlNumber *bool `json:"rolloverInterchangeControlNumber,omitempty"` - // EnableDefaultGroupHeaders - The value indicating whether to enable default group headers. - EnableDefaultGroupHeaders *bool `json:"enableDefaultGroupHeaders,omitempty"` - // FunctionalGroupID - The functional group id. - FunctionalGroupID *string `json:"functionalGroupId,omitempty"` - // GroupControlNumberLowerBound - The group control number lower bound. - GroupControlNumberLowerBound *int32 `json:"groupControlNumberLowerBound,omitempty"` - // GroupControlNumberUpperBound - The group control number upper bound. - GroupControlNumberUpperBound *int32 `json:"groupControlNumberUpperBound,omitempty"` - // RolloverGroupControlNumber - The value indicating whether to rollover group control number. - RolloverGroupControlNumber *bool `json:"rolloverGroupControlNumber,omitempty"` - // GroupHeaderAgencyCode - The group header agency code. - GroupHeaderAgencyCode *string `json:"groupHeaderAgencyCode,omitempty"` - // GroupHeaderVersion - The group header version. - GroupHeaderVersion *string `json:"groupHeaderVersion,omitempty"` - // TransactionSetControlNumberLowerBound - The transaction set control number lower bound. - TransactionSetControlNumberLowerBound *int32 `json:"transactionSetControlNumberLowerBound,omitempty"` - // TransactionSetControlNumberUpperBound - The transaction set control number upper bound. - TransactionSetControlNumberUpperBound *int32 `json:"transactionSetControlNumberUpperBound,omitempty"` - // RolloverTransactionSetControlNumber - The value indicating whether to rollover transaction set control number. - RolloverTransactionSetControlNumber *bool `json:"rolloverTransactionSetControlNumber,omitempty"` - // TransactionSetControlNumberPrefix - The transaction set control number prefix. - TransactionSetControlNumberPrefix *string `json:"transactionSetControlNumberPrefix,omitempty"` - // TransactionSetControlNumberSuffix - The transaction set control number suffix. - TransactionSetControlNumberSuffix *string `json:"transactionSetControlNumberSuffix,omitempty"` - // OverwriteExistingTransactionSetControlNumber - The value indicating whether to overwrite existing transaction set control number. - OverwriteExistingTransactionSetControlNumber *bool `json:"overwriteExistingTransactionSetControlNumber,omitempty"` - // GroupHeaderDateFormat - The group header date format. Possible values include: 'X12DateFormatNotSpecified', 'X12DateFormatCCYYMMDD', 'X12DateFormatYYMMDD' - GroupHeaderDateFormat X12DateFormat `json:"groupHeaderDateFormat,omitempty"` - // GroupHeaderTimeFormat - The group header time format. Possible values include: 'X12TimeFormatNotSpecified', 'X12TimeFormatHHMM', 'X12TimeFormatHHMMSS', 'X12TimeFormatHHMMSSdd', 'X12TimeFormatHHMMSSd' - GroupHeaderTimeFormat X12TimeFormat `json:"groupHeaderTimeFormat,omitempty"` - // UsageIndicator - The usage indicator. Possible values include: 'UsageIndicatorNotSpecified', 'UsageIndicatorTest', 'UsageIndicatorInformation', 'UsageIndicatorProduction' - UsageIndicator UsageIndicator `json:"usageIndicator,omitempty"` -} - -// X12FramingSettings the X12 agreement framing settings. -type X12FramingSettings struct { - // DataElementSeparator - The data element separator. - DataElementSeparator *int32 `json:"dataElementSeparator,omitempty"` - // ComponentSeparator - The component separator. - ComponentSeparator *int32 `json:"componentSeparator,omitempty"` - // ReplaceSeparatorsInPayload - The value indicating whether to replace separators in payload. - ReplaceSeparatorsInPayload *bool `json:"replaceSeparatorsInPayload,omitempty"` - // ReplaceCharacter - The replacement character. - ReplaceCharacter *int32 `json:"replaceCharacter,omitempty"` - // SegmentTerminator - The segment terminator. - SegmentTerminator *int32 `json:"segmentTerminator,omitempty"` - // CharacterSet - The X12 character set. Possible values include: 'X12CharacterSetNotSpecified', 'X12CharacterSetBasic', 'X12CharacterSetExtended', 'X12CharacterSetUTF8' - CharacterSet X12CharacterSet `json:"characterSet,omitempty"` - // SegmentTerminatorSuffix - The segment terminator suffix. Possible values include: 'SegmentTerminatorSuffixNotSpecified', 'SegmentTerminatorSuffixNone', 'SegmentTerminatorSuffixCR', 'SegmentTerminatorSuffixLF', 'SegmentTerminatorSuffixCRLF' - SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix,omitempty"` -} - -// X12MessageFilter the X12 message filter for odata query. -type X12MessageFilter struct { - // MessageFilterType - The message filter type. Possible values include: 'MessageFilterTypeNotSpecified', 'MessageFilterTypeInclude', 'MessageFilterTypeExclude' - MessageFilterType MessageFilterType `json:"messageFilterType,omitempty"` -} - -// X12MessageIdentifier the X12 message identifier. -type X12MessageIdentifier struct { - // MessageID - The message id. - MessageID *string `json:"messageId,omitempty"` -} - -// X12OneWayAgreement the X12 one-way agreement. -type X12OneWayAgreement struct { - // SenderBusinessIdentity - The sender business identity - SenderBusinessIdentity *BusinessIdentity `json:"senderBusinessIdentity,omitempty"` - // ReceiverBusinessIdentity - The receiver business identity - ReceiverBusinessIdentity *BusinessIdentity `json:"receiverBusinessIdentity,omitempty"` - // ProtocolSettings - The X12 protocol settings. - ProtocolSettings *X12ProtocolSettings `json:"protocolSettings,omitempty"` -} - -// X12ProcessingSettings the X12 processing settings. -type X12ProcessingSettings struct { - // MaskSecurityInfo - The value indicating whether to mask security information. - MaskSecurityInfo *bool `json:"maskSecurityInfo,omitempty"` - // ConvertImpliedDecimal - The value indicating whether to convert numerical type to implied decimal. - ConvertImpliedDecimal *bool `json:"convertImpliedDecimal,omitempty"` - // PreserveInterchange - The value indicating whether to preserve interchange. - PreserveInterchange *bool `json:"preserveInterchange,omitempty"` - // SuspendInterchangeOnError - The value indicating whether to suspend interchange on error. - SuspendInterchangeOnError *bool `json:"suspendInterchangeOnError,omitempty"` - // CreateEmptyXMLTagsForTrailingSeparators - The value indicating whether to create empty xml tags for trailing separators. - CreateEmptyXMLTagsForTrailingSeparators *bool `json:"createEmptyXmlTagsForTrailingSeparators,omitempty"` - // UseDotAsDecimalSeparator - The value indicating whether to use dot as decimal separator. - UseDotAsDecimalSeparator *bool `json:"useDotAsDecimalSeparator,omitempty"` -} - -// X12ProtocolSettings the X12 agreement protocol settings. -type X12ProtocolSettings struct { - // ValidationSettings - The X12 validation settings. - ValidationSettings *X12ValidationSettings `json:"validationSettings,omitempty"` - // FramingSettings - The X12 framing settings. - FramingSettings *X12FramingSettings `json:"framingSettings,omitempty"` - // EnvelopeSettings - The X12 envelope settings. - EnvelopeSettings *X12EnvelopeSettings `json:"envelopeSettings,omitempty"` - // AcknowledgementSettings - The X12 acknowledgment settings. - AcknowledgementSettings *X12AcknowledgementSettings `json:"acknowledgementSettings,omitempty"` - // MessageFilter - The X12 message filter. - MessageFilter *X12MessageFilter `json:"messageFilter,omitempty"` - // SecuritySettings - The X12 security settings. - SecuritySettings *X12SecuritySettings `json:"securitySettings,omitempty"` - // ProcessingSettings - The X12 processing settings. - ProcessingSettings *X12ProcessingSettings `json:"processingSettings,omitempty"` - // EnvelopeOverrides - The X12 envelope override settings. - EnvelopeOverrides *[]X12EnvelopeOverride `json:"envelopeOverrides,omitempty"` - // ValidationOverrides - The X12 validation override settings. - ValidationOverrides *[]X12ValidationOverride `json:"validationOverrides,omitempty"` - // MessageFilterList - The X12 message filter list. - MessageFilterList *[]X12MessageIdentifier `json:"messageFilterList,omitempty"` - // SchemaReferences - The X12 schema references. - SchemaReferences *[]X12SchemaReference `json:"schemaReferences,omitempty"` - // X12DelimiterOverrides - The X12 delimiter override settings. - X12DelimiterOverrides *[]X12DelimiterOverrides `json:"x12DelimiterOverrides,omitempty"` -} - -// X12SchemaReference the X12 schema reference. -type X12SchemaReference struct { - // MessageID - The message id. - MessageID *string `json:"messageId,omitempty"` - // SenderApplicationID - The sender application id. - SenderApplicationID *string `json:"senderApplicationId,omitempty"` - // SchemaVersion - The schema version. - SchemaVersion *string `json:"schemaVersion,omitempty"` - // SchemaName - The schema name. - SchemaName *string `json:"schemaName,omitempty"` -} - -// X12SecuritySettings the X12 agreement security settings. -type X12SecuritySettings struct { - // AuthorizationQualifier - The authorization qualifier. - AuthorizationQualifier *string `json:"authorizationQualifier,omitempty"` - // AuthorizationValue - The authorization value. - AuthorizationValue *string `json:"authorizationValue,omitempty"` - // SecurityQualifier - The security qualifier. - SecurityQualifier *string `json:"securityQualifier,omitempty"` - // PasswordValue - The password value. - PasswordValue *string `json:"passwordValue,omitempty"` -} - -// X12ValidationOverride the X12 validation override settings. -type X12ValidationOverride struct { - // MessageID - The message id on which the validation settings has to be applied. - MessageID *string `json:"messageId,omitempty"` - // ValidateEDITypes - The value indicating whether to validate EDI types. - ValidateEDITypes *bool `json:"validateEDITypes,omitempty"` - // ValidateXSDTypes - The value indicating whether to validate XSD types. - ValidateXSDTypes *bool `json:"validateXSDTypes,omitempty"` - // AllowLeadingAndTrailingSpacesAndZeroes - The value indicating whether to allow leading and trailing spaces and zeroes. - AllowLeadingAndTrailingSpacesAndZeroes *bool `json:"allowLeadingAndTrailingSpacesAndZeroes,omitempty"` - // ValidateCharacterSet - The value indicating whether to validate character Set. - ValidateCharacterSet *bool `json:"validateCharacterSet,omitempty"` - // TrimLeadingAndTrailingSpacesAndZeroes - The value indicating whether to trim leading and trailing spaces and zeroes. - TrimLeadingAndTrailingSpacesAndZeroes *bool `json:"trimLeadingAndTrailingSpacesAndZeroes,omitempty"` - // TrailingSeparatorPolicy - The trailing separator policy. Possible values include: 'TrailingSeparatorPolicyNotSpecified', 'TrailingSeparatorPolicyNotAllowed', 'TrailingSeparatorPolicyOptional', 'TrailingSeparatorPolicyMandatory' - TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy,omitempty"` -} - -// X12ValidationSettings the X12 agreement validation settings. -type X12ValidationSettings struct { - // ValidateCharacterSet - The value indicating whether to validate character set in the message. - ValidateCharacterSet *bool `json:"validateCharacterSet,omitempty"` - // CheckDuplicateInterchangeControlNumber - The value indicating whether to check for duplicate interchange control number. - CheckDuplicateInterchangeControlNumber *bool `json:"checkDuplicateInterchangeControlNumber,omitempty"` - // InterchangeControlNumberValidityDays - The validity period of interchange control number. - InterchangeControlNumberValidityDays *int32 `json:"interchangeControlNumberValidityDays,omitempty"` - // CheckDuplicateGroupControlNumber - The value indicating whether to check for duplicate group control number. - CheckDuplicateGroupControlNumber *bool `json:"checkDuplicateGroupControlNumber,omitempty"` - // CheckDuplicateTransactionSetControlNumber - The value indicating whether to check for duplicate transaction set control number. - CheckDuplicateTransactionSetControlNumber *bool `json:"checkDuplicateTransactionSetControlNumber,omitempty"` - // ValidateEDITypes - The value indicating whether to Whether to validate EDI types. - ValidateEDITypes *bool `json:"validateEDITypes,omitempty"` - // ValidateXSDTypes - The value indicating whether to Whether to validate XSD types. - ValidateXSDTypes *bool `json:"validateXSDTypes,omitempty"` - // AllowLeadingAndTrailingSpacesAndZeroes - The value indicating whether to allow leading and trailing spaces and zeroes. - AllowLeadingAndTrailingSpacesAndZeroes *bool `json:"allowLeadingAndTrailingSpacesAndZeroes,omitempty"` - // TrimLeadingAndTrailingSpacesAndZeroes - The value indicating whether to trim leading and trailing spaces and zeroes. - TrimLeadingAndTrailingSpacesAndZeroes *bool `json:"trimLeadingAndTrailingSpacesAndZeroes,omitempty"` - // TrailingSeparatorPolicy - The trailing separator policy. Possible values include: 'TrailingSeparatorPolicyNotSpecified', 'TrailingSeparatorPolicyNotAllowed', 'TrailingSeparatorPolicyOptional', 'TrailingSeparatorPolicyMandatory' - TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/operations.go deleted file mode 100644 index 88a6203eaae2..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/operations.go +++ /dev/null @@ -1,140 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// OperationsClient is the REST API for Azure Logic Apps. -type OperationsClient struct { - BaseClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List lists all of the available Logic REST API operations. -func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.olr.Response.Response != nil { - sc = result.olr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.OperationsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.olr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.OperationsClient", "List", resp, "Failure sending request") - return - } - - result.olr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.OperationsClient", "List", resp, "Failure responding to request") - return - } - if result.olr.hasNextLink() && result.olr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Logic/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.operationListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.OperationsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.OperationsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.OperationsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/version.go deleted file mode 100644 index 028b6457d494..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package logic - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " logic/2019-05-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go deleted file mode 100644 index 68d91e5255ab..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go +++ /dev/null @@ -1,276 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunActionRepetitionsClient is the REST API for Azure Logic Apps. -type WorkflowRunActionRepetitionsClient struct { - BaseClient -} - -// NewWorkflowRunActionRepetitionsClient creates an instance of the WorkflowRunActionRepetitionsClient client. -func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunActionRepetitionsClient { - return NewWorkflowRunActionRepetitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunActionRepetitionsClientWithBaseURI creates an instance of the WorkflowRunActionRepetitionsClient -// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI -// (sovereign clouds, Azure stack). -func NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient { - return WorkflowRunActionRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get get a workflow run action repetition. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -// repetitionName - the workflow repetition. -func (client WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunActionRepetitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "repetitionName": autorest.Encode("path", repetitionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRepetitionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRepetitionsClient) GetResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinition, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List get all of a workflow run action repetitions. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -func (client WorkflowRunActionRepetitionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowRunActionRepetitionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRepetitionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRepetitionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListExpressionTraces lists a workflow run expression trace. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -// repetitionName - the workflow repetition. -func (client WorkflowRunActionRepetitionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result ExpressionTraces, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.ListExpressionTraces") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", nil, "Failure preparing request") - return - } - - resp, err := client.ListExpressionTracesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", resp, "Failure sending request") - return - } - - result, err = client.ListExpressionTracesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", resp, "Failure responding to request") - return - } - - return -} - -// ListExpressionTracesPreparer prepares the ListExpressionTraces request. -func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "repetitionName": autorest.Encode("path", repetitionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListExpressionTracesSender sends the ListExpressionTraces request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListExpressionTracesResponder handles the response to the ListExpressionTraces request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRepetitionsClient) ListExpressionTracesResponder(resp *http.Response) (result ExpressionTraces, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go deleted file mode 100644 index abadb2687575..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go +++ /dev/null @@ -1,241 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunActionRepetitionsRequestHistoriesClient is the REST API for Azure Logic Apps. -type WorkflowRunActionRepetitionsRequestHistoriesClient struct { - BaseClient -} - -// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates an instance of the -// WorkflowRunActionRepetitionsRequestHistoriesClient client. -func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { - return NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRepetitionsRequestHistoriesClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { - return WorkflowRunActionRepetitionsRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a workflow run repetition request history. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -// repetitionName - the workflow repetition. -// requestHistoryName - the request history name. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result RequestHistory, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "repetitionName": autorest.Encode("path", repetitionName), - "requestHistoryName": autorest.Encode("path", requestHistoryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetResponder(resp *http.Response) (result RequestHistory, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list a workflow run repetition request history. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -// repetitionName - the workflow repetition. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result RequestHistoryListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.List") - defer func() { - sc := -1 - if result.rhlr.Response.Response != nil { - sc = result.rhlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rhlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", resp, "Failure sending request") - return - } - - result.rhlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", resp, "Failure responding to request") - return - } - if result.rhlr.hasNextLink() && result.rhlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "repetitionName": autorest.Encode("path", repetitionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListResponder(resp *http.Response) (result RequestHistoryListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) listNextResults(ctx context.Context, lastResults RequestHistoryListResult) (result RequestHistoryListResult, err error) { - req, err := lastResults.requestHistoryListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result RequestHistoryListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go deleted file mode 100644 index d6b8d1f5e714..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go +++ /dev/null @@ -1,237 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunActionRequestHistoriesClient is the REST API for Azure Logic Apps. -type WorkflowRunActionRequestHistoriesClient struct { - BaseClient -} - -// NewWorkflowRunActionRequestHistoriesClient creates an instance of the WorkflowRunActionRequestHistoriesClient -// client. -func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string) WorkflowRunActionRequestHistoriesClient { - return NewWorkflowRunActionRequestHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunActionRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRequestHistoriesClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWorkflowRunActionRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRequestHistoriesClient { - return WorkflowRunActionRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a workflow run request history. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -// requestHistoryName - the request history name. -func (client WorkflowRunActionRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (result RequestHistory, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRequestHistoriesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, requestHistoryName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunActionRequestHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "requestHistoryName": autorest.Encode("path", requestHistoryName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRequestHistoriesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRequestHistoriesClient) GetResponder(resp *http.Response) (result RequestHistory, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list a workflow run request history. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -func (client WorkflowRunActionRequestHistoriesClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result RequestHistoryListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRequestHistoriesClient.List") - defer func() { - sc := -1 - if result.rhlr.Response.Response != nil { - sc = result.rhlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rhlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "List", resp, "Failure sending request") - return - } - - result.rhlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "List", resp, "Failure responding to request") - return - } - if result.rhlr.hasNextLink() && result.rhlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowRunActionRequestHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionRequestHistoriesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionRequestHistoriesClient) ListResponder(resp *http.Response) (result RequestHistoryListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowRunActionRequestHistoriesClient) listNextResults(ctx context.Context, lastResults RequestHistoryListResult) (result RequestHistoryListResult, err error) { - req, err := lastResults.requestHistoryListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowRunActionRequestHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result RequestHistoryListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRequestHistoriesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, runName, actionName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactions.go deleted file mode 100644 index f6811c6ddb4f..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactions.go +++ /dev/null @@ -1,320 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunActionsClient is the REST API for Azure Logic Apps. -type WorkflowRunActionsClient struct { - BaseClient -} - -// NewWorkflowRunActionsClient creates an instance of the WorkflowRunActionsClient client. -func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient { - return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { - return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a workflow run action. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -func (client WorkflowRunActionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunAction, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunActionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionsClient) GetResponder(resp *http.Response) (result WorkflowRunAction, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of workflow run actions. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: Status. -func (client WorkflowRunActionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.List") - defer func() { - sc := -1 - if result.wralr.Response.Response != nil { - sc = result.wralr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wralr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "List", resp, "Failure sending request") - return - } - - result.wralr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "List", resp, "Failure responding to request") - return - } - if result.wralr.hasNextLink() && result.wralr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowRunActionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowRunActionsClient) listNextResults(ctx context.Context, lastResults WorkflowRunActionListResult) (result WorkflowRunActionListResult, err error) { - req, err := lastResults.workflowRunActionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowRunActionsClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, runName, top, filter) - return -} - -// ListExpressionTraces lists a workflow run expression trace. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -func (client WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result ExpressionTraces, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.ListExpressionTraces") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, workflowName, runName, actionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", nil, "Failure preparing request") - return - } - - resp, err := client.ListExpressionTracesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", resp, "Failure sending request") - return - } - - result, err = client.ListExpressionTracesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", resp, "Failure responding to request") - return - } - - return -} - -// ListExpressionTracesPreparer prepares the ListExpressionTraces request. -func (client WorkflowRunActionsClient) ListExpressionTracesPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListExpressionTracesSender sends the ListExpressionTraces request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionsClient) ListExpressionTracesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListExpressionTracesResponder handles the response to the ListExpressionTraces request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionsClient) ListExpressionTracesResponder(resp *http.Response) (result ExpressionTraces, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go deleted file mode 100644 index f81037738f9e..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go +++ /dev/null @@ -1,195 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunActionScopeRepetitionsClient is the REST API for Azure Logic Apps. -type WorkflowRunActionScopeRepetitionsClient struct { - BaseClient -} - -// NewWorkflowRunActionScopeRepetitionsClient creates an instance of the WorkflowRunActionScopeRepetitionsClient -// client. -func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string) WorkflowRunActionScopeRepetitionsClient { - return NewWorkflowRunActionScopeRepetitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunActionScopeRepetitionsClientWithBaseURI creates an instance of the -// WorkflowRunActionScopeRepetitionsClient client using a custom endpoint. Use this when interacting with an Azure -// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWorkflowRunActionScopeRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopeRepetitionsClient { - return WorkflowRunActionScopeRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get get a workflow run action scoped repetition. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -// repetitionName - the workflow repetition. -func (client WorkflowRunActionScopeRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopeRepetitionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopeRepetitionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopeRepetitionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopeRepetitionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunActionScopeRepetitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "repetitionName": autorest.Encode("path", repetitionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionScopeRepetitionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionScopeRepetitionsClient) GetResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinition, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List list the workflow run action scoped repetitions. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// actionName - the workflow action name. -func (client WorkflowRunActionScopeRepetitionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopeRepetitionsClient.List") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopeRepetitionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopeRepetitionsClient", "List", resp, "Failure sending request") - return - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopeRepetitionsClient", "List", resp, "Failure responding to request") - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowRunActionScopeRepetitionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "actionName": autorest.Encode("path", actionName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunActionScopeRepetitionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowRunActionScopeRepetitionsClient) ListResponder(resp *http.Response) (result WorkflowRunActionRepetitionDefinitionCollection, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunoperations.go deleted file mode 100644 index 48bb9bc8a8c9..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowrunoperations.go +++ /dev/null @@ -1,112 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunOperationsClient is the REST API for Azure Logic Apps. -type WorkflowRunOperationsClient struct { - BaseClient -} - -// NewWorkflowRunOperationsClient creates an instance of the WorkflowRunOperationsClient client. -func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperationsClient { - return NewWorkflowRunOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient { - return WorkflowRunOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets an operation for a run. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -// operationID - the workflow operation id. -func (client WorkflowRunOperationsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string) (result WorkflowRun, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunOperationsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, operationID) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "operationId": autorest.Encode("path", operationID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunOperationsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunOperationsClient) GetResponder(resp *http.Response) (result WorkflowRun, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowruns.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowruns.go deleted file mode 100644 index 8fcf3dfc49c0..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowruns.go +++ /dev/null @@ -1,313 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowRunsClient is the REST API for Azure Logic Apps. -type WorkflowRunsClient struct { - BaseClient -} - -// NewWorkflowRunsClient creates an instance of the WorkflowRunsClient client. -func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { - return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { - return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Cancel cancels a workflow run. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -func (client WorkflowRunsClient) Cancel(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.Cancel") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CancelPreparer(ctx, resourceGroupName, workflowName, runName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Cancel", nil, "Failure preparing request") - return - } - - resp, err := client.CancelSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Cancel", resp, "Failure sending request") - return - } - - result, err = client.CancelResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Cancel", resp, "Failure responding to request") - return - } - - return -} - -// CancelPreparer prepares the Cancel request. -func (client WorkflowRunsClient) CancelPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CancelSender sends the Cancel request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunsClient) CancelSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CancelResponder handles the response to the Cancel request. The method always -// closes the http.Response Body. -func (client WorkflowRunsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a workflow run. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// runName - the workflow run name. -func (client WorkflowRunsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result WorkflowRun, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowRunsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "runName": autorest.Encode("path", runName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowRunsClient) GetResponder(resp *http.Response) (result WorkflowRun, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of workflow runs. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: Status, StartTime, and -// ClientTrackingId. -func (client WorkflowRunsClient) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowRunListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.List") - defer func() { - sc := -1 - if result.wrlr.Response.Response != nil { - sc = result.wrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "List", resp, "Failure sending request") - return - } - - result.wrlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "List", resp, "Failure responding to request") - return - } - if result.wrlr.hasNextLink() && result.wrlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowRunsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowRunsClient) ListResponder(resp *http.Response) (result WorkflowRunListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowRunsClient) listNextResults(ctx context.Context, lastResults WorkflowRunListResult) (result WorkflowRunListResult, err error) { - req, err := lastResults.workflowRunListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowRunsClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowRunListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, top, filter) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflows.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflows.go deleted file mode 100644 index cff18e1d20b0..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflows.go +++ /dev/null @@ -1,1286 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowsClient is the REST API for Azure Logic Apps. -type WorkflowsClient struct { - BaseClient -} - -// NewWorkflowsClient creates an instance of the WorkflowsClient client. -func NewWorkflowsClient(subscriptionID string) WorkflowsClient { - return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { - return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// workflow - the workflow. -func (client WorkflowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workflowName string, workflow Workflow) (result Workflow, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workflowName, workflow) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client WorkflowsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workflowName string, workflow Workflow) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", pathParameters), - autorest.WithJSON(workflow), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) CreateOrUpdateResponder(resp *http.Response) (result Workflow, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -func (client WorkflowsClient) Delete(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, workflowName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client WorkflowsClient) DeletePreparer(ctx context.Context, resourceGroupName string, workflowName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Disable disables a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -func (client WorkflowsClient) Disable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Disable") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DisablePreparer(ctx, resourceGroupName, workflowName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Disable", nil, "Failure preparing request") - return - } - - resp, err := client.DisableSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Disable", resp, "Failure sending request") - return - } - - result, err = client.DisableResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Disable", resp, "Failure responding to request") - return - } - - return -} - -// DisablePreparer prepares the Disable request. -func (client WorkflowsClient) DisablePreparer(ctx context.Context, resourceGroupName string, workflowName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DisableSender sends the Disable request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) DisableSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DisableResponder handles the response to the Disable request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) DisableResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Enable enables a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -func (client WorkflowsClient) Enable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Enable") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.EnablePreparer(ctx, resourceGroupName, workflowName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Enable", nil, "Failure preparing request") - return - } - - resp, err := client.EnableSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Enable", resp, "Failure sending request") - return - } - - result, err = client.EnableResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Enable", resp, "Failure responding to request") - return - } - - return -} - -// EnablePreparer prepares the Enable request. -func (client WorkflowsClient) EnablePreparer(ctx context.Context, resourceGroupName string, workflowName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// EnableSender sends the Enable request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) EnableSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// EnableResponder handles the response to the Enable request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) EnableResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// GenerateUpgradedDefinition generates the upgraded definition for a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// parameters - parameters for generating an upgraded definition. -func (client WorkflowsClient) GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters GenerateUpgradedDefinitionParameters) (result SetObject, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.GenerateUpgradedDefinition") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GenerateUpgradedDefinitionPreparer(ctx, resourceGroupName, workflowName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "GenerateUpgradedDefinition", nil, "Failure preparing request") - return - } - - resp, err := client.GenerateUpgradedDefinitionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "GenerateUpgradedDefinition", resp, "Failure sending request") - return - } - - result, err = client.GenerateUpgradedDefinitionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "GenerateUpgradedDefinition", resp, "Failure responding to request") - return - } - - return -} - -// GenerateUpgradedDefinitionPreparer prepares the GenerateUpgradedDefinition request. -func (client WorkflowsClient) GenerateUpgradedDefinitionPreparer(ctx context.Context, resourceGroupName string, workflowName string, parameters GenerateUpgradedDefinitionParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GenerateUpgradedDefinitionSender sends the GenerateUpgradedDefinition request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) GenerateUpgradedDefinitionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GenerateUpgradedDefinitionResponder handles the response to the GenerateUpgradedDefinition request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) GenerateUpgradedDefinitionResponder(resp *http.Response) (result SetObject, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -func (client WorkflowsClient) Get(ctx context.Context, resourceGroupName string, workflowName string) (result Workflow, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) GetResponder(resp *http.Response) (result Workflow, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroup gets a list of workflows by resource group. -// Parameters: -// resourceGroupName - the resource group name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: State, Trigger, and -// ReferencedResourceId. -func (client WorkflowsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result WorkflowListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.wlr.Response.Response != nil { - sc = result.wlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.wlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.wlr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.wlr.hasNextLink() && result.wlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client WorkflowsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) ListByResourceGroupResponder(resp *http.Response) (result WorkflowListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client WorkflowsClient) listByResourceGroupNextResults(ctx context.Context, lastResults WorkflowListResult) (result WorkflowListResult, err error) { - req, err := lastResults.workflowListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result WorkflowListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, top, filter) - return -} - -// ListBySubscription gets a list of workflows by subscription. -// Parameters: -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: State, Trigger, and -// ReferencedResourceId. -func (client WorkflowsClient) ListBySubscription(ctx context.Context, top *int32, filter string) (result WorkflowListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListBySubscription") - defer func() { - sc := -1 - if result.wlr.Response.Response != nil { - sc = result.wlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.wlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result.wlr, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListBySubscription", resp, "Failure responding to request") - return - } - if result.wlr.hasNextLink() && result.wlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client WorkflowsClient) ListBySubscriptionPreparer(ctx context.Context, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) ListBySubscriptionResponder(resp *http.Response) (result WorkflowListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySubscriptionNextResults retrieves the next set of results, if any. -func (client WorkflowsClient) listBySubscriptionNextResults(ctx context.Context, lastResults WorkflowListResult) (result WorkflowListResult, err error) { - req, err := lastResults.workflowListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowsClient) ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result WorkflowListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListBySubscription") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListBySubscription(ctx, top, filter) - return -} - -// ListCallbackURL get the workflow callback Url. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// listCallbackURL - which callback url to list. -func (client WorkflowsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, listCallbackURL) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListCallbackURLPreparer prepares the ListCallbackURL request. -func (client WorkflowsClient) ListCallbackURLPreparer(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl", pathParameters), - autorest.WithJSON(listCallbackURL), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCallbackURLSender sends the ListCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) ListCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCallbackURLResponder handles the response to the ListCallbackURL request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) ListCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListSwagger gets an OpenAPI definition for the workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -func (client WorkflowsClient) ListSwagger(ctx context.Context, resourceGroupName string, workflowName string) (result SetObject, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListSwagger") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListSwaggerPreparer(ctx, resourceGroupName, workflowName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListSwagger", nil, "Failure preparing request") - return - } - - resp, err := client.ListSwaggerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListSwagger", resp, "Failure sending request") - return - } - - result, err = client.ListSwaggerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListSwagger", resp, "Failure responding to request") - return - } - - return -} - -// ListSwaggerPreparer prepares the ListSwagger request. -func (client WorkflowsClient) ListSwaggerPreparer(ctx context.Context, resourceGroupName string, workflowName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSwaggerSender sends the ListSwagger request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) ListSwaggerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListSwaggerResponder handles the response to the ListSwagger request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) ListSwaggerResponder(resp *http.Response) (result SetObject, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Move moves an existing workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// move - the workflow to move. -func (client WorkflowsClient) Move(ctx context.Context, resourceGroupName string, workflowName string, move WorkflowReference) (result WorkflowsMoveFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Move") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.MovePreparer(ctx, resourceGroupName, workflowName, move) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Move", nil, "Failure preparing request") - return - } - - result, err = client.MoveSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Move", result.Response(), "Failure sending request") - return - } - - return -} - -// MovePreparer prepares the Move request. -func (client WorkflowsClient) MovePreparer(ctx context.Context, resourceGroupName string, workflowName string, move WorkflowReference) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move", pathParameters), - autorest.WithJSON(move), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// MoveSender sends the Move request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) MoveSender(req *http.Request) (future WorkflowsMoveFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// MoveResponder handles the response to the Move request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) MoveResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// RegenerateAccessKey regenerates the callback URL access key for request triggers. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// keyType - the access key type. -func (client WorkflowsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, workflowName string, keyType RegenerateActionParameter) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.RegenerateAccessKey") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RegenerateAccessKeyPreparer(ctx, resourceGroupName, workflowName, keyType) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "RegenerateAccessKey", nil, "Failure preparing request") - return - } - - resp, err := client.RegenerateAccessKeySender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "RegenerateAccessKey", resp, "Failure sending request") - return - } - - result, err = client.RegenerateAccessKeyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "RegenerateAccessKey", resp, "Failure responding to request") - return - } - - return -} - -// RegenerateAccessKeyPreparer prepares the RegenerateAccessKey request. -func (client WorkflowsClient) RegenerateAccessKeyPreparer(ctx context.Context, resourceGroupName string, workflowName string, keyType RegenerateActionParameter) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey", pathParameters), - autorest.WithJSON(keyType), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RegenerateAccessKeySender sends the RegenerateAccessKey request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) RegenerateAccessKeySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RegenerateAccessKeyResponder handles the response to the RegenerateAccessKey request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) RegenerateAccessKeyResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Update updates a workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -func (client WorkflowsClient) Update(ctx context.Context, resourceGroupName string, workflowName string) (result Workflow, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, workflowName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client WorkflowsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workflowName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) UpdateResponder(resp *http.Response) (result Workflow, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ValidateByLocation validates the workflow definition. -// Parameters: -// resourceGroupName - the resource group name. -// location - the workflow location. -// workflowName - the workflow name. -// validate - the workflow. -func (client WorkflowsClient) ValidateByLocation(ctx context.Context, resourceGroupName string, location string, workflowName string, validate Workflow) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ValidateByLocation") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ValidateByLocationPreparer(ctx, resourceGroupName, location, workflowName, validate) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateByLocation", nil, "Failure preparing request") - return - } - - resp, err := client.ValidateByLocationSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateByLocation", resp, "Failure sending request") - return - } - - result, err = client.ValidateByLocationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateByLocation", resp, "Failure responding to request") - return - } - - return -} - -// ValidateByLocationPreparer prepares the ValidateByLocation request. -func (client WorkflowsClient) ValidateByLocationPreparer(ctx context.Context, resourceGroupName string, location string, workflowName string, validate Workflow) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "location": autorest.Encode("path", location), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate", pathParameters), - autorest.WithJSON(validate), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ValidateByLocationSender sends the ValidateByLocation request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) ValidateByLocationSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ValidateByLocationResponder handles the response to the ValidateByLocation request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) ValidateByLocationResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// ValidateByResourceGroup validates the workflow. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// validate - the workflow. -func (client WorkflowsClient) ValidateByResourceGroup(ctx context.Context, resourceGroupName string, workflowName string, validate Workflow) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ValidateByResourceGroup") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ValidateByResourceGroupPreparer(ctx, resourceGroupName, workflowName, validate) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ValidateByResourceGroupSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateByResourceGroup", resp, "Failure sending request") - return - } - - result, err = client.ValidateByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateByResourceGroup", resp, "Failure responding to request") - return - } - - return -} - -// ValidateByResourceGroupPreparer prepares the ValidateByResourceGroup request. -func (client WorkflowsClient) ValidateByResourceGroupPreparer(ctx context.Context, resourceGroupName string, workflowName string, validate Workflow) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate", pathParameters), - autorest.WithJSON(validate), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ValidateByResourceGroupSender sends the ValidateByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowsClient) ValidateByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ValidateByResourceGroupResponder handles the response to the ValidateByResourceGroup request. The method always -// closes the http.Response Body. -func (client WorkflowsClient) ValidateByResourceGroupResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go deleted file mode 100644 index b16194dc9868..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go +++ /dev/null @@ -1,322 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowTriggerHistoriesClient is the REST API for Azure Logic Apps. -type WorkflowTriggerHistoriesClient struct { - BaseClient -} - -// NewWorkflowTriggerHistoriesClient creates an instance of the WorkflowTriggerHistoriesClient client. -func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHistoriesClient { - return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client using -// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). -func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { - return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a workflow trigger history. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -// historyName - the workflow trigger history name. Corresponds to the run name for triggers that resulted in a -// run. -func (client WorkflowTriggerHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result WorkflowTriggerHistory, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, triggerName, historyName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowTriggerHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "historyName": autorest.Encode("path", historyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggerHistoriesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowTriggerHistoriesClient) GetResponder(resp *http.Response) (result WorkflowTriggerHistory, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of workflow trigger histories. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. Options for filters include: Status, StartTime, and -// ClientTrackingId. -func (client WorkflowTriggerHistoriesClient) List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.List") - defer func() { - sc := -1 - if result.wthlr.Response.Response != nil { - sc = result.wthlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, triggerName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wthlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "List", resp, "Failure sending request") - return - } - - result.wthlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "List", resp, "Failure responding to request") - return - } - if result.wthlr.hasNextLink() && result.wthlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowTriggerHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggerHistoriesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowTriggerHistoriesClient) ListResponder(resp *http.Response) (result WorkflowTriggerHistoryListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowTriggerHistoriesClient) listNextResults(ctx context.Context, lastResults WorkflowTriggerHistoryListResult) (result WorkflowTriggerHistoryListResult, err error) { - req, err := lastResults.workflowTriggerHistoryListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowTriggerHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, triggerName, top, filter) - return -} - -// Resubmit resubmits a workflow run based on the trigger history. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -// historyName - the workflow trigger history name. Corresponds to the run name for triggers that resulted in a -// run. -func (client WorkflowTriggerHistoriesClient) Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.Resubmit") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ResubmitPreparer(ctx, resourceGroupName, workflowName, triggerName, historyName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Resubmit", nil, "Failure preparing request") - return - } - - resp, err := client.ResubmitSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Resubmit", resp, "Failure sending request") - return - } - - result, err = client.ResubmitResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Resubmit", resp, "Failure responding to request") - return - } - - return -} - -// ResubmitPreparer prepares the Resubmit request. -func (client WorkflowTriggerHistoriesClient) ResubmitPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "historyName": autorest.Encode("path", historyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResubmitSender sends the Resubmit request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggerHistoriesClient) ResubmitSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ResubmitResponder handles the response to the Resubmit request. The method always -// closes the http.Response Body. -func (client WorkflowTriggerHistoriesClient) ResubmitResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowtriggers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowtriggers.go deleted file mode 100644 index 665f54ae5e37..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowtriggers.go +++ /dev/null @@ -1,633 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowTriggersClient is the REST API for Azure Logic Apps. -type WorkflowTriggersClient struct { - BaseClient -} - -// NewWorkflowTriggersClient creates an instance of the WorkflowTriggersClient client. -func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { - return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { - return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a workflow trigger. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -func (client WorkflowTriggersClient) Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result WorkflowTrigger, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, triggerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowTriggersClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) GetResponder(resp *http.Response) (result WorkflowTrigger, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetSchemaJSON get the trigger schema as JSON. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -func (client WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result JSONSchema, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.GetSchemaJSON") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetSchemaJSONPreparer(ctx, resourceGroupName, workflowName, triggerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", nil, "Failure preparing request") - return - } - - resp, err := client.GetSchemaJSONSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", resp, "Failure sending request") - return - } - - result, err = client.GetSchemaJSONResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", resp, "Failure responding to request") - return - } - - return -} - -// GetSchemaJSONPreparer prepares the GetSchemaJSON request. -func (client WorkflowTriggersClient) GetSchemaJSONPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSchemaJSONSender sends the GetSchemaJSON request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) GetSchemaJSONSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetSchemaJSONResponder handles the response to the GetSchemaJSON request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) GetSchemaJSONResponder(resp *http.Response) (result JSONSchema, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of workflow triggers. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// top - the number of items to be included in the result. -// filter - the filter to apply on the operation. -func (client WorkflowTriggersClient) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.List") - defer func() { - sc := -1 - if result.wtlr.Response.Response != nil { - sc = result.wtlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, top, filter) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wtlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "List", resp, "Failure sending request") - return - } - - result.wtlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "List", resp, "Failure responding to request") - return - } - if result.wtlr.hasNextLink() && result.wtlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowTriggersClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) ListResponder(resp *http.Response) (result WorkflowTriggerListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowTriggersClient) listNextResults(ctx context.Context, lastResults WorkflowTriggerListResult) (result WorkflowTriggerListResult, err error) { - req, err := lastResults.workflowTriggerListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowTriggersClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, top, filter) - return -} - -// ListCallbackURL get the callback URL for a workflow trigger. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -func (client WorkflowTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.ListCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, triggerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "ListCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "ListCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "ListCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListCallbackURLPreparer prepares the ListCallbackURL request. -func (client WorkflowTriggersClient) ListCallbackURLPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCallbackURLSender sends the ListCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) ListCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCallbackURLResponder handles the response to the ListCallbackURL request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) ListCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Reset resets a workflow trigger. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -func (client WorkflowTriggersClient) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Reset") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ResetPreparer(ctx, resourceGroupName, workflowName, triggerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", nil, "Failure preparing request") - return - } - - resp, err := client.ResetSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", resp, "Failure sending request") - return - } - - result, err = client.ResetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", resp, "Failure responding to request") - return - } - - return -} - -// ResetPreparer prepares the Reset request. -func (client WorkflowTriggersClient) ResetPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ResetSender sends the Reset request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) ResetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ResetResponder handles the response to the Reset request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) ResetResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - -// Run runs a workflow trigger. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -func (client WorkflowTriggersClient) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Run") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.RunPreparer(ctx, resourceGroupName, workflowName, triggerName) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Run", nil, "Failure preparing request") - return - } - - resp, err := client.RunSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Run", resp, "Failure sending request") - return - } - - result, err = client.RunResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Run", resp, "Failure responding to request") - return - } - - return -} - -// RunPreparer prepares the Run request. -func (client WorkflowTriggersClient) RunPreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// RunSender sends the Run request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) RunSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// RunResponder handles the response to the Run request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) RunResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// SetState sets the state of a workflow trigger. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// triggerName - the workflow trigger name. -// setState - the workflow trigger state. -func (client WorkflowTriggersClient) SetState(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState SetTriggerStateActionDefinition) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.SetState") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: setState, - Constraints: []validation.Constraint{{Target: "setState.Source", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("logic.WorkflowTriggersClient", "SetState", err.Error()) - } - - req, err := client.SetStatePreparer(ctx, resourceGroupName, workflowName, triggerName, setState) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "SetState", nil, "Failure preparing request") - return - } - - resp, err := client.SetStateSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "SetState", resp, "Failure sending request") - return - } - - result, err = client.SetStateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "SetState", resp, "Failure responding to request") - return - } - - return -} - -// SetStatePreparer prepares the SetState request. -func (client WorkflowTriggersClient) SetStatePreparer(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState SetTriggerStateActionDefinition) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState", pathParameters), - autorest.WithJSON(setState), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// SetStateSender sends the SetState request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowTriggersClient) SetStateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// SetStateResponder handles the response to the SetState request. The method always -// closes the http.Response Body. -func (client WorkflowTriggersClient) SetStateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowversions.go deleted file mode 100644 index 4b2bc9b75d0d..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowversions.go +++ /dev/null @@ -1,232 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowVersionsClient is the REST API for Azure Logic Apps. -type WorkflowVersionsClient struct { - BaseClient -} - -// NewWorkflowVersionsClient creates an instance of the WorkflowVersionsClient client. -func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { - return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { - return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// Get gets a workflow version. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// versionID - the workflow versionId. -func (client WorkflowVersionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (result WorkflowVersion, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, versionID) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client WorkflowVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "versionId": autorest.Encode("path", versionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowVersionsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client WorkflowVersionsClient) GetResponder(resp *http.Response) (result WorkflowVersion, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List gets a list of workflow versions. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// top - the number of items to be included in the result. -func (client WorkflowVersionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result WorkflowVersionListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.List") - defer func() { - sc := -1 - if result.wvlr.Response.Response != nil { - sc = result.wvlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, top) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.wvlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "List", resp, "Failure sending request") - return - } - - result.wvlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "List", resp, "Failure responding to request") - return - } - if result.wvlr.hasNextLink() && result.wvlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client WorkflowVersionsClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowVersionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client WorkflowVersionsClient) ListResponder(resp *http.Response) (result WorkflowVersionListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client WorkflowVersionsClient) listNextResults(ctx context.Context, lastResults WorkflowVersionListResult) (result WorkflowVersionListResult, err error) { - req, err := lastResults.workflowVersionListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client WorkflowVersionsClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result WorkflowVersionListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, workflowName, top) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go deleted file mode 100644 index 015bbf9d504f..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go +++ /dev/null @@ -1,118 +0,0 @@ -package logic - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// WorkflowVersionTriggersClient is the REST API for Azure Logic Apps. -type WorkflowVersionTriggersClient struct { - BaseClient -} - -// NewWorkflowVersionTriggersClient creates an instance of the WorkflowVersionTriggersClient client. -func NewWorkflowVersionTriggersClient(subscriptionID string) WorkflowVersionTriggersClient { - return NewWorkflowVersionTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWorkflowVersionTriggersClientWithBaseURI creates an instance of the WorkflowVersionTriggersClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewWorkflowVersionTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionTriggersClient { - return WorkflowVersionTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListCallbackURL get the callback url for a trigger of a workflow version. -// Parameters: -// resourceGroupName - the resource group name. -// workflowName - the workflow name. -// versionID - the workflow versionId. -// triggerName - the workflow trigger name. -// parameters - the callback URL parameters. -func (client WorkflowVersionTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, versionID string, triggerName string, parameters *GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionTriggersClient.ListCallbackURL") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, versionID, triggerName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionTriggersClient", "ListCallbackURL", nil, "Failure preparing request") - return - } - - resp, err := client.ListCallbackURLSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionTriggersClient", "ListCallbackURL", resp, "Failure sending request") - return - } - - result, err = client.ListCallbackURLResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "logic.WorkflowVersionTriggersClient", "ListCallbackURL", resp, "Failure responding to request") - return - } - - return -} - -// ListCallbackURLPreparer prepares the ListCallbackURL request. -func (client WorkflowVersionTriggersClient) ListCallbackURLPreparer(ctx context.Context, resourceGroupName string, workflowName string, versionID string, triggerName string, parameters *GetCallbackURLParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "triggerName": autorest.Encode("path", triggerName), - "versionId": autorest.Encode("path", versionID), - "workflowName": autorest.Encode("path", workflowName), - } - - const APIVersion = "2019-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if parameters != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(parameters)) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListCallbackURLSender sends the ListCallbackURL request. The method will close the -// http.Response Body if it receives an error. -func (client WorkflowVersionTriggersClient) ListCallbackURLSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListCallbackURLResponder handles the response to the ListCallbackURL request. The method always -// closes the http.Response Body. -func (client WorkflowVersionTriggersClient) ListCallbackURLResponder(resp *http.Response) (result WorkflowTriggerCallbackURL, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md new file mode 100644 index 000000000000..46938743c9db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements` Documentation + +The `integrationaccountagreements` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountagreements" +``` + + +### Client Initialization + +```go +client := integrationaccountagreements.NewIntegrationAccountAgreementsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountAgreementsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountagreements.NewAgreementID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "agreementValue") + +payload := integrationaccountagreements.IntegrationAccountAgreement{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountAgreementsClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountagreements.NewAgreementID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "agreementValue") + +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: `IntegrationAccountAgreementsClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountagreements.NewAgreementID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "agreementValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountAgreementsClient.List` + +```go +ctx := context.TODO() +id := integrationaccountagreements.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +// alternatively `client.List(ctx, id, integrationaccountagreements.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, integrationaccountagreements.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationAccountAgreementsClient.ListContentCallbackUrl` + +```go +ctx := context.TODO() +id := integrationaccountagreements.NewAgreementID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "agreementValue") + +payload := integrationaccountagreements.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.ListContentCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go new file mode 100644 index 000000000000..e8ab61376e74 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go @@ -0,0 +1,18 @@ +package integrationaccountagreements + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountAgreementsClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountAgreementsClientWithBaseURI(endpoint string) IntegrationAccountAgreementsClient { + return IntegrationAccountAgreementsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/constants.go new file mode 100644 index 000000000000..3d80c637771a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/constants.go @@ -0,0 +1,533 @@ +package integrationaccountagreements + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgreementType string + +const ( + AgreementTypeASTwo AgreementType = "AS2" + AgreementTypeEdifact AgreementType = "Edifact" + AgreementTypeNotSpecified AgreementType = "NotSpecified" + AgreementTypeXOneTwo AgreementType = "X12" +) + +func PossibleValuesForAgreementType() []string { + return []string{ + string(AgreementTypeASTwo), + string(AgreementTypeEdifact), + string(AgreementTypeNotSpecified), + string(AgreementTypeXOneTwo), + } +} + +func parseAgreementType(input string) (*AgreementType, error) { + vals := map[string]AgreementType{ + "as2": AgreementTypeASTwo, + "edifact": AgreementTypeEdifact, + "notspecified": AgreementTypeNotSpecified, + "x12": AgreementTypeXOneTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AgreementType(input) + return &out, nil +} + +type EdifactCharacterSet string + +const ( + EdifactCharacterSetKECA EdifactCharacterSet = "KECA" + EdifactCharacterSetNotSpecified EdifactCharacterSet = "NotSpecified" + EdifactCharacterSetUNOA EdifactCharacterSet = "UNOA" + EdifactCharacterSetUNOB EdifactCharacterSet = "UNOB" + EdifactCharacterSetUNOC EdifactCharacterSet = "UNOC" + EdifactCharacterSetUNOD EdifactCharacterSet = "UNOD" + EdifactCharacterSetUNOE EdifactCharacterSet = "UNOE" + EdifactCharacterSetUNOF EdifactCharacterSet = "UNOF" + EdifactCharacterSetUNOG EdifactCharacterSet = "UNOG" + EdifactCharacterSetUNOH EdifactCharacterSet = "UNOH" + EdifactCharacterSetUNOI EdifactCharacterSet = "UNOI" + EdifactCharacterSetUNOJ EdifactCharacterSet = "UNOJ" + EdifactCharacterSetUNOK EdifactCharacterSet = "UNOK" + EdifactCharacterSetUNOX EdifactCharacterSet = "UNOX" + EdifactCharacterSetUNOY EdifactCharacterSet = "UNOY" +) + +func PossibleValuesForEdifactCharacterSet() []string { + return []string{ + string(EdifactCharacterSetKECA), + string(EdifactCharacterSetNotSpecified), + string(EdifactCharacterSetUNOA), + string(EdifactCharacterSetUNOB), + string(EdifactCharacterSetUNOC), + string(EdifactCharacterSetUNOD), + string(EdifactCharacterSetUNOE), + string(EdifactCharacterSetUNOF), + string(EdifactCharacterSetUNOG), + string(EdifactCharacterSetUNOH), + string(EdifactCharacterSetUNOI), + string(EdifactCharacterSetUNOJ), + string(EdifactCharacterSetUNOK), + string(EdifactCharacterSetUNOX), + string(EdifactCharacterSetUNOY), + } +} + +func parseEdifactCharacterSet(input string) (*EdifactCharacterSet, error) { + vals := map[string]EdifactCharacterSet{ + "keca": EdifactCharacterSetKECA, + "notspecified": EdifactCharacterSetNotSpecified, + "unoa": EdifactCharacterSetUNOA, + "unob": EdifactCharacterSetUNOB, + "unoc": EdifactCharacterSetUNOC, + "unod": EdifactCharacterSetUNOD, + "unoe": EdifactCharacterSetUNOE, + "unof": EdifactCharacterSetUNOF, + "unog": EdifactCharacterSetUNOG, + "unoh": EdifactCharacterSetUNOH, + "unoi": EdifactCharacterSetUNOI, + "unoj": EdifactCharacterSetUNOJ, + "unok": EdifactCharacterSetUNOK, + "unox": EdifactCharacterSetUNOX, + "unoy": EdifactCharacterSetUNOY, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EdifactCharacterSet(input) + return &out, nil +} + +type EdifactDecimalIndicator string + +const ( + EdifactDecimalIndicatorComma EdifactDecimalIndicator = "Comma" + EdifactDecimalIndicatorDecimal EdifactDecimalIndicator = "Decimal" + EdifactDecimalIndicatorNotSpecified EdifactDecimalIndicator = "NotSpecified" +) + +func PossibleValuesForEdifactDecimalIndicator() []string { + return []string{ + string(EdifactDecimalIndicatorComma), + string(EdifactDecimalIndicatorDecimal), + string(EdifactDecimalIndicatorNotSpecified), + } +} + +func parseEdifactDecimalIndicator(input string) (*EdifactDecimalIndicator, error) { + vals := map[string]EdifactDecimalIndicator{ + "comma": EdifactDecimalIndicatorComma, + "decimal": EdifactDecimalIndicatorDecimal, + "notspecified": EdifactDecimalIndicatorNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EdifactDecimalIndicator(input) + return &out, nil +} + +type EncryptionAlgorithm string + +const ( + EncryptionAlgorithmAESOneNineTwo EncryptionAlgorithm = "AES192" + EncryptionAlgorithmAESOneTwoEight EncryptionAlgorithm = "AES128" + EncryptionAlgorithmAESTwoFiveSix EncryptionAlgorithm = "AES256" + EncryptionAlgorithmDESThree EncryptionAlgorithm = "DES3" + EncryptionAlgorithmNone EncryptionAlgorithm = "None" + EncryptionAlgorithmNotSpecified EncryptionAlgorithm = "NotSpecified" + EncryptionAlgorithmRCTwo EncryptionAlgorithm = "RC2" +) + +func PossibleValuesForEncryptionAlgorithm() []string { + return []string{ + string(EncryptionAlgorithmAESOneNineTwo), + string(EncryptionAlgorithmAESOneTwoEight), + string(EncryptionAlgorithmAESTwoFiveSix), + string(EncryptionAlgorithmDESThree), + string(EncryptionAlgorithmNone), + string(EncryptionAlgorithmNotSpecified), + string(EncryptionAlgorithmRCTwo), + } +} + +func parseEncryptionAlgorithm(input string) (*EncryptionAlgorithm, error) { + vals := map[string]EncryptionAlgorithm{ + "aes192": EncryptionAlgorithmAESOneNineTwo, + "aes128": EncryptionAlgorithmAESOneTwoEight, + "aes256": EncryptionAlgorithmAESTwoFiveSix, + "des3": EncryptionAlgorithmDESThree, + "none": EncryptionAlgorithmNone, + "notspecified": EncryptionAlgorithmNotSpecified, + "rc2": EncryptionAlgorithmRCTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EncryptionAlgorithm(input) + return &out, nil +} + +type HashingAlgorithm string + +const ( + HashingAlgorithmMDFive HashingAlgorithm = "MD5" + HashingAlgorithmNone HashingAlgorithm = "None" + HashingAlgorithmNotSpecified HashingAlgorithm = "NotSpecified" + HashingAlgorithmSHAOne HashingAlgorithm = "SHA1" + HashingAlgorithmSHATwoFiveOneTwo HashingAlgorithm = "SHA2512" + HashingAlgorithmSHATwoThreeEightFour HashingAlgorithm = "SHA2384" + HashingAlgorithmSHATwoTwoFiveSix HashingAlgorithm = "SHA2256" +) + +func PossibleValuesForHashingAlgorithm() []string { + return []string{ + string(HashingAlgorithmMDFive), + string(HashingAlgorithmNone), + string(HashingAlgorithmNotSpecified), + string(HashingAlgorithmSHAOne), + string(HashingAlgorithmSHATwoFiveOneTwo), + string(HashingAlgorithmSHATwoThreeEightFour), + string(HashingAlgorithmSHATwoTwoFiveSix), + } +} + +func parseHashingAlgorithm(input string) (*HashingAlgorithm, error) { + vals := map[string]HashingAlgorithm{ + "md5": HashingAlgorithmMDFive, + "none": HashingAlgorithmNone, + "notspecified": HashingAlgorithmNotSpecified, + "sha1": HashingAlgorithmSHAOne, + "sha2512": HashingAlgorithmSHATwoFiveOneTwo, + "sha2384": HashingAlgorithmSHATwoThreeEightFour, + "sha2256": HashingAlgorithmSHATwoTwoFiveSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HashingAlgorithm(input) + return &out, nil +} + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type MessageFilterType string + +const ( + MessageFilterTypeExclude MessageFilterType = "Exclude" + MessageFilterTypeInclude MessageFilterType = "Include" + MessageFilterTypeNotSpecified MessageFilterType = "NotSpecified" +) + +func PossibleValuesForMessageFilterType() []string { + return []string{ + string(MessageFilterTypeExclude), + string(MessageFilterTypeInclude), + string(MessageFilterTypeNotSpecified), + } +} + +func parseMessageFilterType(input string) (*MessageFilterType, error) { + vals := map[string]MessageFilterType{ + "exclude": MessageFilterTypeExclude, + "include": MessageFilterTypeInclude, + "notspecified": MessageFilterTypeNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MessageFilterType(input) + return &out, nil +} + +type SegmentTerminatorSuffix string + +const ( + SegmentTerminatorSuffixCR SegmentTerminatorSuffix = "CR" + SegmentTerminatorSuffixCRLF SegmentTerminatorSuffix = "CRLF" + SegmentTerminatorSuffixLF SegmentTerminatorSuffix = "LF" + SegmentTerminatorSuffixNone SegmentTerminatorSuffix = "None" + SegmentTerminatorSuffixNotSpecified SegmentTerminatorSuffix = "NotSpecified" +) + +func PossibleValuesForSegmentTerminatorSuffix() []string { + return []string{ + string(SegmentTerminatorSuffixCR), + string(SegmentTerminatorSuffixCRLF), + string(SegmentTerminatorSuffixLF), + string(SegmentTerminatorSuffixNone), + string(SegmentTerminatorSuffixNotSpecified), + } +} + +func parseSegmentTerminatorSuffix(input string) (*SegmentTerminatorSuffix, error) { + vals := map[string]SegmentTerminatorSuffix{ + "cr": SegmentTerminatorSuffixCR, + "crlf": SegmentTerminatorSuffixCRLF, + "lf": SegmentTerminatorSuffixLF, + "none": SegmentTerminatorSuffixNone, + "notspecified": SegmentTerminatorSuffixNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SegmentTerminatorSuffix(input) + return &out, nil +} + +type SigningAlgorithm string + +const ( + SigningAlgorithmDefault SigningAlgorithm = "Default" + SigningAlgorithmNotSpecified SigningAlgorithm = "NotSpecified" + SigningAlgorithmSHAOne SigningAlgorithm = "SHA1" + SigningAlgorithmSHATwoFiveOneTwo SigningAlgorithm = "SHA2512" + SigningAlgorithmSHATwoThreeEightFour SigningAlgorithm = "SHA2384" + SigningAlgorithmSHATwoTwoFiveSix SigningAlgorithm = "SHA2256" +) + +func PossibleValuesForSigningAlgorithm() []string { + return []string{ + string(SigningAlgorithmDefault), + string(SigningAlgorithmNotSpecified), + string(SigningAlgorithmSHAOne), + string(SigningAlgorithmSHATwoFiveOneTwo), + string(SigningAlgorithmSHATwoThreeEightFour), + string(SigningAlgorithmSHATwoTwoFiveSix), + } +} + +func parseSigningAlgorithm(input string) (*SigningAlgorithm, error) { + vals := map[string]SigningAlgorithm{ + "default": SigningAlgorithmDefault, + "notspecified": SigningAlgorithmNotSpecified, + "sha1": SigningAlgorithmSHAOne, + "sha2512": SigningAlgorithmSHATwoFiveOneTwo, + "sha2384": SigningAlgorithmSHATwoThreeEightFour, + "sha2256": SigningAlgorithmSHATwoTwoFiveSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SigningAlgorithm(input) + return &out, nil +} + +type TrailingSeparatorPolicy string + +const ( + TrailingSeparatorPolicyMandatory TrailingSeparatorPolicy = "Mandatory" + TrailingSeparatorPolicyNotAllowed TrailingSeparatorPolicy = "NotAllowed" + TrailingSeparatorPolicyNotSpecified TrailingSeparatorPolicy = "NotSpecified" + TrailingSeparatorPolicyOptional TrailingSeparatorPolicy = "Optional" +) + +func PossibleValuesForTrailingSeparatorPolicy() []string { + return []string{ + string(TrailingSeparatorPolicyMandatory), + string(TrailingSeparatorPolicyNotAllowed), + string(TrailingSeparatorPolicyNotSpecified), + string(TrailingSeparatorPolicyOptional), + } +} + +func parseTrailingSeparatorPolicy(input string) (*TrailingSeparatorPolicy, error) { + vals := map[string]TrailingSeparatorPolicy{ + "mandatory": TrailingSeparatorPolicyMandatory, + "notallowed": TrailingSeparatorPolicyNotAllowed, + "notspecified": TrailingSeparatorPolicyNotSpecified, + "optional": TrailingSeparatorPolicyOptional, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TrailingSeparatorPolicy(input) + return &out, nil +} + +type UsageIndicator string + +const ( + UsageIndicatorInformation UsageIndicator = "Information" + UsageIndicatorNotSpecified UsageIndicator = "NotSpecified" + UsageIndicatorProduction UsageIndicator = "Production" + UsageIndicatorTest UsageIndicator = "Test" +) + +func PossibleValuesForUsageIndicator() []string { + return []string{ + string(UsageIndicatorInformation), + string(UsageIndicatorNotSpecified), + string(UsageIndicatorProduction), + string(UsageIndicatorTest), + } +} + +func parseUsageIndicator(input string) (*UsageIndicator, error) { + vals := map[string]UsageIndicator{ + "information": UsageIndicatorInformation, + "notspecified": UsageIndicatorNotSpecified, + "production": UsageIndicatorProduction, + "test": UsageIndicatorTest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageIndicator(input) + return &out, nil +} + +type X12CharacterSet string + +const ( + X12CharacterSetBasic X12CharacterSet = "Basic" + X12CharacterSetExtended X12CharacterSet = "Extended" + X12CharacterSetNotSpecified X12CharacterSet = "NotSpecified" + X12CharacterSetUTFEight X12CharacterSet = "UTF8" +) + +func PossibleValuesForX12CharacterSet() []string { + return []string{ + string(X12CharacterSetBasic), + string(X12CharacterSetExtended), + string(X12CharacterSetNotSpecified), + string(X12CharacterSetUTFEight), + } +} + +func parseX12CharacterSet(input string) (*X12CharacterSet, error) { + vals := map[string]X12CharacterSet{ + "basic": X12CharacterSetBasic, + "extended": X12CharacterSetExtended, + "notspecified": X12CharacterSetNotSpecified, + "utf8": X12CharacterSetUTFEight, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := X12CharacterSet(input) + return &out, nil +} + +type X12DateFormat string + +const ( + X12DateFormatCCYYMMDD X12DateFormat = "CCYYMMDD" + X12DateFormatNotSpecified X12DateFormat = "NotSpecified" + X12DateFormatYYMMDD X12DateFormat = "YYMMDD" +) + +func PossibleValuesForX12DateFormat() []string { + return []string{ + string(X12DateFormatCCYYMMDD), + string(X12DateFormatNotSpecified), + string(X12DateFormatYYMMDD), + } +} + +func parseX12DateFormat(input string) (*X12DateFormat, error) { + vals := map[string]X12DateFormat{ + "ccyymmdd": X12DateFormatCCYYMMDD, + "notspecified": X12DateFormatNotSpecified, + "yymmdd": X12DateFormatYYMMDD, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := X12DateFormat(input) + return &out, nil +} + +type X12TimeFormat string + +const ( + X12TimeFormatHHMM X12TimeFormat = "HHMM" + X12TimeFormatHHMMSS X12TimeFormat = "HHMMSS" + X12TimeFormatHHMMSSd X12TimeFormat = "HHMMSSd" + X12TimeFormatHHMMSSdd X12TimeFormat = "HHMMSSdd" + X12TimeFormatNotSpecified X12TimeFormat = "NotSpecified" +) + +func PossibleValuesForX12TimeFormat() []string { + return []string{ + string(X12TimeFormatHHMM), + string(X12TimeFormatHHMMSS), + string(X12TimeFormatHHMMSSd), + string(X12TimeFormatHHMMSSdd), + string(X12TimeFormatNotSpecified), + } +} + +func parseX12TimeFormat(input string) (*X12TimeFormat, error) { + vals := map[string]X12TimeFormat{ + "hhmm": X12TimeFormatHHMM, + "hhmmss": X12TimeFormatHHMMSS, + "hhmmssd": X12TimeFormatHHMMSSd, + "hhmmssdd": X12TimeFormatHHMMSSdd, + "notspecified": X12TimeFormatNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := X12TimeFormat(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go new file mode 100644 index 000000000000..faeaf6c905de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go @@ -0,0 +1,137 @@ +package integrationaccountagreements + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = AgreementId{} + +// AgreementId is a struct representing the Resource ID for a Agreement +type AgreementId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + AgreementName string +} + +// NewAgreementID returns a new AgreementId struct +func NewAgreementID(subscriptionId string, resourceGroupName string, integrationAccountName string, agreementName string) AgreementId { + return AgreementId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + AgreementName: agreementName, + } +} + +// ParseAgreementID parses 'input' into a AgreementId +func ParseAgreementID(input string) (*AgreementId, error) { + parser := resourceids.NewParserFromResourceIdType(AgreementId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := AgreementId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.AgreementName, ok = parsed.Parsed["agreementName"]; !ok { + return nil, fmt.Errorf("the segment 'agreementName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseAgreementIDInsensitively parses 'input' case-insensitively into a AgreementId +// note: this method should only be used for API response data and not user input +func ParseAgreementIDInsensitively(input string) (*AgreementId, error) { + parser := resourceids.NewParserFromResourceIdType(AgreementId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := AgreementId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.AgreementName, ok = parsed.Parsed["agreementName"]; !ok { + return nil, fmt.Errorf("the segment 'agreementName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateAgreementID checks that 'input' can be parsed as a Agreement ID +func ValidateAgreementID(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 := ParseAgreementID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Agreement ID +func (id AgreementId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/agreements/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.AgreementName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Agreement ID +func (id AgreementId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticAgreements", "agreements", "agreements"), + resourceids.UserSpecifiedSegment("agreementName", "agreementValue"), + } +} + +// String returns a human-readable description of this Agreement ID +func (id AgreementId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Agreement Name: %q", id.AgreementName), + } + return fmt.Sprintf("Agreement (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go new file mode 100644 index 000000000000..0bc84a2f2482 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountagreements + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate_autorest.go new file mode 100644 index 000000000000..47e17dc00432 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountagreements + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountAgreement +} + +// CreateOrUpdate ... +func (c IntegrationAccountAgreementsClient) CreateOrUpdate(ctx context.Context, id AgreementId, input IntegrationAccountAgreement) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountAgreementsClient) preparerForCreateOrUpdate(ctx context.Context, id AgreementId, input IntegrationAccountAgreement) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAgreementsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_delete_autorest.go new file mode 100644 index 000000000000..2c01cbae90e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountagreements + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountAgreementsClient) Delete(ctx context.Context, id AgreementId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountAgreementsClient) preparerForDelete(ctx context.Context, id AgreementId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAgreementsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get_autorest.go new file mode 100644 index 000000000000..c70198069f5d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountagreements + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountAgreement +} + +// Get ... +func (c IntegrationAccountAgreementsClient) Get(ctx context.Context, id AgreementId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountAgreementsClient) preparerForGet(ctx context.Context, id AgreementId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAgreementsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list_autorest.go new file mode 100644 index 000000000000..78077364130a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list_autorest.go @@ -0,0 +1,220 @@ +package integrationaccountagreements + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccountAgreement + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []IntegrationAccountAgreement +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c IntegrationAccountAgreementsClient) List(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountAgreementsClient) preparerForList(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/agreements", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c IntegrationAccountAgreementsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAgreementsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []IntegrationAccountAgreement `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c IntegrationAccountAgreementsClient) ListComplete(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, IntegrationAccountAgreementOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountAgreementsClient) ListCompleteMatchingPredicate(ctx context.Context, id IntegrationAccountId, options ListOperationOptions, predicate IntegrationAccountAgreementOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]IntegrationAccountAgreement, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl_autorest.go new file mode 100644 index 000000000000..251f92b63a14 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package integrationaccountagreements + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListContentCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListContentCallbackUrl ... +func (c IntegrationAccountAgreementsClient) ListContentCallbackUrl(ctx context.Context, id AgreementId, input GetCallbackUrlParameters) (result ListContentCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListContentCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "ListContentCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "ListContentCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListContentCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountagreements.IntegrationAccountAgreementsClient", "ListContentCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListContentCallbackUrl prepares the ListContentCallbackUrl request. +func (c IntegrationAccountAgreementsClient) preparerForListContentCallbackUrl(ctx context.Context, id AgreementId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listContentCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListContentCallbackUrl handles the response to the ListContentCallbackUrl request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAgreementsClient) responderForListContentCallbackUrl(resp *http.Response) (result ListContentCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_agreementcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_agreementcontent.go new file mode 100644 index 000000000000..a08e8f51f67a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_agreementcontent.go @@ -0,0 +1,10 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgreementContent struct { + AS2 *AS2AgreementContent `json:"aS2,omitempty"` + Edifact *EdifactAgreementContent `json:"edifact,omitempty"` + X12 *X12AgreementContent `json:"x12,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2acknowledgementconnectionsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2acknowledgementconnectionsettings.go new file mode 100644 index 000000000000..a4dcda57240c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2acknowledgementconnectionsettings.go @@ -0,0 +1,11 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2AcknowledgementConnectionSettings struct { + IgnoreCertificateNameMismatch bool `json:"ignoreCertificateNameMismatch"` + KeepHTTPConnectionAlive bool `json:"keepHttpConnectionAlive"` + SupportHTTPStatusCodeContinue bool `json:"supportHttpStatusCodeContinue"` + UnfoldHTTPHeaders bool `json:"unfoldHttpHeaders"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2agreementcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2agreementcontent.go new file mode 100644 index 000000000000..49d8094d5c65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2agreementcontent.go @@ -0,0 +1,9 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2AgreementContent struct { + ReceiveAgreement AS2OneWayAgreement `json:"receiveAgreement"` + SendAgreement AS2OneWayAgreement `json:"sendAgreement"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2envelopesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2envelopesettings.go new file mode 100644 index 000000000000..0c9a5594ebc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2envelopesettings.go @@ -0,0 +1,12 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2EnvelopeSettings struct { + AutogenerateFileName bool `json:"autogenerateFileName"` + FileNameTemplate string `json:"fileNameTemplate"` + MessageContentType string `json:"messageContentType"` + SuspendMessageOnFileNameGenerationError bool `json:"suspendMessageOnFileNameGenerationError"` + TransmitFileNameInMimeHeader bool `json:"transmitFileNameInMimeHeader"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2errorsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2errorsettings.go new file mode 100644 index 000000000000..f0d0cb1cf5b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2errorsettings.go @@ -0,0 +1,9 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2ErrorSettings struct { + ResendIfMDNNotReceived bool `json:"resendIfMDNNotReceived"` + SuspendDuplicateMessage bool `json:"suspendDuplicateMessage"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2mdnsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2mdnsettings.go new file mode 100644 index 000000000000..0ac7377dac05 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2mdnsettings.go @@ -0,0 +1,16 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2MdnSettings struct { + DispositionNotificationTo *string `json:"dispositionNotificationTo,omitempty"` + MdnText *string `json:"mdnText,omitempty"` + MicHashingAlgorithm HashingAlgorithm `json:"micHashingAlgorithm"` + NeedMDN bool `json:"needMDN"` + ReceiptDeliveryUrl *string `json:"receiptDeliveryUrl,omitempty"` + SendInboundMDNToMessageBox bool `json:"sendInboundMDNToMessageBox"` + SendMDNAsynchronously bool `json:"sendMDNAsynchronously"` + SignMDN bool `json:"signMDN"` + SignOutboundMDNIfOptional bool `json:"signOutboundMDNIfOptional"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2messageconnectionsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2messageconnectionsettings.go new file mode 100644 index 000000000000..844677e169c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2messageconnectionsettings.go @@ -0,0 +1,11 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2MessageConnectionSettings struct { + IgnoreCertificateNameMismatch bool `json:"ignoreCertificateNameMismatch"` + KeepHTTPConnectionAlive bool `json:"keepHttpConnectionAlive"` + SupportHTTPStatusCodeContinue bool `json:"supportHttpStatusCodeContinue"` + UnfoldHTTPHeaders bool `json:"unfoldHttpHeaders"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2onewayagreement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2onewayagreement.go new file mode 100644 index 000000000000..1c1852d06725 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2onewayagreement.go @@ -0,0 +1,10 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2OneWayAgreement struct { + ProtocolSettings AS2ProtocolSettings `json:"protocolSettings"` + ReceiverBusinessIdentity BusinessIdentity `json:"receiverBusinessIdentity"` + SenderBusinessIdentity BusinessIdentity `json:"senderBusinessIdentity"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2protocolsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2protocolsettings.go new file mode 100644 index 000000000000..e5d78407290b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2protocolsettings.go @@ -0,0 +1,14 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2ProtocolSettings struct { + AcknowledgementConnectionSettings AS2AcknowledgementConnectionSettings `json:"acknowledgementConnectionSettings"` + EnvelopeSettings AS2EnvelopeSettings `json:"envelopeSettings"` + ErrorSettings AS2ErrorSettings `json:"errorSettings"` + MdnSettings AS2MdnSettings `json:"mdnSettings"` + MessageConnectionSettings AS2MessageConnectionSettings `json:"messageConnectionSettings"` + SecuritySettings AS2SecuritySettings `json:"securitySettings"` + ValidationSettings AS2ValidationSettings `json:"validationSettings"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2securitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2securitysettings.go new file mode 100644 index 000000000000..82c959e3a2b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2securitysettings.go @@ -0,0 +1,17 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2SecuritySettings struct { + EnableNRRForInboundDecodedMessages bool `json:"enableNRRForInboundDecodedMessages"` + EnableNRRForInboundEncodedMessages bool `json:"enableNRRForInboundEncodedMessages"` + EnableNRRForInboundMDN bool `json:"enableNRRForInboundMDN"` + EnableNRRForOutboundDecodedMessages bool `json:"enableNRRForOutboundDecodedMessages"` + EnableNRRForOutboundEncodedMessages bool `json:"enableNRRForOutboundEncodedMessages"` + EnableNRRForOutboundMDN bool `json:"enableNRRForOutboundMDN"` + EncryptionCertificateName *string `json:"encryptionCertificateName,omitempty"` + OverrideGroupSigningCertificate bool `json:"overrideGroupSigningCertificate"` + Sha2AlgorithmFormat *string `json:"sha2AlgorithmFormat,omitempty"` + SigningCertificateName *string `json:"signingCertificateName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2validationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2validationsettings.go new file mode 100644 index 000000000000..7c7a3fdca921 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_as2validationsettings.go @@ -0,0 +1,17 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AS2ValidationSettings struct { + CheckCertificateRevocationListOnReceive bool `json:"checkCertificateRevocationListOnReceive"` + CheckCertificateRevocationListOnSend bool `json:"checkCertificateRevocationListOnSend"` + CheckDuplicateMessage bool `json:"checkDuplicateMessage"` + CompressMessage bool `json:"compressMessage"` + EncryptMessage bool `json:"encryptMessage"` + EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm"` + InterchangeDuplicatesValidityDays int64 `json:"interchangeDuplicatesValidityDays"` + OverrideMessageProperties bool `json:"overrideMessageProperties"` + SignMessage bool `json:"signMessage"` + SigningAlgorithm *SigningAlgorithm `json:"signingAlgorithm,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_businessidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_businessidentity.go new file mode 100644 index 000000000000..db1f838d5e7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_businessidentity.go @@ -0,0 +1,9 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BusinessIdentity struct { + Qualifier string `json:"qualifier"` + Value string `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactacknowledgementsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactacknowledgementsettings.go new file mode 100644 index 000000000000..d2b386ce2202 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactacknowledgementsettings.go @@ -0,0 +1,18 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactAcknowledgementSettings struct { + AcknowledgementControlNumberLowerBound int64 `json:"acknowledgementControlNumberLowerBound"` + AcknowledgementControlNumberPrefix *string `json:"acknowledgementControlNumberPrefix,omitempty"` + AcknowledgementControlNumberSuffix *string `json:"acknowledgementControlNumberSuffix,omitempty"` + AcknowledgementControlNumberUpperBound int64 `json:"acknowledgementControlNumberUpperBound"` + BatchFunctionalAcknowledgements bool `json:"batchFunctionalAcknowledgements"` + BatchTechnicalAcknowledgements bool `json:"batchTechnicalAcknowledgements"` + NeedFunctionalAcknowledgement bool `json:"needFunctionalAcknowledgement"` + NeedLoopForValidMessages bool `json:"needLoopForValidMessages"` + NeedTechnicalAcknowledgement bool `json:"needTechnicalAcknowledgement"` + RolloverAcknowledgementControlNumber bool `json:"rolloverAcknowledgementControlNumber"` + SendSynchronousAcknowledgement bool `json:"sendSynchronousAcknowledgement"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactagreementcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactagreementcontent.go new file mode 100644 index 000000000000..727856b2e5dc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactagreementcontent.go @@ -0,0 +1,9 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactAgreementContent struct { + ReceiveAgreement EdifactOneWayAgreement `json:"receiveAgreement"` + SendAgreement EdifactOneWayAgreement `json:"sendAgreement"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactdelimiteroverride.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactdelimiteroverride.go new file mode 100644 index 000000000000..d03c1859f2a3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactdelimiteroverride.go @@ -0,0 +1,19 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactDelimiterOverride struct { + ComponentSeparator int64 `json:"componentSeparator"` + DataElementSeparator int64 `json:"dataElementSeparator"` + DecimalPointIndicator EdifactDecimalIndicator `json:"decimalPointIndicator"` + MessageAssociationAssignedCode *string `json:"messageAssociationAssignedCode,omitempty"` + MessageId *string `json:"messageId,omitempty"` + MessageRelease *string `json:"messageRelease,omitempty"` + MessageVersion *string `json:"messageVersion,omitempty"` + ReleaseIndicator int64 `json:"releaseIndicator"` + RepetitionSeparator int64 `json:"repetitionSeparator"` + SegmentTerminator int64 `json:"segmentTerminator"` + SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix"` + TargetNamespace *string `json:"targetNamespace,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactenvelopeoverride.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactenvelopeoverride.go new file mode 100644 index 000000000000..817edefd5207 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactenvelopeoverride.go @@ -0,0 +1,22 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactEnvelopeOverride struct { + ApplicationPassword *string `json:"applicationPassword,omitempty"` + AssociationAssignedCode *string `json:"associationAssignedCode,omitempty"` + ControllingAgencyCode *string `json:"controllingAgencyCode,omitempty"` + FunctionalGroupId *string `json:"functionalGroupId,omitempty"` + GroupHeaderMessageRelease *string `json:"groupHeaderMessageRelease,omitempty"` + GroupHeaderMessageVersion *string `json:"groupHeaderMessageVersion,omitempty"` + MessageAssociationAssignedCode *string `json:"messageAssociationAssignedCode,omitempty"` + MessageId *string `json:"messageId,omitempty"` + MessageRelease *string `json:"messageRelease,omitempty"` + MessageVersion *string `json:"messageVersion,omitempty"` + ReceiverApplicationId *string `json:"receiverApplicationId,omitempty"` + ReceiverApplicationQualifier *string `json:"receiverApplicationQualifier,omitempty"` + SenderApplicationId *string `json:"senderApplicationId,omitempty"` + SenderApplicationQualifier *string `json:"senderApplicationQualifier,omitempty"` + TargetNamespace *string `json:"targetNamespace,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactenvelopesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactenvelopesettings.go new file mode 100644 index 000000000000..6850c4407d82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactenvelopesettings.go @@ -0,0 +1,48 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactEnvelopeSettings struct { + ApplicationReferenceId *string `json:"applicationReferenceId,omitempty"` + ApplyDelimiterStringAdvice bool `json:"applyDelimiterStringAdvice"` + CommunicationAgreementId *string `json:"communicationAgreementId,omitempty"` + CreateGroupingSegments bool `json:"createGroupingSegments"` + EnableDefaultGroupHeaders bool `json:"enableDefaultGroupHeaders"` + FunctionalGroupId *string `json:"functionalGroupId,omitempty"` + GroupApplicationPassword *string `json:"groupApplicationPassword,omitempty"` + GroupApplicationReceiverId *string `json:"groupApplicationReceiverId,omitempty"` + GroupApplicationReceiverQualifier *string `json:"groupApplicationReceiverQualifier,omitempty"` + GroupApplicationSenderId *string `json:"groupApplicationSenderId,omitempty"` + GroupApplicationSenderQualifier *string `json:"groupApplicationSenderQualifier,omitempty"` + GroupAssociationAssignedCode *string `json:"groupAssociationAssignedCode,omitempty"` + GroupControlNumberLowerBound int64 `json:"groupControlNumberLowerBound"` + GroupControlNumberPrefix *string `json:"groupControlNumberPrefix,omitempty"` + GroupControlNumberSuffix *string `json:"groupControlNumberSuffix,omitempty"` + GroupControlNumberUpperBound int64 `json:"groupControlNumberUpperBound"` + GroupControllingAgencyCode *string `json:"groupControllingAgencyCode,omitempty"` + GroupMessageRelease *string `json:"groupMessageRelease,omitempty"` + GroupMessageVersion *string `json:"groupMessageVersion,omitempty"` + InterchangeControlNumberLowerBound int64 `json:"interchangeControlNumberLowerBound"` + InterchangeControlNumberPrefix *string `json:"interchangeControlNumberPrefix,omitempty"` + InterchangeControlNumberSuffix *string `json:"interchangeControlNumberSuffix,omitempty"` + InterchangeControlNumberUpperBound int64 `json:"interchangeControlNumberUpperBound"` + IsTestInterchange bool `json:"isTestInterchange"` + OverwriteExistingTransactionSetControlNumber bool `json:"overwriteExistingTransactionSetControlNumber"` + ProcessingPriorityCode *string `json:"processingPriorityCode,omitempty"` + ReceiverInternalIdentification *string `json:"receiverInternalIdentification,omitempty"` + ReceiverInternalSubIdentification *string `json:"receiverInternalSubIdentification,omitempty"` + ReceiverReverseRoutingAddress *string `json:"receiverReverseRoutingAddress,omitempty"` + RecipientReferencePasswordQualifier *string `json:"recipientReferencePasswordQualifier,omitempty"` + RecipientReferencePasswordValue *string `json:"recipientReferencePasswordValue,omitempty"` + RolloverGroupControlNumber bool `json:"rolloverGroupControlNumber"` + RolloverInterchangeControlNumber bool `json:"rolloverInterchangeControlNumber"` + RolloverTransactionSetControlNumber bool `json:"rolloverTransactionSetControlNumber"` + SenderInternalIdentification *string `json:"senderInternalIdentification,omitempty"` + SenderInternalSubIdentification *string `json:"senderInternalSubIdentification,omitempty"` + SenderReverseRoutingAddress *string `json:"senderReverseRoutingAddress,omitempty"` + TransactionSetControlNumberLowerBound int64 `json:"transactionSetControlNumberLowerBound"` + TransactionSetControlNumberPrefix *string `json:"transactionSetControlNumberPrefix,omitempty"` + TransactionSetControlNumberSuffix *string `json:"transactionSetControlNumberSuffix,omitempty"` + TransactionSetControlNumberUpperBound int64 `json:"transactionSetControlNumberUpperBound"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactframingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactframingsettings.go new file mode 100644 index 000000000000..444cbe1e790c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactframingsettings.go @@ -0,0 +1,18 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactFramingSettings struct { + CharacterEncoding *string `json:"characterEncoding,omitempty"` + CharacterSet EdifactCharacterSet `json:"characterSet"` + ComponentSeparator int64 `json:"componentSeparator"` + DataElementSeparator int64 `json:"dataElementSeparator"` + DecimalPointIndicator EdifactDecimalIndicator `json:"decimalPointIndicator"` + ProtocolVersion int64 `json:"protocolVersion"` + ReleaseIndicator int64 `json:"releaseIndicator"` + RepetitionSeparator int64 `json:"repetitionSeparator"` + SegmentTerminator int64 `json:"segmentTerminator"` + SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix"` + ServiceCodeListDirectoryVersion *string `json:"serviceCodeListDirectoryVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactmessagefilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactmessagefilter.go new file mode 100644 index 000000000000..b8cd0baadbc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactmessagefilter.go @@ -0,0 +1,8 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactMessageFilter struct { + MessageFilterType MessageFilterType `json:"messageFilterType"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactmessageidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactmessageidentifier.go new file mode 100644 index 000000000000..b1937a3208fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactmessageidentifier.go @@ -0,0 +1,8 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactMessageIdentifier struct { + MessageId string `json:"messageId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactonewayagreement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactonewayagreement.go new file mode 100644 index 000000000000..2cb2d19536fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactonewayagreement.go @@ -0,0 +1,10 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactOneWayAgreement struct { + ProtocolSettings EdifactProtocolSettings `json:"protocolSettings"` + ReceiverBusinessIdentity BusinessIdentity `json:"receiverBusinessIdentity"` + SenderBusinessIdentity BusinessIdentity `json:"senderBusinessIdentity"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactprocessingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactprocessingsettings.go new file mode 100644 index 000000000000..1111c98a9232 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactprocessingsettings.go @@ -0,0 +1,12 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactProcessingSettings struct { + CreateEmptyXmlTagsForTrailingSeparators bool `json:"createEmptyXmlTagsForTrailingSeparators"` + MaskSecurityInfo bool `json:"maskSecurityInfo"` + PreserveInterchange bool `json:"preserveInterchange"` + SuspendInterchangeOnError bool `json:"suspendInterchangeOnError"` + UseDotAsDecimalSeparator bool `json:"useDotAsDecimalSeparator"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactprotocolsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactprotocolsettings.go new file mode 100644 index 000000000000..ef2851931bd8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactprotocolsettings.go @@ -0,0 +1,18 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactProtocolSettings struct { + AcknowledgementSettings EdifactAcknowledgementSettings `json:"acknowledgementSettings"` + EdifactDelimiterOverrides *[]EdifactDelimiterOverride `json:"edifactDelimiterOverrides,omitempty"` + EnvelopeOverrides *[]EdifactEnvelopeOverride `json:"envelopeOverrides,omitempty"` + EnvelopeSettings EdifactEnvelopeSettings `json:"envelopeSettings"` + FramingSettings EdifactFramingSettings `json:"framingSettings"` + MessageFilter EdifactMessageFilter `json:"messageFilter"` + MessageFilterList *[]EdifactMessageIdentifier `json:"messageFilterList,omitempty"` + ProcessingSettings EdifactProcessingSettings `json:"processingSettings"` + SchemaReferences []EdifactSchemaReference `json:"schemaReferences"` + ValidationOverrides *[]EdifactValidationOverride `json:"validationOverrides,omitempty"` + ValidationSettings EdifactValidationSettings `json:"validationSettings"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactschemareference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactschemareference.go new file mode 100644 index 000000000000..a5b5f00553e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactschemareference.go @@ -0,0 +1,14 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactSchemaReference struct { + AssociationAssignedCode *string `json:"associationAssignedCode,omitempty"` + MessageId string `json:"messageId"` + MessageRelease string `json:"messageRelease"` + MessageVersion string `json:"messageVersion"` + SchemaName string `json:"schemaName"` + SenderApplicationId *string `json:"senderApplicationId,omitempty"` + SenderApplicationQualifier *string `json:"senderApplicationQualifier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactvalidationoverride.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactvalidationoverride.go new file mode 100644 index 000000000000..10ccf3eb72da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactvalidationoverride.go @@ -0,0 +1,14 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactValidationOverride struct { + AllowLeadingAndTrailingSpacesAndZeroes bool `json:"allowLeadingAndTrailingSpacesAndZeroes"` + EnforceCharacterSet bool `json:"enforceCharacterSet"` + MessageId string `json:"messageId"` + TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy"` + TrimLeadingAndTrailingSpacesAndZeroes bool `json:"trimLeadingAndTrailingSpacesAndZeroes"` + ValidateEDITypes bool `json:"validateEDITypes"` + ValidateXSDTypes bool `json:"validateXSDTypes"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactvalidationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactvalidationsettings.go new file mode 100644 index 000000000000..d2a4be5652eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_edifactvalidationsettings.go @@ -0,0 +1,17 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdifactValidationSettings struct { + AllowLeadingAndTrailingSpacesAndZeroes bool `json:"allowLeadingAndTrailingSpacesAndZeroes"` + CheckDuplicateGroupControlNumber bool `json:"checkDuplicateGroupControlNumber"` + CheckDuplicateInterchangeControlNumber bool `json:"checkDuplicateInterchangeControlNumber"` + CheckDuplicateTransactionSetControlNumber bool `json:"checkDuplicateTransactionSetControlNumber"` + InterchangeControlNumberValidityDays int64 `json:"interchangeControlNumberValidityDays"` + TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy"` + TrimLeadingAndTrailingSpacesAndZeroes bool `json:"trimLeadingAndTrailingSpacesAndZeroes"` + ValidateCharacterSet bool `json:"validateCharacterSet"` + ValidateEDITypes bool `json:"validateEDITypes"` + ValidateXSDTypes bool `json:"validateXSDTypes"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..5b772da75a41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package integrationaccountagreements + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_integrationaccountagreement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_integrationaccountagreement.go new file mode 100644 index 000000000000..4472b6f588db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_integrationaccountagreement.go @@ -0,0 +1,13 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountAgreement struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties IntegrationAccountAgreementProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_integrationaccountagreementproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_integrationaccountagreementproperties.go new file mode 100644 index 000000000000..57e820849c3c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_integrationaccountagreementproperties.go @@ -0,0 +1,46 @@ +package integrationaccountagreements + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountAgreementProperties struct { + AgreementType AgreementType `json:"agreementType"` + ChangedTime *string `json:"changedTime,omitempty"` + Content AgreementContent `json:"content"` + CreatedTime *string `json:"createdTime,omitempty"` + GuestIdentity BusinessIdentity `json:"guestIdentity"` + GuestPartner string `json:"guestPartner"` + HostIdentity BusinessIdentity `json:"hostIdentity"` + HostPartner string `json:"hostPartner"` + Metadata *interface{} `json:"metadata,omitempty"` +} + +func (o *IntegrationAccountAgreementProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountAgreementProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *IntegrationAccountAgreementProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountAgreementProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..1897157aa739 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..04992a50c853 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12acknowledgementsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12acknowledgementsettings.go new file mode 100644 index 000000000000..5d0dd631ddaa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12acknowledgementsettings.go @@ -0,0 +1,22 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12AcknowledgementSettings struct { + AcknowledgementControlNumberLowerBound int64 `json:"acknowledgementControlNumberLowerBound"` + AcknowledgementControlNumberPrefix *string `json:"acknowledgementControlNumberPrefix,omitempty"` + AcknowledgementControlNumberSuffix *string `json:"acknowledgementControlNumberSuffix,omitempty"` + AcknowledgementControlNumberUpperBound int64 `json:"acknowledgementControlNumberUpperBound"` + BatchFunctionalAcknowledgements bool `json:"batchFunctionalAcknowledgements"` + BatchImplementationAcknowledgements bool `json:"batchImplementationAcknowledgements"` + BatchTechnicalAcknowledgements bool `json:"batchTechnicalAcknowledgements"` + FunctionalAcknowledgementVersion *string `json:"functionalAcknowledgementVersion,omitempty"` + ImplementationAcknowledgementVersion *string `json:"implementationAcknowledgementVersion,omitempty"` + NeedFunctionalAcknowledgement bool `json:"needFunctionalAcknowledgement"` + NeedImplementationAcknowledgement bool `json:"needImplementationAcknowledgement"` + NeedLoopForValidMessages bool `json:"needLoopForValidMessages"` + NeedTechnicalAcknowledgement bool `json:"needTechnicalAcknowledgement"` + RolloverAcknowledgementControlNumber bool `json:"rolloverAcknowledgementControlNumber"` + SendSynchronousAcknowledgement bool `json:"sendSynchronousAcknowledgement"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12agreementcontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12agreementcontent.go new file mode 100644 index 000000000000..7afb76021c46 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12agreementcontent.go @@ -0,0 +1,9 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12AgreementContent struct { + ReceiveAgreement X12OneWayAgreement `json:"receiveAgreement"` + SendAgreement X12OneWayAgreement `json:"sendAgreement"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12delimiteroverrides.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12delimiteroverrides.go new file mode 100644 index 000000000000..17b6eeddf957 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12delimiteroverrides.go @@ -0,0 +1,16 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12DelimiterOverrides struct { + ComponentSeparator int64 `json:"componentSeparator"` + DataElementSeparator int64 `json:"dataElementSeparator"` + MessageId *string `json:"messageId,omitempty"` + ProtocolVersion *string `json:"protocolVersion,omitempty"` + ReplaceCharacter int64 `json:"replaceCharacter"` + ReplaceSeparatorsInPayload bool `json:"replaceSeparatorsInPayload"` + SegmentTerminator int64 `json:"segmentTerminator"` + SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix"` + TargetNamespace *string `json:"targetNamespace,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12envelopeoverride.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12envelopeoverride.go new file mode 100644 index 000000000000..b41093706b6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12envelopeoverride.go @@ -0,0 +1,17 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12EnvelopeOverride struct { + DateFormat X12DateFormat `json:"dateFormat"` + FunctionalIdentifierCode *string `json:"functionalIdentifierCode,omitempty"` + HeaderVersion string `json:"headerVersion"` + MessageId string `json:"messageId"` + ProtocolVersion string `json:"protocolVersion"` + ReceiverApplicationId string `json:"receiverApplicationId"` + ResponsibleAgencyCode string `json:"responsibleAgencyCode"` + SenderApplicationId string `json:"senderApplicationId"` + TargetNamespace string `json:"targetNamespace"` + TimeFormat X12TimeFormat `json:"timeFormat"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12envelopesettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12envelopesettings.go new file mode 100644 index 000000000000..93c54717857f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12envelopesettings.go @@ -0,0 +1,31 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12EnvelopeSettings struct { + ControlStandardsId int64 `json:"controlStandardsId"` + ControlVersionNumber string `json:"controlVersionNumber"` + EnableDefaultGroupHeaders bool `json:"enableDefaultGroupHeaders"` + FunctionalGroupId *string `json:"functionalGroupId,omitempty"` + GroupControlNumberLowerBound int64 `json:"groupControlNumberLowerBound"` + GroupControlNumberUpperBound int64 `json:"groupControlNumberUpperBound"` + GroupHeaderAgencyCode string `json:"groupHeaderAgencyCode"` + GroupHeaderDateFormat X12DateFormat `json:"groupHeaderDateFormat"` + GroupHeaderTimeFormat X12TimeFormat `json:"groupHeaderTimeFormat"` + GroupHeaderVersion string `json:"groupHeaderVersion"` + InterchangeControlNumberLowerBound int64 `json:"interchangeControlNumberLowerBound"` + InterchangeControlNumberUpperBound int64 `json:"interchangeControlNumberUpperBound"` + OverwriteExistingTransactionSetControlNumber bool `json:"overwriteExistingTransactionSetControlNumber"` + ReceiverApplicationId string `json:"receiverApplicationId"` + RolloverGroupControlNumber bool `json:"rolloverGroupControlNumber"` + RolloverInterchangeControlNumber bool `json:"rolloverInterchangeControlNumber"` + RolloverTransactionSetControlNumber bool `json:"rolloverTransactionSetControlNumber"` + SenderApplicationId string `json:"senderApplicationId"` + TransactionSetControlNumberLowerBound int64 `json:"transactionSetControlNumberLowerBound"` + TransactionSetControlNumberPrefix *string `json:"transactionSetControlNumberPrefix,omitempty"` + TransactionSetControlNumberSuffix *string `json:"transactionSetControlNumberSuffix,omitempty"` + TransactionSetControlNumberUpperBound int64 `json:"transactionSetControlNumberUpperBound"` + UsageIndicator UsageIndicator `json:"usageIndicator"` + UseControlStandardsIdAsRepetitionCharacter bool `json:"useControlStandardsIdAsRepetitionCharacter"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12framingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12framingsettings.go new file mode 100644 index 000000000000..28e0c4c23423 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12framingsettings.go @@ -0,0 +1,14 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12FramingSettings struct { + CharacterSet X12CharacterSet `json:"characterSet"` + ComponentSeparator int64 `json:"componentSeparator"` + DataElementSeparator int64 `json:"dataElementSeparator"` + ReplaceCharacter int64 `json:"replaceCharacter"` + ReplaceSeparatorsInPayload bool `json:"replaceSeparatorsInPayload"` + SegmentTerminator int64 `json:"segmentTerminator"` + SegmentTerminatorSuffix SegmentTerminatorSuffix `json:"segmentTerminatorSuffix"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12messagefilter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12messagefilter.go new file mode 100644 index 000000000000..1bf03a3e4f71 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12messagefilter.go @@ -0,0 +1,8 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12MessageFilter struct { + MessageFilterType MessageFilterType `json:"messageFilterType"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12messageidentifier.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12messageidentifier.go new file mode 100644 index 000000000000..7e5995709e9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12messageidentifier.go @@ -0,0 +1,8 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12MessageIdentifier struct { + MessageId string `json:"messageId"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12onewayagreement.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12onewayagreement.go new file mode 100644 index 000000000000..8db59c6e0893 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12onewayagreement.go @@ -0,0 +1,10 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12OneWayAgreement struct { + ProtocolSettings X12ProtocolSettings `json:"protocolSettings"` + ReceiverBusinessIdentity BusinessIdentity `json:"receiverBusinessIdentity"` + SenderBusinessIdentity BusinessIdentity `json:"senderBusinessIdentity"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12processingsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12processingsettings.go new file mode 100644 index 000000000000..9ff46d7a3b22 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12processingsettings.go @@ -0,0 +1,13 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12ProcessingSettings struct { + ConvertImpliedDecimal bool `json:"convertImpliedDecimal"` + CreateEmptyXmlTagsForTrailingSeparators bool `json:"createEmptyXmlTagsForTrailingSeparators"` + MaskSecurityInfo bool `json:"maskSecurityInfo"` + PreserveInterchange bool `json:"preserveInterchange"` + SuspendInterchangeOnError bool `json:"suspendInterchangeOnError"` + UseDotAsDecimalSeparator bool `json:"useDotAsDecimalSeparator"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12protocolsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12protocolsettings.go new file mode 100644 index 000000000000..003f675198bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12protocolsettings.go @@ -0,0 +1,19 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12ProtocolSettings struct { + AcknowledgementSettings X12AcknowledgementSettings `json:"acknowledgementSettings"` + EnvelopeOverrides *[]X12EnvelopeOverride `json:"envelopeOverrides,omitempty"` + EnvelopeSettings X12EnvelopeSettings `json:"envelopeSettings"` + FramingSettings X12FramingSettings `json:"framingSettings"` + MessageFilter X12MessageFilter `json:"messageFilter"` + MessageFilterList *[]X12MessageIdentifier `json:"messageFilterList,omitempty"` + ProcessingSettings X12ProcessingSettings `json:"processingSettings"` + SchemaReferences []X12SchemaReference `json:"schemaReferences"` + SecuritySettings X12SecuritySettings `json:"securitySettings"` + ValidationOverrides *[]X12ValidationOverride `json:"validationOverrides,omitempty"` + ValidationSettings X12ValidationSettings `json:"validationSettings"` + X12DelimiterOverrides *[]X12DelimiterOverrides `json:"x12DelimiterOverrides,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12schemareference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12schemareference.go new file mode 100644 index 000000000000..fae7346dcc8c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12schemareference.go @@ -0,0 +1,11 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12SchemaReference struct { + MessageId string `json:"messageId"` + SchemaName string `json:"schemaName"` + SchemaVersion string `json:"schemaVersion"` + SenderApplicationId *string `json:"senderApplicationId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12securitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12securitysettings.go new file mode 100644 index 000000000000..09bbdf906bef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12securitysettings.go @@ -0,0 +1,11 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12SecuritySettings struct { + AuthorizationQualifier string `json:"authorizationQualifier"` + AuthorizationValue *string `json:"authorizationValue,omitempty"` + PasswordValue *string `json:"passwordValue,omitempty"` + SecurityQualifier string `json:"securityQualifier"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12validationoverride.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12validationoverride.go new file mode 100644 index 000000000000..cc98632a0bff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12validationoverride.go @@ -0,0 +1,14 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12ValidationOverride struct { + AllowLeadingAndTrailingSpacesAndZeroes bool `json:"allowLeadingAndTrailingSpacesAndZeroes"` + MessageId string `json:"messageId"` + TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy"` + TrimLeadingAndTrailingSpacesAndZeroes bool `json:"trimLeadingAndTrailingSpacesAndZeroes"` + ValidateCharacterSet bool `json:"validateCharacterSet"` + ValidateEDITypes bool `json:"validateEDITypes"` + ValidateXSDTypes bool `json:"validateXSDTypes"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12validationsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12validationsettings.go new file mode 100644 index 000000000000..cc7a7aa493e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/model_x12validationsettings.go @@ -0,0 +1,17 @@ +package integrationaccountagreements + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type X12ValidationSettings struct { + AllowLeadingAndTrailingSpacesAndZeroes bool `json:"allowLeadingAndTrailingSpacesAndZeroes"` + CheckDuplicateGroupControlNumber bool `json:"checkDuplicateGroupControlNumber"` + CheckDuplicateInterchangeControlNumber bool `json:"checkDuplicateInterchangeControlNumber"` + CheckDuplicateTransactionSetControlNumber bool `json:"checkDuplicateTransactionSetControlNumber"` + InterchangeControlNumberValidityDays int64 `json:"interchangeControlNumberValidityDays"` + TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy"` + TrimLeadingAndTrailingSpacesAndZeroes bool `json:"trimLeadingAndTrailingSpacesAndZeroes"` + ValidateCharacterSet bool `json:"validateCharacterSet"` + ValidateEDITypes bool `json:"validateEDITypes"` + ValidateXSDTypes bool `json:"validateXSDTypes"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/predicates.go new file mode 100644 index 000000000000..b87b9518b4b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/predicates.go @@ -0,0 +1,29 @@ +package integrationaccountagreements + +type IntegrationAccountAgreementOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountAgreementOperationPredicate) Matches(input IntegrationAccountAgreement) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go new file mode 100644 index 000000000000..633c4c0db031 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go @@ -0,0 +1,12 @@ +package integrationaccountagreements + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountagreements/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md new file mode 100644 index 000000000000..137bb343ce3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md @@ -0,0 +1,105 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies` Documentation + +The `integrationaccountassemblies` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountassemblies" +``` + + +### Client Initialization + +```go +client := integrationaccountassemblies.NewIntegrationAccountAssembliesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountAssembliesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountassemblies.NewAssemblyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "assemblyValue") + +payload := integrationaccountassemblies.AssemblyDefinition{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountAssembliesClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountassemblies.NewAssemblyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "assemblyValue") + +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: `IntegrationAccountAssembliesClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountassemblies.NewAssemblyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "assemblyValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountAssembliesClient.List` + +```go +ctx := context.TODO() +id := integrationaccountassemblies.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +read, err := client.List(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountAssembliesClient.ListContentCallbackUrl` + +```go +ctx := context.TODO() +id := integrationaccountassemblies.NewAssemblyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "assemblyValue") + +read, err := client.ListContentCallbackUrl(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go new file mode 100644 index 000000000000..7eeaa03c50ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go @@ -0,0 +1,18 @@ +package integrationaccountassemblies + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountAssembliesClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountAssembliesClientWithBaseURI(endpoint string) IntegrationAccountAssembliesClient { + return IntegrationAccountAssembliesClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go new file mode 100644 index 000000000000..28c5e4d07afa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go @@ -0,0 +1,137 @@ +package integrationaccountassemblies + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = AssemblyId{} + +// AssemblyId is a struct representing the Resource ID for a Assembly +type AssemblyId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + AssemblyName string +} + +// NewAssemblyID returns a new AssemblyId struct +func NewAssemblyID(subscriptionId string, resourceGroupName string, integrationAccountName string, assemblyName string) AssemblyId { + return AssemblyId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + AssemblyName: assemblyName, + } +} + +// ParseAssemblyID parses 'input' into a AssemblyId +func ParseAssemblyID(input string) (*AssemblyId, error) { + parser := resourceids.NewParserFromResourceIdType(AssemblyId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := AssemblyId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.AssemblyName, ok = parsed.Parsed["assemblyName"]; !ok { + return nil, fmt.Errorf("the segment 'assemblyName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseAssemblyIDInsensitively parses 'input' case-insensitively into a AssemblyId +// note: this method should only be used for API response data and not user input +func ParseAssemblyIDInsensitively(input string) (*AssemblyId, error) { + parser := resourceids.NewParserFromResourceIdType(AssemblyId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := AssemblyId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.AssemblyName, ok = parsed.Parsed["assemblyName"]; !ok { + return nil, fmt.Errorf("the segment 'assemblyName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateAssemblyID checks that 'input' can be parsed as a Assembly ID +func ValidateAssemblyID(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 := ParseAssemblyID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Assembly ID +func (id AssemblyId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/assemblies/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.AssemblyName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Assembly ID +func (id AssemblyId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticAssemblies", "assemblies", "assemblies"), + resourceids.UserSpecifiedSegment("assemblyName", "assemblyValue"), + } +} + +// String returns a human-readable description of this Assembly ID +func (id AssemblyId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Assembly Name: %q", id.AssemblyName), + } + return fmt.Sprintf("Assembly (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go new file mode 100644 index 000000000000..32d7aa139acc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountassemblies + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate_autorest.go new file mode 100644 index 000000000000..077233bcffe9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountassemblies + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *AssemblyDefinition +} + +// CreateOrUpdate ... +func (c IntegrationAccountAssembliesClient) CreateOrUpdate(ctx context.Context, id AssemblyId, input AssemblyDefinition) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountAssembliesClient) preparerForCreateOrUpdate(ctx context.Context, id AssemblyId, input AssemblyDefinition) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAssembliesClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_delete_autorest.go new file mode 100644 index 000000000000..acd75dd4b596 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountassemblies + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountAssembliesClient) Delete(ctx context.Context, id AssemblyId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountAssembliesClient) preparerForDelete(ctx context.Context, id AssemblyId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAssembliesClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get_autorest.go new file mode 100644 index 000000000000..8e36965c953e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountassemblies + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *AssemblyDefinition +} + +// Get ... +func (c IntegrationAccountAssembliesClient) Get(ctx context.Context, id AssemblyId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountAssembliesClient) preparerForGet(ctx context.Context, id AssemblyId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAssembliesClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list_autorest.go new file mode 100644 index 000000000000..7aee8f95fd7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountassemblies + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *AssemblyCollection +} + +// List ... +func (c IntegrationAccountAssembliesClient) List(ctx context.Context, id IntegrationAccountId) (result ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountAssembliesClient) preparerForList(ctx context.Context, id IntegrationAccountId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/assemblies", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAssembliesClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl_autorest.go new file mode 100644 index 000000000000..8153bd0d352e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountassemblies + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListContentCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListContentCallbackUrl ... +func (c IntegrationAccountAssembliesClient) ListContentCallbackUrl(ctx context.Context, id AssemblyId) (result ListContentCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListContentCallbackUrl(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "ListContentCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "ListContentCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListContentCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountassemblies.IntegrationAccountAssembliesClient", "ListContentCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListContentCallbackUrl prepares the ListContentCallbackUrl request. +func (c IntegrationAccountAssembliesClient) preparerForListContentCallbackUrl(ctx context.Context, id AssemblyId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listContentCallbackUrl", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListContentCallbackUrl handles the response to the ListContentCallbackUrl request. The method always +// closes the http.Response Body. +func (c IntegrationAccountAssembliesClient) responderForListContentCallbackUrl(resp *http.Response) (result ListContentCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblycollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblycollection.go new file mode 100644 index 000000000000..e94abbd2ff37 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblycollection.go @@ -0,0 +1,8 @@ +package integrationaccountassemblies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AssemblyCollection struct { + Value *[]AssemblyDefinition `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblydefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblydefinition.go new file mode 100644 index 000000000000..97bfea9de899 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblydefinition.go @@ -0,0 +1,13 @@ +package integrationaccountassemblies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AssemblyDefinition struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties AssemblyProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblyproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblyproperties.go new file mode 100644 index 000000000000..7064838c448f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_assemblyproperties.go @@ -0,0 +1,47 @@ +package integrationaccountassemblies + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AssemblyProperties struct { + AssemblyCulture *string `json:"assemblyCulture,omitempty"` + AssemblyName string `json:"assemblyName"` + AssemblyPublicKeyToken *string `json:"assemblyPublicKeyToken,omitempty"` + AssemblyVersion *string `json:"assemblyVersion,omitempty"` + ChangedTime *string `json:"changedTime,omitempty"` + Content *interface{} `json:"content,omitempty"` + ContentLink *ContentLink `json:"contentLink,omitempty"` + ContentType *string `json:"contentType,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` +} + +func (o *AssemblyProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *AssemblyProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *AssemblyProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *AssemblyProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_contenthash.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_contenthash.go new file mode 100644 index 000000000000..f5598bcd1519 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_contenthash.go @@ -0,0 +1,9 @@ +package integrationaccountassemblies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentHash struct { + Algorithm *string `json:"algorithm,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_contentlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_contentlink.go new file mode 100644 index 000000000000..516c7200620b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_contentlink.go @@ -0,0 +1,12 @@ +package integrationaccountassemblies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentLink struct { + ContentHash *ContentHash `json:"contentHash,omitempty"` + ContentSize *int64 `json:"contentSize,omitempty"` + ContentVersion *string `json:"contentVersion,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..c1b7488ead9f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package integrationaccountassemblies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..38befad8a55b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package integrationaccountassemblies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go new file mode 100644 index 000000000000..690ff257ba03 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go @@ -0,0 +1,12 @@ +package integrationaccountassemblies + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountassemblies/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md new file mode 100644 index 000000000000..737acb22d0e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md @@ -0,0 +1,89 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations` Documentation + +The `integrationaccountbatchconfigurations` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountbatchconfigurations" +``` + + +### Client Initialization + +```go +client := integrationaccountbatchconfigurations.NewIntegrationAccountBatchConfigurationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountBatchConfigurationsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountbatchconfigurations.NewBatchConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "batchConfigurationValue") + +payload := integrationaccountbatchconfigurations.BatchConfiguration{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountBatchConfigurationsClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountbatchconfigurations.NewBatchConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "batchConfigurationValue") + +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: `IntegrationAccountBatchConfigurationsClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountbatchconfigurations.NewBatchConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "batchConfigurationValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountBatchConfigurationsClient.List` + +```go +ctx := context.TODO() +id := integrationaccountbatchconfigurations.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +read, err := client.List(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go new file mode 100644 index 000000000000..3c5a2d9fbc38 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go @@ -0,0 +1,18 @@ +package integrationaccountbatchconfigurations + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountBatchConfigurationsClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(endpoint string) IntegrationAccountBatchConfigurationsClient { + return IntegrationAccountBatchConfigurationsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/constants.go new file mode 100644 index 000000000000..8542ee7731ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/constants.go @@ -0,0 +1,138 @@ +package integrationaccountbatchconfigurations + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +func PossibleValuesForDayOfWeek() []string { + return []string{ + string(DayOfWeekFriday), + string(DayOfWeekMonday), + string(DayOfWeekSaturday), + string(DayOfWeekSunday), + string(DayOfWeekThursday), + string(DayOfWeekTuesday), + string(DayOfWeekWednesday), + } +} + +func parseDayOfWeek(input string) (*DayOfWeek, error) { + vals := map[string]DayOfWeek{ + "friday": DayOfWeekFriday, + "monday": DayOfWeekMonday, + "saturday": DayOfWeekSaturday, + "sunday": DayOfWeekSunday, + "thursday": DayOfWeekThursday, + "tuesday": DayOfWeekTuesday, + "wednesday": DayOfWeekWednesday, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DayOfWeek(input) + return &out, nil +} + +type DaysOfWeek string + +const ( + DaysOfWeekFriday DaysOfWeek = "Friday" + DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekThursday DaysOfWeek = "Thursday" + DaysOfWeekTuesday DaysOfWeek = "Tuesday" + DaysOfWeekWednesday DaysOfWeek = "Wednesday" +) + +func PossibleValuesForDaysOfWeek() []string { + return []string{ + string(DaysOfWeekFriday), + string(DaysOfWeekMonday), + string(DaysOfWeekSaturday), + string(DaysOfWeekSunday), + string(DaysOfWeekThursday), + string(DaysOfWeekTuesday), + string(DaysOfWeekWednesday), + } +} + +func parseDaysOfWeek(input string) (*DaysOfWeek, error) { + vals := map[string]DaysOfWeek{ + "friday": DaysOfWeekFriday, + "monday": DaysOfWeekMonday, + "saturday": DaysOfWeekSaturday, + "sunday": DaysOfWeekSunday, + "thursday": DaysOfWeekThursday, + "tuesday": DaysOfWeekTuesday, + "wednesday": DaysOfWeekWednesday, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DaysOfWeek(input) + return &out, nil +} + +type RecurrenceFrequency string + +const ( + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" + RecurrenceFrequencySecond RecurrenceFrequency = "Second" + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +func PossibleValuesForRecurrenceFrequency() []string { + return []string{ + string(RecurrenceFrequencyDay), + string(RecurrenceFrequencyHour), + string(RecurrenceFrequencyMinute), + string(RecurrenceFrequencyMonth), + string(RecurrenceFrequencyNotSpecified), + string(RecurrenceFrequencySecond), + string(RecurrenceFrequencyWeek), + string(RecurrenceFrequencyYear), + } +} + +func parseRecurrenceFrequency(input string) (*RecurrenceFrequency, error) { + vals := map[string]RecurrenceFrequency{ + "day": RecurrenceFrequencyDay, + "hour": RecurrenceFrequencyHour, + "minute": RecurrenceFrequencyMinute, + "month": RecurrenceFrequencyMonth, + "notspecified": RecurrenceFrequencyNotSpecified, + "second": RecurrenceFrequencySecond, + "week": RecurrenceFrequencyWeek, + "year": RecurrenceFrequencyYear, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RecurrenceFrequency(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go new file mode 100644 index 000000000000..3e7ed9d5222c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go @@ -0,0 +1,137 @@ +package integrationaccountbatchconfigurations + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = BatchConfigurationId{} + +// BatchConfigurationId is a struct representing the Resource ID for a Batch Configuration +type BatchConfigurationId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + BatchConfigurationName string +} + +// NewBatchConfigurationID returns a new BatchConfigurationId struct +func NewBatchConfigurationID(subscriptionId string, resourceGroupName string, integrationAccountName string, batchConfigurationName string) BatchConfigurationId { + return BatchConfigurationId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + BatchConfigurationName: batchConfigurationName, + } +} + +// ParseBatchConfigurationID parses 'input' into a BatchConfigurationId +func ParseBatchConfigurationID(input string) (*BatchConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(BatchConfigurationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := BatchConfigurationId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.BatchConfigurationName, ok = parsed.Parsed["batchConfigurationName"]; !ok { + return nil, fmt.Errorf("the segment 'batchConfigurationName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseBatchConfigurationIDInsensitively parses 'input' case-insensitively into a BatchConfigurationId +// note: this method should only be used for API response data and not user input +func ParseBatchConfigurationIDInsensitively(input string) (*BatchConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(BatchConfigurationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := BatchConfigurationId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.BatchConfigurationName, ok = parsed.Parsed["batchConfigurationName"]; !ok { + return nil, fmt.Errorf("the segment 'batchConfigurationName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateBatchConfigurationID checks that 'input' can be parsed as a Batch Configuration ID +func ValidateBatchConfigurationID(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 := ParseBatchConfigurationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Batch Configuration ID +func (id BatchConfigurationId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/batchConfigurations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.BatchConfigurationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Batch Configuration ID +func (id BatchConfigurationId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticBatchConfigurations", "batchConfigurations", "batchConfigurations"), + resourceids.UserSpecifiedSegment("batchConfigurationName", "batchConfigurationValue"), + } +} + +// String returns a human-readable description of this Batch Configuration ID +func (id BatchConfigurationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Batch Configuration Name: %q", id.BatchConfigurationName), + } + return fmt.Sprintf("Batch Configuration (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go new file mode 100644 index 000000000000..3ffe054c672b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountbatchconfigurations + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate_autorest.go new file mode 100644 index 000000000000..8641d50256d0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountbatchconfigurations + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *BatchConfiguration +} + +// CreateOrUpdate ... +func (c IntegrationAccountBatchConfigurationsClient) CreateOrUpdate(ctx context.Context, id BatchConfigurationId, input BatchConfiguration) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountBatchConfigurationsClient) preparerForCreateOrUpdate(ctx context.Context, id BatchConfigurationId, input BatchConfiguration) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountBatchConfigurationsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_delete_autorest.go new file mode 100644 index 000000000000..bdb37e1ae4da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountbatchconfigurations + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountBatchConfigurationsClient) Delete(ctx context.Context, id BatchConfigurationId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountBatchConfigurationsClient) preparerForDelete(ctx context.Context, id BatchConfigurationId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountBatchConfigurationsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get_autorest.go new file mode 100644 index 000000000000..eeccecf04b66 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountbatchconfigurations + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *BatchConfiguration +} + +// Get ... +func (c IntegrationAccountBatchConfigurationsClient) Get(ctx context.Context, id BatchConfigurationId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountBatchConfigurationsClient) preparerForGet(ctx context.Context, id BatchConfigurationId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountBatchConfigurationsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list_autorest.go new file mode 100644 index 000000000000..451330341766 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountbatchconfigurations + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *BatchConfigurationCollection +} + +// List ... +func (c IntegrationAccountBatchConfigurationsClient) List(ctx context.Context, id IntegrationAccountId) (result ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountbatchconfigurations.IntegrationAccountBatchConfigurationsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountBatchConfigurationsClient) preparerForList(ctx context.Context, id IntegrationAccountId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/batchConfigurations", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountBatchConfigurationsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfiguration.go new file mode 100644 index 000000000000..b0c2e415d6df --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfiguration.go @@ -0,0 +1,13 @@ +package integrationaccountbatchconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BatchConfiguration struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties BatchConfigurationProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfigurationcollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfigurationcollection.go new file mode 100644 index 000000000000..fb05955f0898 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfigurationcollection.go @@ -0,0 +1,8 @@ +package integrationaccountbatchconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BatchConfigurationCollection struct { + Value *[]BatchConfiguration `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfigurationproperties.go new file mode 100644 index 000000000000..7bb4c3555976 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchconfigurationproperties.go @@ -0,0 +1,42 @@ +package integrationaccountbatchconfigurations + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BatchConfigurationProperties struct { + BatchGroupName string `json:"batchGroupName"` + ChangedTime *string `json:"changedTime,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + ReleaseCriteria BatchReleaseCriteria `json:"releaseCriteria"` +} + +func (o *BatchConfigurationProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *BatchConfigurationProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *BatchConfigurationProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *BatchConfigurationProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchreleasecriteria.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchreleasecriteria.go new file mode 100644 index 000000000000..3eb3335e2a11 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_batchreleasecriteria.go @@ -0,0 +1,10 @@ +package integrationaccountbatchconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BatchReleaseCriteria struct { + BatchSize *int64 `json:"batchSize,omitempty"` + MessageCount *int64 `json:"messageCount,omitempty"` + Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_recurrenceschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_recurrenceschedule.go new file mode 100644 index 000000000000..6ae33fb1da4b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_recurrenceschedule.go @@ -0,0 +1,12 @@ +package integrationaccountbatchconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RecurrenceSchedule struct { + Hours *[]int64 `json:"hours,omitempty"` + Minutes *[]int64 `json:"minutes,omitempty"` + MonthDays *[]int64 `json:"monthDays,omitempty"` + MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"` + WeekDays *[]DaysOfWeek `json:"weekDays,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_recurrencescheduleoccurrence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_recurrencescheduleoccurrence.go new file mode 100644 index 000000000000..662d07f9f2c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_recurrencescheduleoccurrence.go @@ -0,0 +1,9 @@ +package integrationaccountbatchconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RecurrenceScheduleOccurrence struct { + Day *DayOfWeek `json:"day,omitempty"` + Occurrence *int64 `json:"occurrence,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_workflowtriggerrecurrence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_workflowtriggerrecurrence.go new file mode 100644 index 000000000000..a0d944f7ce78 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/model_workflowtriggerrecurrence.go @@ -0,0 +1,13 @@ +package integrationaccountbatchconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerRecurrence struct { + EndTime *string `json:"endTime,omitempty"` + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` + Interval *int64 `json:"interval,omitempty"` + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go new file mode 100644 index 000000000000..c564172c92e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go @@ -0,0 +1,12 @@ +package integrationaccountbatchconfigurations + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountbatchconfigurations/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md new file mode 100644 index 000000000000..fe4cb0beed90 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md @@ -0,0 +1,90 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates` Documentation + +The `integrationaccountcertificates` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountcertificates" +``` + + +### Client Initialization + +```go +client := integrationaccountcertificates.NewIntegrationAccountCertificatesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountCertificatesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountcertificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "certificateValue") + +payload := integrationaccountcertificates.IntegrationAccountCertificate{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountCertificatesClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountcertificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "certificateValue") + +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: `IntegrationAccountCertificatesClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountcertificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "certificateValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountCertificatesClient.List` + +```go +ctx := context.TODO() +id := integrationaccountcertificates.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +// alternatively `client.List(ctx, id, integrationaccountcertificates.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, integrationaccountcertificates.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go new file mode 100644 index 000000000000..2dede1287dc9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go @@ -0,0 +1,18 @@ +package integrationaccountcertificates + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountCertificatesClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountCertificatesClientWithBaseURI(endpoint string) IntegrationAccountCertificatesClient { + return IntegrationAccountCertificatesClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go new file mode 100644 index 000000000000..92b753df3786 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go @@ -0,0 +1,137 @@ +package integrationaccountcertificates + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = CertificateId{} + +// CertificateId is a struct representing the Resource ID for a Certificate +type CertificateId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + CertificateName string +} + +// NewCertificateID returns a new CertificateId struct +func NewCertificateID(subscriptionId string, resourceGroupName string, integrationAccountName string, certificateName string) CertificateId { + return CertificateId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + CertificateName: certificateName, + } +} + +// ParseCertificateID parses 'input' into a CertificateId +func ParseCertificateID(input string) (*CertificateId, error) { + parser := resourceids.NewParserFromResourceIdType(CertificateId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := CertificateId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { + return nil, fmt.Errorf("the segment 'certificateName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseCertificateIDInsensitively parses 'input' case-insensitively into a CertificateId +// note: this method should only be used for API response data and not user input +func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { + parser := resourceids.NewParserFromResourceIdType(CertificateId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := CertificateId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { + return nil, fmt.Errorf("the segment 'certificateName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateCertificateID checks that 'input' can be parsed as a Certificate ID +func ValidateCertificateID(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 := ParseCertificateID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Certificate ID +func (id CertificateId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/certificates/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.CertificateName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Certificate ID +func (id CertificateId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticCertificates", "certificates", "certificates"), + resourceids.UserSpecifiedSegment("certificateName", "certificateValue"), + } +} + +// String returns a human-readable description of this Certificate ID +func (id CertificateId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Certificate Name: %q", id.CertificateName), + } + return fmt.Sprintf("Certificate (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go new file mode 100644 index 000000000000..23aa542ef6f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountcertificates + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate_autorest.go new file mode 100644 index 000000000000..dbd71dc9da25 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountcertificates + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountCertificate +} + +// CreateOrUpdate ... +func (c IntegrationAccountCertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId, input IntegrationAccountCertificate) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountCertificatesClient) preparerForCreateOrUpdate(ctx context.Context, id CertificateId, input IntegrationAccountCertificate) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountCertificatesClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_delete_autorest.go new file mode 100644 index 000000000000..60496331dc4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountcertificates + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountCertificatesClient) Delete(ctx context.Context, id CertificateId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountCertificatesClient) preparerForDelete(ctx context.Context, id CertificateId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountCertificatesClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get_autorest.go new file mode 100644 index 000000000000..aaf14d2e5d0f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountcertificates + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountCertificate +} + +// Get ... +func (c IntegrationAccountCertificatesClient) Get(ctx context.Context, id CertificateId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountCertificatesClient) preparerForGet(ctx context.Context, id CertificateId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountCertificatesClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list_autorest.go new file mode 100644 index 000000000000..898ecc16486d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list_autorest.go @@ -0,0 +1,215 @@ +package integrationaccountcertificates + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccountCertificate + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []IntegrationAccountCertificate +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c IntegrationAccountCertificatesClient) List(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountCertificatesClient) preparerForList(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/certificates", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c IntegrationAccountCertificatesClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountCertificatesClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []IntegrationAccountCertificate `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountcertificates.IntegrationAccountCertificatesClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c IntegrationAccountCertificatesClient) ListComplete(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, IntegrationAccountCertificateOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountCertificatesClient) ListCompleteMatchingPredicate(ctx context.Context, id IntegrationAccountId, options ListOperationOptions, predicate IntegrationAccountCertificateOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]IntegrationAccountCertificate, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_integrationaccountcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_integrationaccountcertificate.go new file mode 100644 index 000000000000..c705b27ebd32 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_integrationaccountcertificate.go @@ -0,0 +1,13 @@ +package integrationaccountcertificates + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountCertificate struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties IntegrationAccountCertificateProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_integrationaccountcertificateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_integrationaccountcertificateproperties.go new file mode 100644 index 000000000000..4459c3147025 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_integrationaccountcertificateproperties.go @@ -0,0 +1,42 @@ +package integrationaccountcertificates + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountCertificateProperties struct { + ChangedTime *string `json:"changedTime,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + Key *KeyVaultKeyReference `json:"key,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + PublicCertificate *string `json:"publicCertificate,omitempty"` +} + +func (o *IntegrationAccountCertificateProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountCertificateProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *IntegrationAccountCertificateProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountCertificateProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_keyvaultkeyreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_keyvaultkeyreference.go new file mode 100644 index 000000000000..9c31f60c106e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_keyvaultkeyreference.go @@ -0,0 +1,10 @@ +package integrationaccountcertificates + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultKeyReference struct { + KeyName string `json:"keyName"` + KeyVault KeyVaultKeyReferenceKeyVault `json:"keyVault"` + KeyVersion *string `json:"keyVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_keyvaultkeyreferencekeyvault.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_keyvaultkeyreferencekeyvault.go new file mode 100644 index 000000000000..9e70468f37b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/model_keyvaultkeyreferencekeyvault.go @@ -0,0 +1,10 @@ +package integrationaccountcertificates + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultKeyReferenceKeyVault struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/predicates.go new file mode 100644 index 000000000000..adb1686316d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/predicates.go @@ -0,0 +1,29 @@ +package integrationaccountcertificates + +type IntegrationAccountCertificateOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountCertificateOperationPredicate) Matches(input IntegrationAccountCertificate) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go new file mode 100644 index 000000000000..463b6cce545a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go @@ -0,0 +1,12 @@ +package integrationaccountcertificates + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountcertificates/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md new file mode 100644 index 000000000000..8c5b5fe05c3c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps` Documentation + +The `integrationaccountmaps` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountmaps" +``` + + +### Client Initialization + +```go +client := integrationaccountmaps.NewIntegrationAccountMapsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountMapsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountmaps.NewMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "mapValue") + +payload := integrationaccountmaps.IntegrationAccountMap{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountMapsClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountmaps.NewMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "mapValue") + +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: `IntegrationAccountMapsClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountmaps.NewMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "mapValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountMapsClient.List` + +```go +ctx := context.TODO() +id := integrationaccountmaps.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +// alternatively `client.List(ctx, id, integrationaccountmaps.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, integrationaccountmaps.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationAccountMapsClient.ListContentCallbackUrl` + +```go +ctx := context.TODO() +id := integrationaccountmaps.NewMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "mapValue") + +payload := integrationaccountmaps.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.ListContentCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go new file mode 100644 index 000000000000..21fb3bffd9b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go @@ -0,0 +1,18 @@ +package integrationaccountmaps + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountMapsClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountMapsClientWithBaseURI(endpoint string) IntegrationAccountMapsClient { + return IntegrationAccountMapsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/constants.go new file mode 100644 index 000000000000..fa9f7bb2ba84 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/constants.go @@ -0,0 +1,74 @@ +package integrationaccountmaps + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type MapType string + +const ( + MapTypeLiquid MapType = "Liquid" + MapTypeNotSpecified MapType = "NotSpecified" + MapTypeXslt MapType = "Xslt" + MapTypeXsltThreeZero MapType = "Xslt30" + MapTypeXsltTwoZero MapType = "Xslt20" +) + +func PossibleValuesForMapType() []string { + return []string{ + string(MapTypeLiquid), + string(MapTypeNotSpecified), + string(MapTypeXslt), + string(MapTypeXsltThreeZero), + string(MapTypeXsltTwoZero), + } +} + +func parseMapType(input string) (*MapType, error) { + vals := map[string]MapType{ + "liquid": MapTypeLiquid, + "notspecified": MapTypeNotSpecified, + "xslt": MapTypeXslt, + "xslt30": MapTypeXsltThreeZero, + "xslt20": MapTypeXsltTwoZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MapType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go new file mode 100644 index 000000000000..609e19701d5b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountmaps + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go new file mode 100644 index 000000000000..ff871f898a68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go @@ -0,0 +1,137 @@ +package integrationaccountmaps + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = MapId{} + +// MapId is a struct representing the Resource ID for a Map +type MapId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + MapName string +} + +// NewMapID returns a new MapId struct +func NewMapID(subscriptionId string, resourceGroupName string, integrationAccountName string, mapName string) MapId { + return MapId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + MapName: mapName, + } +} + +// ParseMapID parses 'input' into a MapId +func ParseMapID(input string) (*MapId, error) { + parser := resourceids.NewParserFromResourceIdType(MapId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := MapId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.MapName, ok = parsed.Parsed["mapName"]; !ok { + return nil, fmt.Errorf("the segment 'mapName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseMapIDInsensitively parses 'input' case-insensitively into a MapId +// note: this method should only be used for API response data and not user input +func ParseMapIDInsensitively(input string) (*MapId, error) { + parser := resourceids.NewParserFromResourceIdType(MapId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := MapId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.MapName, ok = parsed.Parsed["mapName"]; !ok { + return nil, fmt.Errorf("the segment 'mapName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateMapID checks that 'input' can be parsed as a Map ID +func ValidateMapID(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 := ParseMapID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Map ID +func (id MapId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/maps/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.MapName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Map ID +func (id MapId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticMaps", "maps", "maps"), + resourceids.UserSpecifiedSegment("mapName", "mapValue"), + } +} + +// String returns a human-readable description of this Map ID +func (id MapId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Map Name: %q", id.MapName), + } + return fmt.Sprintf("Map (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate_autorest.go new file mode 100644 index 000000000000..3a05c3329584 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountmaps + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountMap +} + +// CreateOrUpdate ... +func (c IntegrationAccountMapsClient) CreateOrUpdate(ctx context.Context, id MapId, input IntegrationAccountMap) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountMapsClient) preparerForCreateOrUpdate(ctx context.Context, id MapId, input IntegrationAccountMap) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountMapsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_delete_autorest.go new file mode 100644 index 000000000000..6687a8e31952 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountmaps + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountMapsClient) Delete(ctx context.Context, id MapId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountMapsClient) preparerForDelete(ctx context.Context, id MapId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountMapsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get_autorest.go new file mode 100644 index 000000000000..e5cb5fb9897d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountmaps + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountMap +} + +// Get ... +func (c IntegrationAccountMapsClient) Get(ctx context.Context, id MapId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountMapsClient) preparerForGet(ctx context.Context, id MapId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountMapsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list_autorest.go new file mode 100644 index 000000000000..2373aa96ae30 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list_autorest.go @@ -0,0 +1,220 @@ +package integrationaccountmaps + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccountMap + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []IntegrationAccountMap +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c IntegrationAccountMapsClient) List(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountMapsClient) preparerForList(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/maps", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c IntegrationAccountMapsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountMapsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []IntegrationAccountMap `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c IntegrationAccountMapsClient) ListComplete(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, IntegrationAccountMapOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountMapsClient) ListCompleteMatchingPredicate(ctx context.Context, id IntegrationAccountId, options ListOperationOptions, predicate IntegrationAccountMapOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]IntegrationAccountMap, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl_autorest.go new file mode 100644 index 000000000000..f4c32ffe6c8e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package integrationaccountmaps + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListContentCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListContentCallbackUrl ... +func (c IntegrationAccountMapsClient) ListContentCallbackUrl(ctx context.Context, id MapId, input GetCallbackUrlParameters) (result ListContentCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListContentCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "ListContentCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "ListContentCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListContentCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountmaps.IntegrationAccountMapsClient", "ListContentCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListContentCallbackUrl prepares the ListContentCallbackUrl request. +func (c IntegrationAccountMapsClient) preparerForListContentCallbackUrl(ctx context.Context, id MapId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listContentCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListContentCallbackUrl handles the response to the ListContentCallbackUrl request. The method always +// closes the http.Response Body. +func (c IntegrationAccountMapsClient) responderForListContentCallbackUrl(resp *http.Response) (result ListContentCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_contenthash.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_contenthash.go new file mode 100644 index 000000000000..48677dd723d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_contenthash.go @@ -0,0 +1,9 @@ +package integrationaccountmaps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentHash struct { + Algorithm *string `json:"algorithm,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_contentlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_contentlink.go new file mode 100644 index 000000000000..2af05f43638d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_contentlink.go @@ -0,0 +1,12 @@ +package integrationaccountmaps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentLink struct { + ContentHash *ContentHash `json:"contentHash,omitempty"` + ContentSize *int64 `json:"contentSize,omitempty"` + ContentVersion *string `json:"contentVersion,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..3458f2415ccd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package integrationaccountmaps + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmap.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmap.go new file mode 100644 index 000000000000..8939921424fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmap.go @@ -0,0 +1,13 @@ +package integrationaccountmaps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountMap struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties IntegrationAccountMapProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmapproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmapproperties.go new file mode 100644 index 000000000000..6517165e0eea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmapproperties.go @@ -0,0 +1,45 @@ +package integrationaccountmaps + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountMapProperties struct { + ChangedTime *string `json:"changedTime,omitempty"` + Content *string `json:"content,omitempty"` + ContentLink *ContentLink `json:"contentLink,omitempty"` + ContentType *string `json:"contentType,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + MapType MapType `json:"mapType"` + Metadata *interface{} `json:"metadata,omitempty"` + ParametersSchema *IntegrationAccountMapPropertiesParametersSchema `json:"parametersSchema,omitempty"` +} + +func (o *IntegrationAccountMapProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountMapProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *IntegrationAccountMapProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountMapProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmappropertiesparametersschema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmappropertiesparametersschema.go new file mode 100644 index 000000000000..bc2cab012b63 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_integrationaccountmappropertiesparametersschema.go @@ -0,0 +1,8 @@ +package integrationaccountmaps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountMapPropertiesParametersSchema struct { + Ref *string `json:"ref,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..64706937cad4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package integrationaccountmaps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..d776410c0569 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package integrationaccountmaps + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/predicates.go new file mode 100644 index 000000000000..6daadbbf97e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/predicates.go @@ -0,0 +1,29 @@ +package integrationaccountmaps + +type IntegrationAccountMapOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountMapOperationPredicate) Matches(input IntegrationAccountMap) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go new file mode 100644 index 000000000000..a8d445f94391 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go @@ -0,0 +1,12 @@ +package integrationaccountmaps + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountmaps/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md new file mode 100644 index 000000000000..3c5c68d3f24e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners` Documentation + +The `integrationaccountpartners` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountpartners" +``` + + +### Client Initialization + +```go +client := integrationaccountpartners.NewIntegrationAccountPartnersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountPartnersClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountpartners.NewPartnerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "partnerValue") + +payload := integrationaccountpartners.IntegrationAccountPartner{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountPartnersClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountpartners.NewPartnerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "partnerValue") + +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: `IntegrationAccountPartnersClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountpartners.NewPartnerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "partnerValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountPartnersClient.List` + +```go +ctx := context.TODO() +id := integrationaccountpartners.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +// alternatively `client.List(ctx, id, integrationaccountpartners.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, integrationaccountpartners.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationAccountPartnersClient.ListContentCallbackUrl` + +```go +ctx := context.TODO() +id := integrationaccountpartners.NewPartnerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "partnerValue") + +payload := integrationaccountpartners.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.ListContentCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go new file mode 100644 index 000000000000..1fbaff6716f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go @@ -0,0 +1,18 @@ +package integrationaccountpartners + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountPartnersClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountPartnersClientWithBaseURI(endpoint string) IntegrationAccountPartnersClient { + return IntegrationAccountPartnersClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/constants.go new file mode 100644 index 000000000000..2e580c247fab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/constants.go @@ -0,0 +1,65 @@ +package integrationaccountpartners + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type PartnerType string + +const ( + PartnerTypeBTwoB PartnerType = "B2B" + PartnerTypeNotSpecified PartnerType = "NotSpecified" +) + +func PossibleValuesForPartnerType() []string { + return []string{ + string(PartnerTypeBTwoB), + string(PartnerTypeNotSpecified), + } +} + +func parsePartnerType(input string) (*PartnerType, error) { + vals := map[string]PartnerType{ + "b2b": PartnerTypeBTwoB, + "notspecified": PartnerTypeNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PartnerType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go new file mode 100644 index 000000000000..ac3a9c85ebd2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountpartners + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go new file mode 100644 index 000000000000..b08ed06b94bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go @@ -0,0 +1,137 @@ +package integrationaccountpartners + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = PartnerId{} + +// PartnerId is a struct representing the Resource ID for a Partner +type PartnerId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + PartnerName string +} + +// NewPartnerID returns a new PartnerId struct +func NewPartnerID(subscriptionId string, resourceGroupName string, integrationAccountName string, partnerName string) PartnerId { + return PartnerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + PartnerName: partnerName, + } +} + +// ParsePartnerID parses 'input' into a PartnerId +func ParsePartnerID(input string) (*PartnerId, error) { + parser := resourceids.NewParserFromResourceIdType(PartnerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := PartnerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.PartnerName, ok = parsed.Parsed["partnerName"]; !ok { + return nil, fmt.Errorf("the segment 'partnerName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParsePartnerIDInsensitively parses 'input' case-insensitively into a PartnerId +// note: this method should only be used for API response data and not user input +func ParsePartnerIDInsensitively(input string) (*PartnerId, error) { + parser := resourceids.NewParserFromResourceIdType(PartnerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := PartnerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.PartnerName, ok = parsed.Parsed["partnerName"]; !ok { + return nil, fmt.Errorf("the segment 'partnerName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidatePartnerID checks that 'input' can be parsed as a Partner ID +func ValidatePartnerID(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 := ParsePartnerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Partner ID +func (id PartnerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/partners/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.PartnerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Partner ID +func (id PartnerId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticPartners", "partners", "partners"), + resourceids.UserSpecifiedSegment("partnerName", "partnerValue"), + } +} + +// String returns a human-readable description of this Partner ID +func (id PartnerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Partner Name: %q", id.PartnerName), + } + return fmt.Sprintf("Partner (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate_autorest.go new file mode 100644 index 000000000000..ea062ebc9457 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountpartners + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountPartner +} + +// CreateOrUpdate ... +func (c IntegrationAccountPartnersClient) CreateOrUpdate(ctx context.Context, id PartnerId, input IntegrationAccountPartner) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountPartnersClient) preparerForCreateOrUpdate(ctx context.Context, id PartnerId, input IntegrationAccountPartner) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountPartnersClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_delete_autorest.go new file mode 100644 index 000000000000..62728bdf5c33 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountpartners + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountPartnersClient) Delete(ctx context.Context, id PartnerId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountPartnersClient) preparerForDelete(ctx context.Context, id PartnerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountPartnersClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get_autorest.go new file mode 100644 index 000000000000..dc4c53ef180b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountpartners + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountPartner +} + +// Get ... +func (c IntegrationAccountPartnersClient) Get(ctx context.Context, id PartnerId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountPartnersClient) preparerForGet(ctx context.Context, id PartnerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountPartnersClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list_autorest.go new file mode 100644 index 000000000000..a1418f4e59b3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list_autorest.go @@ -0,0 +1,220 @@ +package integrationaccountpartners + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccountPartner + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []IntegrationAccountPartner +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c IntegrationAccountPartnersClient) List(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountPartnersClient) preparerForList(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/partners", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c IntegrationAccountPartnersClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountPartnersClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []IntegrationAccountPartner `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c IntegrationAccountPartnersClient) ListComplete(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, IntegrationAccountPartnerOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountPartnersClient) ListCompleteMatchingPredicate(ctx context.Context, id IntegrationAccountId, options ListOperationOptions, predicate IntegrationAccountPartnerOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]IntegrationAccountPartner, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl_autorest.go new file mode 100644 index 000000000000..110231414eec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package integrationaccountpartners + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListContentCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListContentCallbackUrl ... +func (c IntegrationAccountPartnersClient) ListContentCallbackUrl(ctx context.Context, id PartnerId, input GetCallbackUrlParameters) (result ListContentCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListContentCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "ListContentCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "ListContentCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListContentCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountpartners.IntegrationAccountPartnersClient", "ListContentCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListContentCallbackUrl prepares the ListContentCallbackUrl request. +func (c IntegrationAccountPartnersClient) preparerForListContentCallbackUrl(ctx context.Context, id PartnerId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listContentCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListContentCallbackUrl handles the response to the ListContentCallbackUrl request. The method always +// closes the http.Response Body. +func (c IntegrationAccountPartnersClient) responderForListContentCallbackUrl(resp *http.Response) (result ListContentCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_b2bpartnercontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_b2bpartnercontent.go new file mode 100644 index 000000000000..cefca97d2272 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_b2bpartnercontent.go @@ -0,0 +1,8 @@ +package integrationaccountpartners + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type B2BPartnerContent struct { + BusinessIdentities *[]BusinessIdentity `json:"businessIdentities,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_businessidentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_businessidentity.go new file mode 100644 index 000000000000..aead972193ff --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_businessidentity.go @@ -0,0 +1,9 @@ +package integrationaccountpartners + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BusinessIdentity struct { + Qualifier string `json:"qualifier"` + Value string `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..7369a99dd662 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package integrationaccountpartners + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_integrationaccountpartner.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_integrationaccountpartner.go new file mode 100644 index 000000000000..d1b7cb8151ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_integrationaccountpartner.go @@ -0,0 +1,13 @@ +package integrationaccountpartners + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountPartner struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties IntegrationAccountPartnerProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_integrationaccountpartnerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_integrationaccountpartnerproperties.go new file mode 100644 index 000000000000..f1e4ee6c2707 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_integrationaccountpartnerproperties.go @@ -0,0 +1,42 @@ +package integrationaccountpartners + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountPartnerProperties struct { + ChangedTime *string `json:"changedTime,omitempty"` + Content PartnerContent `json:"content"` + CreatedTime *string `json:"createdTime,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + PartnerType PartnerType `json:"partnerType"` +} + +func (o *IntegrationAccountPartnerProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountPartnerProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *IntegrationAccountPartnerProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountPartnerProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_partnercontent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_partnercontent.go new file mode 100644 index 000000000000..4fa31c4c71ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_partnercontent.go @@ -0,0 +1,8 @@ +package integrationaccountpartners + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PartnerContent struct { + B2b *B2BPartnerContent `json:"b2b,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..b3fa6182db11 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package integrationaccountpartners + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..fcbfbfd6b22d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package integrationaccountpartners + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/predicates.go new file mode 100644 index 000000000000..60f56a09ed81 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/predicates.go @@ -0,0 +1,29 @@ +package integrationaccountpartners + +type IntegrationAccountPartnerOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountPartnerOperationPredicate) Matches(input IntegrationAccountPartner) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go new file mode 100644 index 000000000000..e35739db53f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go @@ -0,0 +1,12 @@ +package integrationaccountpartners + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountpartners/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/README.md new file mode 100644 index 000000000000..ad9bdbb6408f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/README.md @@ -0,0 +1,212 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts` Documentation + +The `integrationaccounts` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccounts" +``` + + +### Client Initialization + +```go +client := integrationaccounts.NewIntegrationAccountsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +payload := integrationaccounts.IntegrationAccount{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountsClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +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: `IntegrationAccountsClient.Get` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := integrationaccounts.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, integrationaccounts.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, integrationaccounts.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationAccountsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := integrationaccounts.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id, integrationaccounts.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id, integrationaccounts.DefaultListBySubscriptionOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationAccountsClient.ListCallbackUrl` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +payload := integrationaccounts.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.ListCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountsClient.ListKeyVaultKeys` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +payload := integrationaccounts.ListKeyVaultKeysDefinition{ + // ... +} + + +read, err := client.ListKeyVaultKeys(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountsClient.LogTrackingEvents` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +payload := integrationaccounts.TrackingEventsDefinition{ + // ... +} + + +read, err := client.LogTrackingEvents(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountsClient.RegenerateAccessKey` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +payload := integrationaccounts.RegenerateActionParameter{ + // ... +} + + +read, err := client.RegenerateAccessKey(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountsClient.Update` + +```go +ctx := context.TODO() +id := integrationaccounts.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +payload := integrationaccounts.IntegrationAccount{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/client.go new file mode 100644 index 000000000000..e4906893775d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/client.go @@ -0,0 +1,18 @@ +package integrationaccounts + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountsClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountsClientWithBaseURI(endpoint string) IntegrationAccountsClient { + return IntegrationAccountsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/constants.go new file mode 100644 index 000000000000..f499c67ceaeb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/constants.go @@ -0,0 +1,249 @@ +package integrationaccounts + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EventLevel string + +const ( + EventLevelCritical EventLevel = "Critical" + EventLevelError EventLevel = "Error" + EventLevelInformational EventLevel = "Informational" + EventLevelLogAlways EventLevel = "LogAlways" + EventLevelVerbose EventLevel = "Verbose" + EventLevelWarning EventLevel = "Warning" +) + +func PossibleValuesForEventLevel() []string { + return []string{ + string(EventLevelCritical), + string(EventLevelError), + string(EventLevelInformational), + string(EventLevelLogAlways), + string(EventLevelVerbose), + string(EventLevelWarning), + } +} + +func parseEventLevel(input string) (*EventLevel, error) { + vals := map[string]EventLevel{ + "critical": EventLevelCritical, + "error": EventLevelError, + "informational": EventLevelInformational, + "logalways": EventLevelLogAlways, + "verbose": EventLevelVerbose, + "warning": EventLevelWarning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EventLevel(input) + return &out, nil +} + +type IntegrationAccountSkuName string + +const ( + IntegrationAccountSkuNameBasic IntegrationAccountSkuName = "Basic" + IntegrationAccountSkuNameFree IntegrationAccountSkuName = "Free" + IntegrationAccountSkuNameNotSpecified IntegrationAccountSkuName = "NotSpecified" + IntegrationAccountSkuNameStandard IntegrationAccountSkuName = "Standard" +) + +func PossibleValuesForIntegrationAccountSkuName() []string { + return []string{ + string(IntegrationAccountSkuNameBasic), + string(IntegrationAccountSkuNameFree), + string(IntegrationAccountSkuNameNotSpecified), + string(IntegrationAccountSkuNameStandard), + } +} + +func parseIntegrationAccountSkuName(input string) (*IntegrationAccountSkuName, error) { + vals := map[string]IntegrationAccountSkuName{ + "basic": IntegrationAccountSkuNameBasic, + "free": IntegrationAccountSkuNameFree, + "notspecified": IntegrationAccountSkuNameNotSpecified, + "standard": IntegrationAccountSkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationAccountSkuName(input) + return &out, nil +} + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type TrackEventsOperationOptions string + +const ( + TrackEventsOperationOptionsDisableSourceInfoEnrich TrackEventsOperationOptions = "DisableSourceInfoEnrich" + TrackEventsOperationOptionsNone TrackEventsOperationOptions = "None" +) + +func PossibleValuesForTrackEventsOperationOptions() []string { + return []string{ + string(TrackEventsOperationOptionsDisableSourceInfoEnrich), + string(TrackEventsOperationOptionsNone), + } +} + +func parseTrackEventsOperationOptions(input string) (*TrackEventsOperationOptions, error) { + vals := map[string]TrackEventsOperationOptions{ + "disablesourceinfoenrich": TrackEventsOperationOptionsDisableSourceInfoEnrich, + "none": TrackEventsOperationOptionsNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TrackEventsOperationOptions(input) + return &out, nil +} + +type TrackingRecordType string + +const ( + TrackingRecordTypeASTwoMDN TrackingRecordType = "AS2MDN" + TrackingRecordTypeASTwoMessage TrackingRecordType = "AS2Message" + TrackingRecordTypeCustom TrackingRecordType = "Custom" + TrackingRecordTypeEdifactFunctionalGroup TrackingRecordType = "EdifactFunctionalGroup" + TrackingRecordTypeEdifactFunctionalGroupAcknowledgment TrackingRecordType = "EdifactFunctionalGroupAcknowledgment" + TrackingRecordTypeEdifactInterchange TrackingRecordType = "EdifactInterchange" + TrackingRecordTypeEdifactInterchangeAcknowledgment TrackingRecordType = "EdifactInterchangeAcknowledgment" + TrackingRecordTypeEdifactTransactionSet TrackingRecordType = "EdifactTransactionSet" + TrackingRecordTypeEdifactTransactionSetAcknowledgment TrackingRecordType = "EdifactTransactionSetAcknowledgment" + TrackingRecordTypeNotSpecified TrackingRecordType = "NotSpecified" + TrackingRecordTypeXOneTwoFunctionalGroup TrackingRecordType = "X12FunctionalGroup" + TrackingRecordTypeXOneTwoFunctionalGroupAcknowledgment TrackingRecordType = "X12FunctionalGroupAcknowledgment" + TrackingRecordTypeXOneTwoInterchange TrackingRecordType = "X12Interchange" + TrackingRecordTypeXOneTwoInterchangeAcknowledgment TrackingRecordType = "X12InterchangeAcknowledgment" + TrackingRecordTypeXOneTwoTransactionSet TrackingRecordType = "X12TransactionSet" + TrackingRecordTypeXOneTwoTransactionSetAcknowledgment TrackingRecordType = "X12TransactionSetAcknowledgment" +) + +func PossibleValuesForTrackingRecordType() []string { + return []string{ + string(TrackingRecordTypeASTwoMDN), + string(TrackingRecordTypeASTwoMessage), + string(TrackingRecordTypeCustom), + string(TrackingRecordTypeEdifactFunctionalGroup), + string(TrackingRecordTypeEdifactFunctionalGroupAcknowledgment), + string(TrackingRecordTypeEdifactInterchange), + string(TrackingRecordTypeEdifactInterchangeAcknowledgment), + string(TrackingRecordTypeEdifactTransactionSet), + string(TrackingRecordTypeEdifactTransactionSetAcknowledgment), + string(TrackingRecordTypeNotSpecified), + string(TrackingRecordTypeXOneTwoFunctionalGroup), + string(TrackingRecordTypeXOneTwoFunctionalGroupAcknowledgment), + string(TrackingRecordTypeXOneTwoInterchange), + string(TrackingRecordTypeXOneTwoInterchangeAcknowledgment), + string(TrackingRecordTypeXOneTwoTransactionSet), + string(TrackingRecordTypeXOneTwoTransactionSetAcknowledgment), + } +} + +func parseTrackingRecordType(input string) (*TrackingRecordType, error) { + vals := map[string]TrackingRecordType{ + "as2mdn": TrackingRecordTypeASTwoMDN, + "as2message": TrackingRecordTypeASTwoMessage, + "custom": TrackingRecordTypeCustom, + "edifactfunctionalgroup": TrackingRecordTypeEdifactFunctionalGroup, + "edifactfunctionalgroupacknowledgment": TrackingRecordTypeEdifactFunctionalGroupAcknowledgment, + "edifactinterchange": TrackingRecordTypeEdifactInterchange, + "edifactinterchangeacknowledgment": TrackingRecordTypeEdifactInterchangeAcknowledgment, + "edifacttransactionset": TrackingRecordTypeEdifactTransactionSet, + "edifacttransactionsetacknowledgment": TrackingRecordTypeEdifactTransactionSetAcknowledgment, + "notspecified": TrackingRecordTypeNotSpecified, + "x12functionalgroup": TrackingRecordTypeXOneTwoFunctionalGroup, + "x12functionalgroupacknowledgment": TrackingRecordTypeXOneTwoFunctionalGroupAcknowledgment, + "x12interchange": TrackingRecordTypeXOneTwoInterchange, + "x12interchangeacknowledgment": TrackingRecordTypeXOneTwoInterchangeAcknowledgment, + "x12transactionset": TrackingRecordTypeXOneTwoTransactionSet, + "x12transactionsetacknowledgment": TrackingRecordTypeXOneTwoTransactionSetAcknowledgment, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TrackingRecordType(input) + return &out, nil +} + +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + WorkflowStateSuspended WorkflowState = "Suspended" +) + +func PossibleValuesForWorkflowState() []string { + return []string{ + string(WorkflowStateCompleted), + string(WorkflowStateDeleted), + string(WorkflowStateDisabled), + string(WorkflowStateEnabled), + string(WorkflowStateNotSpecified), + string(WorkflowStateSuspended), + } +} + +func parseWorkflowState(input string) (*WorkflowState, error) { + vals := map[string]WorkflowState{ + "completed": WorkflowStateCompleted, + "deleted": WorkflowStateDeleted, + "disabled": WorkflowStateDisabled, + "enabled": WorkflowStateEnabled, + "notspecified": WorkflowStateNotSpecified, + "suspended": WorkflowStateSuspended, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go new file mode 100644 index 000000000000..e323ae97a23e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccounts + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate_autorest.go new file mode 100644 index 000000000000..41439c525f02 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccounts + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccount +} + +// CreateOrUpdate ... +func (c IntegrationAccountsClient) CreateOrUpdate(ctx context.Context, id IntegrationAccountId, input IntegrationAccount) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountsClient) preparerForCreateOrUpdate(ctx context.Context, id IntegrationAccountId, input IntegrationAccount) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_delete_autorest.go new file mode 100644 index 000000000000..321d37549327 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccounts + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountsClient) Delete(ctx context.Context, id IntegrationAccountId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountsClient) preparerForDelete(ctx context.Context, id IntegrationAccountId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_get_autorest.go new file mode 100644 index 000000000000..36785c60689c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccounts + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccount +} + +// Get ... +func (c IntegrationAccountsClient) Get(ctx context.Context, id IntegrationAccountId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountsClient) preparerForGet(ctx context.Context, id IntegrationAccountId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..bfe807683bde --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup_autorest.go @@ -0,0 +1,216 @@ +package integrationaccounts + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccount + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error) +} + +type ListByResourceGroupCompleteResult struct { + Items []IntegrationAccount +} + +func (r ListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListByResourceGroupOperationOptions struct { + Top *int64 +} + +func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { + return ListByResourceGroupOperationOptions{} +} + +func (o ListByResourceGroupOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListByResourceGroupOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// ListByResourceGroup ... +func (c IntegrationAccountsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (resp ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c IntegrationAccountsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Logic/integrationAccounts", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByResourceGroupWithNextLink prepares the ListByResourceGroup request with the given nextLink token. +func (c IntegrationAccountsClient) preparerForListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + type page struct { + Values []IntegrationAccount `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c IntegrationAccountsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, IntegrationAccountOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate IntegrationAccountOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]IntegrationAccount, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription_autorest.go new file mode 100644 index 000000000000..0968ac9bf4dd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription_autorest.go @@ -0,0 +1,216 @@ +package integrationaccounts + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccount + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListBySubscriptionOperationResponse, error) +} + +type ListBySubscriptionCompleteResult struct { + Items []IntegrationAccount +} + +func (r ListBySubscriptionOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListBySubscriptionOperationOptions struct { + Top *int64 +} + +func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions { + return ListBySubscriptionOperationOptions{} +} + +func (o ListBySubscriptionOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListBySubscriptionOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// ListBySubscription ... +func (c IntegrationAccountsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (resp ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscription(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListBySubscription", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListBySubscription(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListBySubscription", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListBySubscription prepares the ListBySubscription request. +func (c IntegrationAccountsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Logic/integrationAccounts", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListBySubscriptionWithNextLink prepares the ListBySubscription request with the given nextLink token. +func (c IntegrationAccountsClient) preparerForListBySubscriptionWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListBySubscription handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForListBySubscription(resp *http.Response) (result ListBySubscriptionOperationResponse, err error) { + type page struct { + Values []IntegrationAccount `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscriptionWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListBySubscription", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListBySubscription(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListBySubscription", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c IntegrationAccountsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, IntegrationAccountOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate IntegrationAccountOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]IntegrationAccount, 0) + + page, err := c.ListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl_autorest.go new file mode 100644 index 000000000000..b49580e64d50 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package integrationaccounts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *CallbackUrl +} + +// ListCallbackUrl ... +func (c IntegrationAccountsClient) ListCallbackUrl(ctx context.Context, id IntegrationAccountId, input GetCallbackUrlParameters) (result ListCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListCallbackUrl prepares the ListCallbackUrl request. +func (c IntegrationAccountsClient) preparerForListCallbackUrl(ctx context.Context, id IntegrationAccountId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListCallbackUrl handles the response to the ListCallbackUrl request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForListCallbackUrl(resp *http.Response) (result ListCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys_autorest.go new file mode 100644 index 000000000000..4a06f34c7fc8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys_autorest.go @@ -0,0 +1,70 @@ +package integrationaccounts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListKeyVaultKeysOperationResponse struct { + HttpResponse *http.Response + Model *KeyVaultKeyCollection +} + +// ListKeyVaultKeys ... +func (c IntegrationAccountsClient) ListKeyVaultKeys(ctx context.Context, id IntegrationAccountId, input ListKeyVaultKeysDefinition) (result ListKeyVaultKeysOperationResponse, err error) { + req, err := c.preparerForListKeyVaultKeys(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListKeyVaultKeys", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListKeyVaultKeys", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListKeyVaultKeys(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "ListKeyVaultKeys", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListKeyVaultKeys prepares the ListKeyVaultKeys request. +func (c IntegrationAccountsClient) preparerForListKeyVaultKeys(ctx context.Context, id IntegrationAccountId, input ListKeyVaultKeysDefinition) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listKeyVaultKeys", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListKeyVaultKeys handles the response to the ListKeyVaultKeys request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForListKeyVaultKeys(resp *http.Response) (result ListKeyVaultKeysOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_logtrackingevents_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_logtrackingevents_autorest.go new file mode 100644 index 000000000000..5960fcd8a253 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_logtrackingevents_autorest.go @@ -0,0 +1,68 @@ +package integrationaccounts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogTrackingEventsOperationResponse struct { + HttpResponse *http.Response +} + +// LogTrackingEvents ... +func (c IntegrationAccountsClient) LogTrackingEvents(ctx context.Context, id IntegrationAccountId, input TrackingEventsDefinition) (result LogTrackingEventsOperationResponse, err error) { + req, err := c.preparerForLogTrackingEvents(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "LogTrackingEvents", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "LogTrackingEvents", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForLogTrackingEvents(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "LogTrackingEvents", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForLogTrackingEvents prepares the LogTrackingEvents request. +func (c IntegrationAccountsClient) preparerForLogTrackingEvents(ctx context.Context, id IntegrationAccountId, input TrackingEventsDefinition) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/logTrackingEvents", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForLogTrackingEvents handles the response to the LogTrackingEvents request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForLogTrackingEvents(resp *http.Response) (result LogTrackingEventsOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey_autorest.go new file mode 100644 index 000000000000..412971cbc35d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey_autorest.go @@ -0,0 +1,70 @@ +package integrationaccounts + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateAccessKeyOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccount +} + +// RegenerateAccessKey ... +func (c IntegrationAccountsClient) RegenerateAccessKey(ctx context.Context, id IntegrationAccountId, input RegenerateActionParameter) (result RegenerateAccessKeyOperationResponse, err error) { + req, err := c.preparerForRegenerateAccessKey(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "RegenerateAccessKey", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "RegenerateAccessKey", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForRegenerateAccessKey(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "RegenerateAccessKey", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForRegenerateAccessKey prepares the RegenerateAccessKey request. +func (c IntegrationAccountsClient) preparerForRegenerateAccessKey(ctx context.Context, id IntegrationAccountId, input RegenerateActionParameter) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/regenerateAccessKey", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForRegenerateAccessKey handles the response to the RegenerateAccessKey request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForRegenerateAccessKey(resp *http.Response) (result RegenerateAccessKeyOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_update_autorest.go new file mode 100644 index 000000000000..07c837f609e9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/method_update_autorest.go @@ -0,0 +1,69 @@ +package integrationaccounts + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccount +} + +// Update ... +func (c IntegrationAccountsClient) Update(ctx context.Context, id IntegrationAccountId, input IntegrationAccount) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Update", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccounts.IntegrationAccountsClient", "Update", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForUpdate prepares the Update request. +func (c IntegrationAccountsClient) preparerForUpdate(ctx context.Context, id IntegrationAccountId, input IntegrationAccount) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForUpdate handles the response to the Update request. The method always +// closes the http.Response Body. +func (c IntegrationAccountsClient) responderForUpdate(resp *http.Response) (result UpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_callbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_callbackurl.go new file mode 100644 index 000000000000..3e1767321aa3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_callbackurl.go @@ -0,0 +1,8 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CallbackUrl struct { + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..1bc7b988576a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package integrationaccounts + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccount.go new file mode 100644 index 000000000000..276c11848504 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccount.go @@ -0,0 +1,14 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccount struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *IntegrationAccountProperties `json:"properties,omitempty"` + Sku *IntegrationAccountSku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccountproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccountproperties.go new file mode 100644 index 000000000000..d07deca3d843 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccountproperties.go @@ -0,0 +1,9 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountProperties struct { + IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` + State *WorkflowState `json:"state,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccountsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccountsku.go new file mode 100644 index 000000000000..9a0b8b53dfbb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_integrationaccountsku.go @@ -0,0 +1,8 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSku struct { + Name IntegrationAccountSkuName `json:"name"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkey.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkey.go new file mode 100644 index 000000000000..38874020d8c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkey.go @@ -0,0 +1,9 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultKey struct { + Attributes *KeyVaultKeyAttributes `json:"attributes,omitempty"` + Kid *string `json:"kid,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkeyattributes.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkeyattributes.go new file mode 100644 index 000000000000..a16539dface0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkeyattributes.go @@ -0,0 +1,10 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultKeyAttributes struct { + Created *int64 `json:"created,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Updated *int64 `json:"updated,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkeycollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkeycollection.go new file mode 100644 index 000000000000..a1200b1766b9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultkeycollection.go @@ -0,0 +1,9 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultKeyCollection struct { + SkipToken *string `json:"skipToken,omitempty"` + Value *[]KeyVaultKey `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultreference.go new file mode 100644 index 000000000000..bf68e6626886 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_keyvaultreference.go @@ -0,0 +1,10 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultReference struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_listkeyvaultkeysdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_listkeyvaultkeysdefinition.go new file mode 100644 index 000000000000..6bd16b92249c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_listkeyvaultkeysdefinition.go @@ -0,0 +1,9 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListKeyVaultKeysDefinition struct { + KeyVault KeyVaultReference `json:"keyVault"` + SkipToken *string `json:"skipToken,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_regenerateactionparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_regenerateactionparameter.go new file mode 100644 index 000000000000..d9fe07a539bd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_regenerateactionparameter.go @@ -0,0 +1,8 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateActionParameter struct { + KeyType *KeyType `json:"keyType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_resourcereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_resourcereference.go new file mode 100644 index 000000000000..8f8c6e3c54e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_resourcereference.go @@ -0,0 +1,10 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingevent.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingevent.go new file mode 100644 index 000000000000..61de64289b3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingevent.go @@ -0,0 +1,27 @@ +package integrationaccounts + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TrackingEvent struct { + Error *TrackingEventErrorInfo `json:"error,omitempty"` + EventLevel EventLevel `json:"eventLevel"` + EventTime string `json:"eventTime"` + Record *interface{} `json:"record,omitempty"` + RecordType TrackingRecordType `json:"recordType"` +} + +func (o *TrackingEvent) GetEventTimeAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.EventTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *TrackingEvent) SetEventTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EventTime = formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingeventerrorinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingeventerrorinfo.go new file mode 100644 index 000000000000..9f0769f538bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingeventerrorinfo.go @@ -0,0 +1,9 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TrackingEventErrorInfo struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingeventsdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingeventsdefinition.go new file mode 100644 index 000000000000..a93215976f47 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/model_trackingeventsdefinition.go @@ -0,0 +1,10 @@ +package integrationaccounts + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TrackingEventsDefinition struct { + Events []TrackingEvent `json:"events"` + SourceType string `json:"sourceType"` + TrackEventsOptions *TrackEventsOperationOptions `json:"trackEventsOptions,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/predicates.go new file mode 100644 index 000000000000..39c8e826856f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/predicates.go @@ -0,0 +1,29 @@ +package integrationaccounts + +type IntegrationAccountOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountOperationPredicate) Matches(input IntegrationAccount) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/version.go new file mode 100644 index 000000000000..e7e61e35e6da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts/version.go @@ -0,0 +1,12 @@ +package integrationaccounts + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccounts/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md new file mode 100644 index 000000000000..6b246446c4eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas` Documentation + +The `integrationaccountschemas` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountschemas" +``` + + +### Client Initialization + +```go +client := integrationaccountschemas.NewIntegrationAccountSchemasClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountSchemasClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountschemas.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "schemaValue") + +payload := integrationaccountschemas.IntegrationAccountSchema{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountSchemasClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountschemas.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "schemaValue") + +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: `IntegrationAccountSchemasClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountschemas.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "schemaValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountSchemasClient.List` + +```go +ctx := context.TODO() +id := integrationaccountschemas.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +// alternatively `client.List(ctx, id, integrationaccountschemas.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, integrationaccountschemas.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationAccountSchemasClient.ListContentCallbackUrl` + +```go +ctx := context.TODO() +id := integrationaccountschemas.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "schemaValue") + +payload := integrationaccountschemas.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.ListContentCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go new file mode 100644 index 000000000000..9e92a1614ed0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go @@ -0,0 +1,18 @@ +package integrationaccountschemas + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSchemasClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountSchemasClientWithBaseURI(endpoint string) IntegrationAccountSchemasClient { + return IntegrationAccountSchemasClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/constants.go new file mode 100644 index 000000000000..094b9f3491f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/constants.go @@ -0,0 +1,65 @@ +package integrationaccountschemas + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type SchemaType string + +const ( + SchemaTypeNotSpecified SchemaType = "NotSpecified" + SchemaTypeXml SchemaType = "Xml" +) + +func PossibleValuesForSchemaType() []string { + return []string{ + string(SchemaTypeNotSpecified), + string(SchemaTypeXml), + } +} + +func parseSchemaType(input string) (*SchemaType, error) { + vals := map[string]SchemaType{ + "notspecified": SchemaTypeNotSpecified, + "xml": SchemaTypeXml, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SchemaType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go new file mode 100644 index 000000000000..5cda0b4254d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountschemas + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go new file mode 100644 index 000000000000..8dad5ddb39fb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go @@ -0,0 +1,137 @@ +package integrationaccountschemas + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = SchemaId{} + +// SchemaId is a struct representing the Resource ID for a Schema +type SchemaId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + SchemaName string +} + +// NewSchemaID returns a new SchemaId struct +func NewSchemaID(subscriptionId string, resourceGroupName string, integrationAccountName string, schemaName string) SchemaId { + return SchemaId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + SchemaName: schemaName, + } +} + +// ParseSchemaID parses 'input' into a SchemaId +func ParseSchemaID(input string) (*SchemaId, error) { + parser := resourceids.NewParserFromResourceIdType(SchemaId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := SchemaId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.SchemaName, ok = parsed.Parsed["schemaName"]; !ok { + return nil, fmt.Errorf("the segment 'schemaName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseSchemaIDInsensitively parses 'input' case-insensitively into a SchemaId +// note: this method should only be used for API response data and not user input +func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { + parser := resourceids.NewParserFromResourceIdType(SchemaId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := SchemaId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.SchemaName, ok = parsed.Parsed["schemaName"]; !ok { + return nil, fmt.Errorf("the segment 'schemaName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateSchemaID checks that 'input' can be parsed as a Schema ID +func ValidateSchemaID(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 := ParseSchemaID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Schema ID +func (id SchemaId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/schemas/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.SchemaName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Schema ID +func (id SchemaId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticSchemas", "schemas", "schemas"), + resourceids.UserSpecifiedSegment("schemaName", "schemaValue"), + } +} + +// String returns a human-readable description of this Schema ID +func (id SchemaId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Schema Name: %q", id.SchemaName), + } + return fmt.Sprintf("Schema (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate_autorest.go new file mode 100644 index 000000000000..408a5ac3c5f8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountschemas + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountSchema +} + +// CreateOrUpdate ... +func (c IntegrationAccountSchemasClient) CreateOrUpdate(ctx context.Context, id SchemaId, input IntegrationAccountSchema) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountSchemasClient) preparerForCreateOrUpdate(ctx context.Context, id SchemaId, input IntegrationAccountSchema) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSchemasClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_delete_autorest.go new file mode 100644 index 000000000000..24064e7de55a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountschemas + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountSchemasClient) Delete(ctx context.Context, id SchemaId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountSchemasClient) preparerForDelete(ctx context.Context, id SchemaId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSchemasClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get_autorest.go new file mode 100644 index 000000000000..559561bbb7ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountschemas + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountSchema +} + +// Get ... +func (c IntegrationAccountSchemasClient) Get(ctx context.Context, id SchemaId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountSchemasClient) preparerForGet(ctx context.Context, id SchemaId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSchemasClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list_autorest.go new file mode 100644 index 000000000000..73ce2299c348 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list_autorest.go @@ -0,0 +1,220 @@ +package integrationaccountschemas + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccountSchema + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []IntegrationAccountSchema +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c IntegrationAccountSchemasClient) List(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountSchemasClient) preparerForList(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/schemas", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c IntegrationAccountSchemasClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSchemasClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []IntegrationAccountSchema `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c IntegrationAccountSchemasClient) ListComplete(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, IntegrationAccountSchemaOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountSchemasClient) ListCompleteMatchingPredicate(ctx context.Context, id IntegrationAccountId, options ListOperationOptions, predicate IntegrationAccountSchemaOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]IntegrationAccountSchema, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl_autorest.go new file mode 100644 index 000000000000..096f121c83f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package integrationaccountschemas + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListContentCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListContentCallbackUrl ... +func (c IntegrationAccountSchemasClient) ListContentCallbackUrl(ctx context.Context, id SchemaId, input GetCallbackUrlParameters) (result ListContentCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListContentCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "ListContentCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "ListContentCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListContentCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountschemas.IntegrationAccountSchemasClient", "ListContentCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListContentCallbackUrl prepares the ListContentCallbackUrl request. +func (c IntegrationAccountSchemasClient) preparerForListContentCallbackUrl(ctx context.Context, id SchemaId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listContentCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListContentCallbackUrl handles the response to the ListContentCallbackUrl request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSchemasClient) responderForListContentCallbackUrl(resp *http.Response) (result ListContentCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_contenthash.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_contenthash.go new file mode 100644 index 000000000000..e8b9a267ead5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_contenthash.go @@ -0,0 +1,9 @@ +package integrationaccountschemas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentHash struct { + Algorithm *string `json:"algorithm,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_contentlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_contentlink.go new file mode 100644 index 000000000000..2d637d03ecd7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_contentlink.go @@ -0,0 +1,12 @@ +package integrationaccountschemas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentLink struct { + ContentHash *ContentHash `json:"contentHash,omitempty"` + ContentSize *int64 `json:"contentSize,omitempty"` + ContentVersion *string `json:"contentVersion,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..4e4b75dd9b43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package integrationaccountschemas + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_integrationaccountschema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_integrationaccountschema.go new file mode 100644 index 000000000000..a7a568adfd82 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_integrationaccountschema.go @@ -0,0 +1,13 @@ +package integrationaccountschemas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSchema struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties IntegrationAccountSchemaProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_integrationaccountschemaproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_integrationaccountschemaproperties.go new file mode 100644 index 000000000000..25e1acb00812 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_integrationaccountschemaproperties.go @@ -0,0 +1,47 @@ +package integrationaccountschemas + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSchemaProperties struct { + ChangedTime *string `json:"changedTime,omitempty"` + Content *string `json:"content,omitempty"` + ContentLink *ContentLink `json:"contentLink,omitempty"` + ContentType *string `json:"contentType,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + DocumentName *string `json:"documentName,omitempty"` + FileName *string `json:"fileName,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + SchemaType SchemaType `json:"schemaType"` + TargetNamespace *string `json:"targetNamespace,omitempty"` +} + +func (o *IntegrationAccountSchemaProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountSchemaProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *IntegrationAccountSchemaProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountSchemaProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..a9f9a98cd796 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package integrationaccountschemas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..19504960051a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package integrationaccountschemas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/predicates.go new file mode 100644 index 000000000000..218b6a645da7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/predicates.go @@ -0,0 +1,29 @@ +package integrationaccountschemas + +type IntegrationAccountSchemaOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountSchemaOperationPredicate) Matches(input IntegrationAccountSchema) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go new file mode 100644 index 000000000000..5aa266b3ac17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go @@ -0,0 +1,12 @@ +package integrationaccountschemas + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountschemas/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md new file mode 100644 index 000000000000..e00cd5b6fbce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md @@ -0,0 +1,90 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions` Documentation + +The `integrationaccountsessions` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationaccountsessions" +``` + + +### Client Initialization + +```go +client := integrationaccountsessions.NewIntegrationAccountSessionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationAccountSessionsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationaccountsessions.NewSessionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "sessionValue") + +payload := integrationaccountsessions.IntegrationAccountSession{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountSessionsClient.Delete` + +```go +ctx := context.TODO() +id := integrationaccountsessions.NewSessionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "sessionValue") + +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: `IntegrationAccountSessionsClient.Get` + +```go +ctx := context.TODO() +id := integrationaccountsessions.NewSessionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue", "sessionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationAccountSessionsClient.List` + +```go +ctx := context.TODO() +id := integrationaccountsessions.NewIntegrationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationAccountValue") + +// alternatively `client.List(ctx, id, integrationaccountsessions.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, integrationaccountsessions.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go new file mode 100644 index 000000000000..5c691a90ea66 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go @@ -0,0 +1,18 @@ +package integrationaccountsessions + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSessionsClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationAccountSessionsClientWithBaseURI(endpoint string) IntegrationAccountSessionsClient { + return IntegrationAccountSessionsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go new file mode 100644 index 000000000000..6d684a719192 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go @@ -0,0 +1,124 @@ +package integrationaccountsessions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationAccountId{} + +// IntegrationAccountId is a struct representing the Resource ID for a Integration Account +type IntegrationAccountId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string +} + +// NewIntegrationAccountID returns a new IntegrationAccountId struct +func NewIntegrationAccountID(subscriptionId string, resourceGroupName string, integrationAccountName string) IntegrationAccountId { + return IntegrationAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + } +} + +// ParseIntegrationAccountID parses 'input' into a IntegrationAccountId +func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationAccountIDInsensitively parses 'input' case-insensitively into a IntegrationAccountId +// note: this method should only be used for API response data and not user input +func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationAccountId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationAccountID checks that 'input' can be parsed as a Integration Account ID +func ValidateIntegrationAccountID(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 := ParseIntegrationAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Account ID +func (id IntegrationAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Account ID +func (id IntegrationAccountId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + } +} + +// String returns a human-readable description of this Integration Account ID +func (id IntegrationAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + } + return fmt.Sprintf("Integration Account (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go new file mode 100644 index 000000000000..c7dbd512386b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go @@ -0,0 +1,137 @@ +package integrationaccountsessions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = SessionId{} + +// SessionId is a struct representing the Resource ID for a Session +type SessionId struct { + SubscriptionId string + ResourceGroupName string + IntegrationAccountName string + SessionName string +} + +// NewSessionID returns a new SessionId struct +func NewSessionID(subscriptionId string, resourceGroupName string, integrationAccountName string, sessionName string) SessionId { + return SessionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + IntegrationAccountName: integrationAccountName, + SessionName: sessionName, + } +} + +// ParseSessionID parses 'input' into a SessionId +func ParseSessionID(input string) (*SessionId, error) { + parser := resourceids.NewParserFromResourceIdType(SessionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := SessionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.SessionName, ok = parsed.Parsed["sessionName"]; !ok { + return nil, fmt.Errorf("the segment 'sessionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseSessionIDInsensitively parses 'input' case-insensitively into a SessionId +// note: this method should only be used for API response data and not user input +func ParseSessionIDInsensitively(input string) (*SessionId, error) { + parser := resourceids.NewParserFromResourceIdType(SessionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := SessionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.IntegrationAccountName, ok = parsed.Parsed["integrationAccountName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationAccountName' was not found in the resource id %q", input) + } + + if id.SessionName, ok = parsed.Parsed["sessionName"]; !ok { + return nil, fmt.Errorf("the segment 'sessionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateSessionID checks that 'input' can be parsed as a Session ID +func ValidateSessionID(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 := ParseSessionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Session ID +func (id SessionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationAccounts/%s/sessions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IntegrationAccountName, id.SessionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Session ID +func (id SessionId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationAccounts", "integrationAccounts", "integrationAccounts"), + resourceids.UserSpecifiedSegment("integrationAccountName", "integrationAccountValue"), + resourceids.StaticSegment("staticSessions", "sessions", "sessions"), + resourceids.UserSpecifiedSegment("sessionName", "sessionValue"), + } +} + +// String returns a human-readable description of this Session ID +func (id SessionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Integration Account Name: %q", id.IntegrationAccountName), + fmt.Sprintf("Session Name: %q", id.SessionName), + } + return fmt.Sprintf("Session (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate_autorest.go new file mode 100644 index 000000000000..2f207004d9e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package integrationaccountsessions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountSession +} + +// CreateOrUpdate ... +func (c IntegrationAccountSessionsClient) CreateOrUpdate(ctx context.Context, id SessionId, input IntegrationAccountSession) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationAccountSessionsClient) preparerForCreateOrUpdate(ctx context.Context, id SessionId, input IntegrationAccountSession) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSessionsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_delete_autorest.go new file mode 100644 index 000000000000..03693506957b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationaccountsessions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationAccountSessionsClient) Delete(ctx context.Context, id SessionId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationAccountSessionsClient) preparerForDelete(ctx context.Context, id SessionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSessionsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get_autorest.go new file mode 100644 index 000000000000..ac9e1ba9a25b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationaccountsessions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationAccountSession +} + +// Get ... +func (c IntegrationAccountSessionsClient) Get(ctx context.Context, id SessionId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationAccountSessionsClient) preparerForGet(ctx context.Context, id SessionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSessionsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list_autorest.go new file mode 100644 index 000000000000..3b87ce237f28 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list_autorest.go @@ -0,0 +1,220 @@ +package integrationaccountsessions + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationAccountSession + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []IntegrationAccountSession +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c IntegrationAccountSessionsClient) List(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c IntegrationAccountSessionsClient) preparerForList(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/sessions", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c IntegrationAccountSessionsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c IntegrationAccountSessionsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []IntegrationAccountSession `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationaccountsessions.IntegrationAccountSessionsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c IntegrationAccountSessionsClient) ListComplete(ctx context.Context, id IntegrationAccountId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, IntegrationAccountSessionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationAccountSessionsClient) ListCompleteMatchingPredicate(ctx context.Context, id IntegrationAccountId, options ListOperationOptions, predicate IntegrationAccountSessionOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]IntegrationAccountSession, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/model_integrationaccountsession.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/model_integrationaccountsession.go new file mode 100644 index 000000000000..15723868d8ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/model_integrationaccountsession.go @@ -0,0 +1,13 @@ +package integrationaccountsessions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSession struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties IntegrationAccountSessionProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/model_integrationaccountsessionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/model_integrationaccountsessionproperties.go new file mode 100644 index 000000000000..3b6bc3194cf5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/model_integrationaccountsessionproperties.go @@ -0,0 +1,40 @@ +package integrationaccountsessions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationAccountSessionProperties struct { + ChangedTime *string `json:"changedTime,omitempty"` + Content *interface{} `json:"content,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` +} + +func (o *IntegrationAccountSessionProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountSessionProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *IntegrationAccountSessionProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *IntegrationAccountSessionProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/predicates.go new file mode 100644 index 000000000000..8e70e42c7f9c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/predicates.go @@ -0,0 +1,29 @@ +package integrationaccountsessions + +type IntegrationAccountSessionOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationAccountSessionOperationPredicate) Matches(input IntegrationAccountSession) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go new file mode 100644 index 000000000000..606685d6c5f3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go @@ -0,0 +1,12 @@ +package integrationaccountsessions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountsessions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md new file mode 100644 index 000000000000..04c9cf7d6cea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md @@ -0,0 +1,120 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments` Documentation + +The `integrationserviceenvironments` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/integrationserviceenvironments" +``` + + +### Client Initialization + +```go +client := integrationserviceenvironments.NewIntegrationServiceEnvironmentsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `IntegrationServiceEnvironmentsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := integrationserviceenvironments.NewIntegrationServiceEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationServiceEnvironmentValue") + +payload := integrationserviceenvironments.IntegrationServiceEnvironment{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `IntegrationServiceEnvironmentsClient.Delete` + +```go +ctx := context.TODO() +id := integrationserviceenvironments.NewIntegrationServiceEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationServiceEnvironmentValue") + +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: `IntegrationServiceEnvironmentsClient.Get` + +```go +ctx := context.TODO() +id := integrationserviceenvironments.NewIntegrationServiceEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationServiceEnvironmentValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `IntegrationServiceEnvironmentsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := integrationserviceenvironments.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, integrationserviceenvironments.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, integrationserviceenvironments.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationServiceEnvironmentsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := integrationserviceenvironments.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id, integrationserviceenvironments.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id, integrationserviceenvironments.DefaultListBySubscriptionOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `IntegrationServiceEnvironmentsClient.Update` + +```go +ctx := context.TODO() +id := integrationserviceenvironments.NewIntegrationServiceEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "integrationServiceEnvironmentValue") + +payload := integrationserviceenvironments.IntegrationServiceEnvironment{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go new file mode 100644 index 000000000000..921d0f631b95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go @@ -0,0 +1,18 @@ +package integrationserviceenvironments + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmentsClient struct { + Client autorest.Client + baseUri string +} + +func NewIntegrationServiceEnvironmentsClientWithBaseURI(endpoint string) IntegrationServiceEnvironmentsClient { + return IntegrationServiceEnvironmentsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/constants.go new file mode 100644 index 000000000000..2570ccfd8430 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/constants.go @@ -0,0 +1,196 @@ +package integrationserviceenvironments + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmentAccessEndpointType string + +const ( + IntegrationServiceEnvironmentAccessEndpointTypeExternal IntegrationServiceEnvironmentAccessEndpointType = "External" + IntegrationServiceEnvironmentAccessEndpointTypeInternal IntegrationServiceEnvironmentAccessEndpointType = "Internal" + IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified IntegrationServiceEnvironmentAccessEndpointType = "NotSpecified" +) + +func PossibleValuesForIntegrationServiceEnvironmentAccessEndpointType() []string { + return []string{ + string(IntegrationServiceEnvironmentAccessEndpointTypeExternal), + string(IntegrationServiceEnvironmentAccessEndpointTypeInternal), + string(IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified), + } +} + +func parseIntegrationServiceEnvironmentAccessEndpointType(input string) (*IntegrationServiceEnvironmentAccessEndpointType, error) { + vals := map[string]IntegrationServiceEnvironmentAccessEndpointType{ + "external": IntegrationServiceEnvironmentAccessEndpointTypeExternal, + "internal": IntegrationServiceEnvironmentAccessEndpointTypeInternal, + "notspecified": IntegrationServiceEnvironmentAccessEndpointTypeNotSpecified, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationServiceEnvironmentAccessEndpointType(input) + return &out, nil +} + +type IntegrationServiceEnvironmentSkuName string + +const ( + IntegrationServiceEnvironmentSkuNameDeveloper IntegrationServiceEnvironmentSkuName = "Developer" + IntegrationServiceEnvironmentSkuNameNotSpecified IntegrationServiceEnvironmentSkuName = "NotSpecified" + IntegrationServiceEnvironmentSkuNamePremium IntegrationServiceEnvironmentSkuName = "Premium" +) + +func PossibleValuesForIntegrationServiceEnvironmentSkuName() []string { + return []string{ + string(IntegrationServiceEnvironmentSkuNameDeveloper), + string(IntegrationServiceEnvironmentSkuNameNotSpecified), + string(IntegrationServiceEnvironmentSkuNamePremium), + } +} + +func parseIntegrationServiceEnvironmentSkuName(input string) (*IntegrationServiceEnvironmentSkuName, error) { + vals := map[string]IntegrationServiceEnvironmentSkuName{ + "developer": IntegrationServiceEnvironmentSkuNameDeveloper, + "notspecified": IntegrationServiceEnvironmentSkuNameNotSpecified, + "premium": IntegrationServiceEnvironmentSkuNamePremium, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationServiceEnvironmentSkuName(input) + return &out, nil +} + +type WorkflowProvisioningState string + +const ( + WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" + WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" + WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" + WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" + WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" + WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" + WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" + WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" + WorkflowProvisioningStateInProgress WorkflowProvisioningState = "InProgress" + WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" + WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" + WorkflowProvisioningStatePending WorkflowProvisioningState = "Pending" + WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" + WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" + WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" + WorkflowProvisioningStateRenewing WorkflowProvisioningState = "Renewing" + WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" + WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" + WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" + WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" + WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" + WorkflowProvisioningStateWaiting WorkflowProvisioningState = "Waiting" +) + +func PossibleValuesForWorkflowProvisioningState() []string { + return []string{ + string(WorkflowProvisioningStateAccepted), + string(WorkflowProvisioningStateCanceled), + string(WorkflowProvisioningStateCompleted), + string(WorkflowProvisioningStateCreated), + string(WorkflowProvisioningStateCreating), + string(WorkflowProvisioningStateDeleted), + string(WorkflowProvisioningStateDeleting), + string(WorkflowProvisioningStateFailed), + string(WorkflowProvisioningStateInProgress), + string(WorkflowProvisioningStateMoving), + string(WorkflowProvisioningStateNotSpecified), + string(WorkflowProvisioningStatePending), + string(WorkflowProvisioningStateReady), + string(WorkflowProvisioningStateRegistered), + string(WorkflowProvisioningStateRegistering), + string(WorkflowProvisioningStateRenewing), + string(WorkflowProvisioningStateRunning), + string(WorkflowProvisioningStateSucceeded), + string(WorkflowProvisioningStateUnregistered), + string(WorkflowProvisioningStateUnregistering), + string(WorkflowProvisioningStateUpdating), + string(WorkflowProvisioningStateWaiting), + } +} + +func parseWorkflowProvisioningState(input string) (*WorkflowProvisioningState, error) { + vals := map[string]WorkflowProvisioningState{ + "accepted": WorkflowProvisioningStateAccepted, + "canceled": WorkflowProvisioningStateCanceled, + "completed": WorkflowProvisioningStateCompleted, + "created": WorkflowProvisioningStateCreated, + "creating": WorkflowProvisioningStateCreating, + "deleted": WorkflowProvisioningStateDeleted, + "deleting": WorkflowProvisioningStateDeleting, + "failed": WorkflowProvisioningStateFailed, + "inprogress": WorkflowProvisioningStateInProgress, + "moving": WorkflowProvisioningStateMoving, + "notspecified": WorkflowProvisioningStateNotSpecified, + "pending": WorkflowProvisioningStatePending, + "ready": WorkflowProvisioningStateReady, + "registered": WorkflowProvisioningStateRegistered, + "registering": WorkflowProvisioningStateRegistering, + "renewing": WorkflowProvisioningStateRenewing, + "running": WorkflowProvisioningStateRunning, + "succeeded": WorkflowProvisioningStateSucceeded, + "unregistered": WorkflowProvisioningStateUnregistered, + "unregistering": WorkflowProvisioningStateUnregistering, + "updating": WorkflowProvisioningStateUpdating, + "waiting": WorkflowProvisioningStateWaiting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowProvisioningState(input) + return &out, nil +} + +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + WorkflowStateSuspended WorkflowState = "Suspended" +) + +func PossibleValuesForWorkflowState() []string { + return []string{ + string(WorkflowStateCompleted), + string(WorkflowStateDeleted), + string(WorkflowStateDisabled), + string(WorkflowStateEnabled), + string(WorkflowStateNotSpecified), + string(WorkflowStateSuspended), + } +} + +func parseWorkflowState(input string) (*WorkflowState, error) { + vals := map[string]WorkflowState{ + "completed": WorkflowStateCompleted, + "deleted": WorkflowStateDeleted, + "disabled": WorkflowStateDisabled, + "enabled": WorkflowStateEnabled, + "notspecified": WorkflowStateNotSpecified, + "suspended": WorkflowStateSuspended, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go new file mode 100644 index 000000000000..900eab4a2b1c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go @@ -0,0 +1,124 @@ +package integrationserviceenvironments + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = IntegrationServiceEnvironmentId{} + +// IntegrationServiceEnvironmentId is a struct representing the Resource ID for a Integration Service Environment +type IntegrationServiceEnvironmentId struct { + SubscriptionId string + ResourceGroup string + IntegrationServiceEnvironmentName string +} + +// NewIntegrationServiceEnvironmentID returns a new IntegrationServiceEnvironmentId struct +func NewIntegrationServiceEnvironmentID(subscriptionId string, resourceGroup string, integrationServiceEnvironmentName string) IntegrationServiceEnvironmentId { + return IntegrationServiceEnvironmentId{ + SubscriptionId: subscriptionId, + ResourceGroup: resourceGroup, + IntegrationServiceEnvironmentName: integrationServiceEnvironmentName, + } +} + +// ParseIntegrationServiceEnvironmentID parses 'input' into a IntegrationServiceEnvironmentId +func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvironmentId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationServiceEnvironmentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationServiceEnvironmentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroup' was not found in the resource id %q", input) + } + + if id.IntegrationServiceEnvironmentName, ok = parsed.Parsed["integrationServiceEnvironmentName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationServiceEnvironmentName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseIntegrationServiceEnvironmentIDInsensitively parses 'input' case-insensitively into a IntegrationServiceEnvironmentId +// note: this method should only be used for API response data and not user input +func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*IntegrationServiceEnvironmentId, error) { + parser := resourceids.NewParserFromResourceIdType(IntegrationServiceEnvironmentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := IntegrationServiceEnvironmentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroup, ok = parsed.Parsed["resourceGroup"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroup' was not found in the resource id %q", input) + } + + if id.IntegrationServiceEnvironmentName, ok = parsed.Parsed["integrationServiceEnvironmentName"]; !ok { + return nil, fmt.Errorf("the segment 'integrationServiceEnvironmentName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateIntegrationServiceEnvironmentID checks that 'input' can be parsed as a Integration Service Environment ID +func ValidateIntegrationServiceEnvironmentID(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 := ParseIntegrationServiceEnvironmentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Integration Service Environment ID +func (id IntegrationServiceEnvironmentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/integrationServiceEnvironments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroup, id.IntegrationServiceEnvironmentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Integration Service Environment ID +func (id IntegrationServiceEnvironmentId) 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("resourceGroup", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticIntegrationServiceEnvironments", "integrationServiceEnvironments", "integrationServiceEnvironments"), + resourceids.UserSpecifiedSegment("integrationServiceEnvironmentName", "integrationServiceEnvironmentValue"), + } +} + +// String returns a human-readable description of this Integration Service Environment ID +func (id IntegrationServiceEnvironmentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group: %q", id.ResourceGroup), + fmt.Sprintf("Integration Service Environment Name: %q", id.IntegrationServiceEnvironmentName), + } + return fmt.Sprintf("Integration Service Environment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_createorupdate_autorest.go new file mode 100644 index 000000000000..2b68d550df68 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_createorupdate_autorest.go @@ -0,0 +1,79 @@ +package integrationserviceenvironments + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// CreateOrUpdate ... +func (c IntegrationServiceEnvironmentsClient) CreateOrUpdate(ctx context.Context, id IntegrationServiceEnvironmentId, input IntegrationServiceEnvironment) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = c.senderForCreateOrUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c IntegrationServiceEnvironmentsClient) CreateOrUpdateThenPoll(ctx context.Context, id IntegrationServiceEnvironmentId, input IntegrationServiceEnvironment) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c IntegrationServiceEnvironmentsClient) preparerForCreateOrUpdate(ctx context.Context, id IntegrationServiceEnvironmentId, input IntegrationServiceEnvironment) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForCreateOrUpdate sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (c IntegrationServiceEnvironmentsClient) senderForCreateOrUpdate(ctx context.Context, req *http.Request) (future CreateOrUpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_delete_autorest.go new file mode 100644 index 000000000000..d3381ec2ad7c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_delete_autorest.go @@ -0,0 +1,66 @@ +package integrationserviceenvironments + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c IntegrationServiceEnvironmentsClient) Delete(ctx context.Context, id IntegrationServiceEnvironmentId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c IntegrationServiceEnvironmentsClient) preparerForDelete(ctx context.Context, id IntegrationServiceEnvironmentId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c IntegrationServiceEnvironmentsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get_autorest.go new file mode 100644 index 000000000000..222756f79103 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get_autorest.go @@ -0,0 +1,68 @@ +package integrationserviceenvironments + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *IntegrationServiceEnvironment +} + +// Get ... +func (c IntegrationServiceEnvironmentsClient) Get(ctx context.Context, id IntegrationServiceEnvironmentId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c IntegrationServiceEnvironmentsClient) preparerForGet(ctx context.Context, id IntegrationServiceEnvironmentId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c IntegrationServiceEnvironmentsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..d7a1de33171b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup_autorest.go @@ -0,0 +1,216 @@ +package integrationserviceenvironments + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationServiceEnvironment + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error) +} + +type ListByResourceGroupCompleteResult struct { + Items []IntegrationServiceEnvironment +} + +func (r ListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListByResourceGroupOperationOptions struct { + Top *int64 +} + +func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { + return ListByResourceGroupOperationOptions{} +} + +func (o ListByResourceGroupOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListByResourceGroupOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// ListByResourceGroup ... +func (c IntegrationServiceEnvironmentsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (resp ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c IntegrationServiceEnvironmentsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Logic/integrationServiceEnvironments", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByResourceGroupWithNextLink prepares the ListByResourceGroup request with the given nextLink token. +func (c IntegrationServiceEnvironmentsClient) preparerForListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c IntegrationServiceEnvironmentsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + type page struct { + Values []IntegrationServiceEnvironment `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c IntegrationServiceEnvironmentsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, IntegrationServiceEnvironmentOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationServiceEnvironmentsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate IntegrationServiceEnvironmentOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]IntegrationServiceEnvironment, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription_autorest.go new file mode 100644 index 000000000000..06535d48c65a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription_autorest.go @@ -0,0 +1,216 @@ +package integrationserviceenvironments + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + Model *[]IntegrationServiceEnvironment + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListBySubscriptionOperationResponse, error) +} + +type ListBySubscriptionCompleteResult struct { + Items []IntegrationServiceEnvironment +} + +func (r ListBySubscriptionOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListBySubscriptionOperationOptions struct { + Top *int64 +} + +func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions { + return ListBySubscriptionOperationOptions{} +} + +func (o ListBySubscriptionOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListBySubscriptionOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// ListBySubscription ... +func (c IntegrationServiceEnvironmentsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (resp ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscription(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListBySubscription", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListBySubscription(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListBySubscription", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListBySubscription prepares the ListBySubscription request. +func (c IntegrationServiceEnvironmentsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Logic/integrationServiceEnvironments", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListBySubscriptionWithNextLink prepares the ListBySubscription request with the given nextLink token. +func (c IntegrationServiceEnvironmentsClient) preparerForListBySubscriptionWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListBySubscription handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (c IntegrationServiceEnvironmentsClient) responderForListBySubscription(resp *http.Response) (result ListBySubscriptionOperationResponse, err error) { + type page struct { + Values []IntegrationServiceEnvironment `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscriptionWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListBySubscription", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListBySubscription(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "ListBySubscription", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c IntegrationServiceEnvironmentsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, IntegrationServiceEnvironmentOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c IntegrationServiceEnvironmentsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate IntegrationServiceEnvironmentOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]IntegrationServiceEnvironment, 0) + + page, err := c.ListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_update_autorest.go new file mode 100644 index 000000000000..ef8dbaccd621 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_update_autorest.go @@ -0,0 +1,79 @@ +package integrationserviceenvironments + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Update ... +func (c IntegrationServiceEnvironmentsClient) Update(ctx context.Context, id IntegrationServiceEnvironmentId, input IntegrationServiceEnvironment) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = c.senderForUpdate(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "integrationserviceenvironments.IntegrationServiceEnvironmentsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c IntegrationServiceEnvironmentsClient) UpdateThenPoll(ctx context.Context, id IntegrationServiceEnvironmentId, input IntegrationServiceEnvironment) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} + +// preparerForUpdate prepares the Update request. +func (c IntegrationServiceEnvironmentsClient) preparerForUpdate(ctx context.Context, id IntegrationServiceEnvironmentId, input IntegrationServiceEnvironment) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForUpdate sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (c IntegrationServiceEnvironmentsClient) senderForUpdate(ctx context.Context, req *http.Request) (future UpdateOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_flowendpoints.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_flowendpoints.go new file mode 100644 index 000000000000..d2be2e867bc0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_flowendpoints.go @@ -0,0 +1,9 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowEndpoints struct { + AccessEndpointIPAddresses *[]IPAddress `json:"accessEndpointIpAddresses,omitempty"` + OutgoingIPAddresses *[]IPAddress `json:"outgoingIpAddresses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_flowendpointsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_flowendpointsconfiguration.go new file mode 100644 index 000000000000..c3d9a072304d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_flowendpointsconfiguration.go @@ -0,0 +1,9 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowEndpointsConfiguration struct { + Connector *FlowEndpoints `json:"connector,omitempty"` + Workflow *FlowEndpoints `json:"workflow,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmenencryptionconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmenencryptionconfiguration.go new file mode 100644 index 000000000000..82f8272cbdba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmenencryptionconfiguration.go @@ -0,0 +1,8 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmenEncryptionConfiguration struct { + EncryptionKeyReference *IntegrationServiceEnvironmenEncryptionKeyReference `json:"encryptionKeyReference,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmenencryptionkeyreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmenencryptionkeyreference.go new file mode 100644 index 000000000000..dad4929c7f18 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmenencryptionkeyreference.go @@ -0,0 +1,10 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmenEncryptionKeyReference struct { + KeyName *string `json:"keyName,omitempty"` + KeyVault *ResourceReference `json:"keyVault,omitempty"` + KeyVersion *string `json:"keyVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironment.go new file mode 100644 index 000000000000..0a33ed6d5d3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironment.go @@ -0,0 +1,19 @@ +package integrationserviceenvironments + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironment struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemOrUserAssignedMap `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *IntegrationServiceEnvironmentProperties `json:"properties,omitempty"` + Sku *IntegrationServiceEnvironmentSku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentaccessendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentaccessendpoint.go new file mode 100644 index 000000000000..9d399c1829d9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentaccessendpoint.go @@ -0,0 +1,8 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmentAccessEndpoint struct { + Type *IntegrationServiceEnvironmentAccessEndpointType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentproperties.go new file mode 100644 index 000000000000..8f713affcb74 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentproperties.go @@ -0,0 +1,13 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmentProperties struct { + EncryptionConfiguration *IntegrationServiceEnvironmenEncryptionConfiguration `json:"encryptionConfiguration,omitempty"` + EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` + IntegrationServiceEnvironmentId *string `json:"integrationServiceEnvironmentId,omitempty"` + NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"` + ProvisioningState *WorkflowProvisioningState `json:"provisioningState,omitempty"` + State *WorkflowState `json:"state,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentsku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentsku.go new file mode 100644 index 000000000000..b8a0a034889c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_integrationserviceenvironmentsku.go @@ -0,0 +1,9 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationServiceEnvironmentSku struct { + Capacity *int64 `json:"capacity,omitempty"` + Name *IntegrationServiceEnvironmentSkuName `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_ipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_ipaddress.go new file mode 100644 index 000000000000..d8e6574769ac --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_ipaddress.go @@ -0,0 +1,8 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPAddress struct { + Address *string `json:"address,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_networkconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_networkconfiguration.go new file mode 100644 index 000000000000..766634d11034 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_networkconfiguration.go @@ -0,0 +1,10 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkConfiguration struct { + AccessEndpoint *IntegrationServiceEnvironmentAccessEndpoint `json:"accessEndpoint,omitempty"` + Subnets *[]ResourceReference `json:"subnets,omitempty"` + VirtualNetworkAddressSpace *string `json:"virtualNetworkAddressSpace,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_resourcereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_resourcereference.go new file mode 100644 index 000000000000..719b4ba21e65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/model_resourcereference.go @@ -0,0 +1,10 @@ +package integrationserviceenvironments + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/predicates.go new file mode 100644 index 000000000000..d4380f995398 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/predicates.go @@ -0,0 +1,29 @@ +package integrationserviceenvironments + +type IntegrationServiceEnvironmentOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p IntegrationServiceEnvironmentOperationPredicate) Matches(input IntegrationServiceEnvironment) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go new file mode 100644 index 000000000000..49bc6ae0f868 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go @@ -0,0 +1,12 @@ +package integrationserviceenvironments + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironments/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/README.md new file mode 100644 index 000000000000..88f0856d9f54 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/README.md @@ -0,0 +1,215 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions` Documentation + +The `workflowrunactions` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/workflowrunactions" +``` + + +### Client Initialization + +```go +client := workflowrunactions.NewWorkflowRunActionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WorkflowRunActionsClient.CopeRepetitionsGet` + +```go +ctx := context.TODO() +id := workflowrunactions.NewScopeRepetitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue", "scopeRepetitionValue") + +read, err := client.CopeRepetitionsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.CopeRepetitionsList` + +```go +ctx := context.TODO() +id := workflowrunactions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue") + +read, err := client.CopeRepetitionsList(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.Get` + +```go +ctx := context.TODO() +id := workflowrunactions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.List` + +```go +ctx := context.TODO() +id := workflowrunactions.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue") + +// alternatively `client.List(ctx, id, workflowrunactions.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, workflowrunactions.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WorkflowRunActionsClient.ListExpressionTraces` + +```go +ctx := context.TODO() +id := workflowrunactions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue") + +read, err := client.ListExpressionTraces(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRepetitionsGet` + +```go +ctx := context.TODO() +id := workflowrunactions.NewRepetitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue", "repetitionValue") + +read, err := client.WorkflowRunActionRepetitionsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRepetitionsList` + +```go +ctx := context.TODO() +id := workflowrunactions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue") + +read, err := client.WorkflowRunActionRepetitionsList(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRepetitionsListExpressionTraces` + +```go +ctx := context.TODO() +id := workflowrunactions.NewRepetitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue", "repetitionValue") + +read, err := client.WorkflowRunActionRepetitionsListExpressionTraces(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRepetitionsRequestHistoriesGet` + +```go +ctx := context.TODO() +id := workflowrunactions.NewRepetitionRequestHistoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue", "repetitionValue", "requestHistoryValue") + +read, err := client.WorkflowRunActionRepetitionsRequestHistoriesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRepetitionsRequestHistoriesList` + +```go +ctx := context.TODO() +id := workflowrunactions.NewRepetitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue", "repetitionValue") + +// alternatively `client.WorkflowRunActionRepetitionsRequestHistoriesList(ctx, id)` can be used to do batched pagination +items, err := client.WorkflowRunActionRepetitionsRequestHistoriesListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRequestHistoriesGet` + +```go +ctx := context.TODO() +id := workflowrunactions.NewRequestHistoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue", "requestHistoryValue") + +read, err := client.WorkflowRunActionRequestHistoriesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowRunActionsClient.WorkflowRunActionRequestHistoriesList` + +```go +ctx := context.TODO() +id := workflowrunactions.NewActionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue", "actionValue") + +// alternatively `client.WorkflowRunActionRequestHistoriesList(ctx, id)` can be used to do batched pagination +items, err := client.WorkflowRunActionRequestHistoriesListComplete(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/logic/2019-05-01/workflowrunactions/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/client.go new file mode 100644 index 000000000000..4be56ad82df2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/client.go @@ -0,0 +1,18 @@ +package workflowrunactions + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionsClient struct { + Client autorest.Client + baseUri string +} + +func NewWorkflowRunActionsClientWithBaseURI(endpoint string) WorkflowRunActionsClient { + return WorkflowRunActionsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/constants.go new file mode 100644 index 000000000000..2b85ab65c47b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/constants.go @@ -0,0 +1,67 @@ +package workflowrunactions + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowStatus string + +const ( + WorkflowStatusAborted WorkflowStatus = "Aborted" + WorkflowStatusCancelled WorkflowStatus = "Cancelled" + WorkflowStatusFailed WorkflowStatus = "Failed" + WorkflowStatusFaulted WorkflowStatus = "Faulted" + WorkflowStatusIgnored WorkflowStatus = "Ignored" + WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" + WorkflowStatusPaused WorkflowStatus = "Paused" + WorkflowStatusRunning WorkflowStatus = "Running" + WorkflowStatusSkipped WorkflowStatus = "Skipped" + WorkflowStatusSucceeded WorkflowStatus = "Succeeded" + WorkflowStatusSuspended WorkflowStatus = "Suspended" + WorkflowStatusTimedOut WorkflowStatus = "TimedOut" + WorkflowStatusWaiting WorkflowStatus = "Waiting" +) + +func PossibleValuesForWorkflowStatus() []string { + return []string{ + string(WorkflowStatusAborted), + string(WorkflowStatusCancelled), + string(WorkflowStatusFailed), + string(WorkflowStatusFaulted), + string(WorkflowStatusIgnored), + string(WorkflowStatusNotSpecified), + string(WorkflowStatusPaused), + string(WorkflowStatusRunning), + string(WorkflowStatusSkipped), + string(WorkflowStatusSucceeded), + string(WorkflowStatusSuspended), + string(WorkflowStatusTimedOut), + string(WorkflowStatusWaiting), + } +} + +func parseWorkflowStatus(input string) (*WorkflowStatus, error) { + vals := map[string]WorkflowStatus{ + "aborted": WorkflowStatusAborted, + "cancelled": WorkflowStatusCancelled, + "failed": WorkflowStatusFailed, + "faulted": WorkflowStatusFaulted, + "ignored": WorkflowStatusIgnored, + "notspecified": WorkflowStatusNotSpecified, + "paused": WorkflowStatusPaused, + "running": WorkflowStatusRunning, + "skipped": WorkflowStatusSkipped, + "succeeded": WorkflowStatusSucceeded, + "suspended": WorkflowStatusSuspended, + "timedout": WorkflowStatusTimedOut, + "waiting": WorkflowStatusWaiting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowStatus(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go new file mode 100644 index 000000000000..eddd5c047b95 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go @@ -0,0 +1,150 @@ +package workflowrunactions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ActionId{} + +// ActionId is a struct representing the Resource ID for a Action +type ActionId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + RunName string + ActionName string +} + +// NewActionID returns a new ActionId struct +func NewActionID(subscriptionId string, resourceGroupName string, workflowName string, runName string, actionName string) ActionId { + return ActionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + RunName: runName, + ActionName: actionName, + } +} + +// ParseActionID parses 'input' into a ActionId +func ParseActionID(input string) (*ActionId, error) { + parser := resourceids.NewParserFromResourceIdType(ActionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ActionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseActionIDInsensitively parses 'input' case-insensitively into a ActionId +// note: this method should only be used for API response data and not user input +func ParseActionIDInsensitively(input string) (*ActionId, error) { + parser := resourceids.NewParserFromResourceIdType(ActionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ActionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateActionID checks that 'input' can be parsed as a Action ID +func ValidateActionID(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 := ParseActionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Action ID +func (id ActionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/runs/%s/actions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.RunName, id.ActionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Action ID +func (id ActionId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticRuns", "runs", "runs"), + resourceids.UserSpecifiedSegment("runName", "runValue"), + resourceids.StaticSegment("staticActions", "actions", "actions"), + resourceids.UserSpecifiedSegment("actionName", "actionValue"), + } +} + +// String returns a human-readable description of this Action ID +func (id ActionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Run Name: %q", id.RunName), + fmt.Sprintf("Action Name: %q", id.ActionName), + } + return fmt.Sprintf("Action (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go new file mode 100644 index 000000000000..4cc66d650934 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go @@ -0,0 +1,163 @@ +package workflowrunactions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = RepetitionId{} + +// RepetitionId is a struct representing the Resource ID for a Repetition +type RepetitionId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + RunName string + ActionName string + RepetitionName string +} + +// NewRepetitionID returns a new RepetitionId struct +func NewRepetitionID(subscriptionId string, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) RepetitionId { + return RepetitionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + RunName: runName, + ActionName: actionName, + RepetitionName: repetitionName, + } +} + +// ParseRepetitionID parses 'input' into a RepetitionId +func ParseRepetitionID(input string) (*RepetitionId, error) { + parser := resourceids.NewParserFromResourceIdType(RepetitionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RepetitionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { + return nil, fmt.Errorf("the segment 'repetitionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseRepetitionIDInsensitively parses 'input' case-insensitively into a RepetitionId +// note: this method should only be used for API response data and not user input +func ParseRepetitionIDInsensitively(input string) (*RepetitionId, error) { + parser := resourceids.NewParserFromResourceIdType(RepetitionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RepetitionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { + return nil, fmt.Errorf("the segment 'repetitionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateRepetitionID checks that 'input' can be parsed as a Repetition ID +func ValidateRepetitionID(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 := ParseRepetitionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Repetition ID +func (id RepetitionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/runs/%s/actions/%s/repetitions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.RunName, id.ActionName, id.RepetitionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Repetition ID +func (id RepetitionId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticRuns", "runs", "runs"), + resourceids.UserSpecifiedSegment("runName", "runValue"), + resourceids.StaticSegment("staticActions", "actions", "actions"), + resourceids.UserSpecifiedSegment("actionName", "actionValue"), + resourceids.StaticSegment("staticRepetitions", "repetitions", "repetitions"), + resourceids.UserSpecifiedSegment("repetitionName", "repetitionValue"), + } +} + +// String returns a human-readable description of this Repetition ID +func (id RepetitionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Run Name: %q", id.RunName), + fmt.Sprintf("Action Name: %q", id.ActionName), + fmt.Sprintf("Repetition Name: %q", id.RepetitionName), + } + return fmt.Sprintf("Repetition (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go new file mode 100644 index 000000000000..b23ed6dafc43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go @@ -0,0 +1,176 @@ +package workflowrunactions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = RepetitionRequestHistoryId{} + +// RepetitionRequestHistoryId is a struct representing the Resource ID for a Repetition Request History +type RepetitionRequestHistoryId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + RunName string + ActionName string + RepetitionName string + RequestHistoryName string +} + +// NewRepetitionRequestHistoryID returns a new RepetitionRequestHistoryId struct +func NewRepetitionRequestHistoryID(subscriptionId string, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) RepetitionRequestHistoryId { + return RepetitionRequestHistoryId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + RunName: runName, + ActionName: actionName, + RepetitionName: repetitionName, + RequestHistoryName: requestHistoryName, + } +} + +// ParseRepetitionRequestHistoryID parses 'input' into a RepetitionRequestHistoryId +func ParseRepetitionRequestHistoryID(input string) (*RepetitionRequestHistoryId, error) { + parser := resourceids.NewParserFromResourceIdType(RepetitionRequestHistoryId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RepetitionRequestHistoryId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { + return nil, fmt.Errorf("the segment 'repetitionName' was not found in the resource id %q", input) + } + + if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { + return nil, fmt.Errorf("the segment 'requestHistoryName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseRepetitionRequestHistoryIDInsensitively parses 'input' case-insensitively into a RepetitionRequestHistoryId +// note: this method should only be used for API response data and not user input +func ParseRepetitionRequestHistoryIDInsensitively(input string) (*RepetitionRequestHistoryId, error) { + parser := resourceids.NewParserFromResourceIdType(RepetitionRequestHistoryId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RepetitionRequestHistoryId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.RepetitionName, ok = parsed.Parsed["repetitionName"]; !ok { + return nil, fmt.Errorf("the segment 'repetitionName' was not found in the resource id %q", input) + } + + if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { + return nil, fmt.Errorf("the segment 'requestHistoryName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateRepetitionRequestHistoryID checks that 'input' can be parsed as a Repetition Request History ID +func ValidateRepetitionRequestHistoryID(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 := ParseRepetitionRequestHistoryID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Repetition Request History ID +func (id RepetitionRequestHistoryId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/runs/%s/actions/%s/repetitions/%s/requestHistories/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.RunName, id.ActionName, id.RepetitionName, id.RequestHistoryName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Repetition Request History ID +func (id RepetitionRequestHistoryId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticRuns", "runs", "runs"), + resourceids.UserSpecifiedSegment("runName", "runValue"), + resourceids.StaticSegment("staticActions", "actions", "actions"), + resourceids.UserSpecifiedSegment("actionName", "actionValue"), + resourceids.StaticSegment("staticRepetitions", "repetitions", "repetitions"), + resourceids.UserSpecifiedSegment("repetitionName", "repetitionValue"), + resourceids.StaticSegment("staticRequestHistories", "requestHistories", "requestHistories"), + resourceids.UserSpecifiedSegment("requestHistoryName", "requestHistoryValue"), + } +} + +// String returns a human-readable description of this Repetition Request History ID +func (id RepetitionRequestHistoryId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Run Name: %q", id.RunName), + fmt.Sprintf("Action Name: %q", id.ActionName), + fmt.Sprintf("Repetition Name: %q", id.RepetitionName), + fmt.Sprintf("Request History Name: %q", id.RequestHistoryName), + } + return fmt.Sprintf("Repetition Request History (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go new file mode 100644 index 000000000000..f8a38ccc5768 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go @@ -0,0 +1,163 @@ +package workflowrunactions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = RequestHistoryId{} + +// RequestHistoryId is a struct representing the Resource ID for a Request History +type RequestHistoryId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + RunName string + ActionName string + RequestHistoryName string +} + +// NewRequestHistoryID returns a new RequestHistoryId struct +func NewRequestHistoryID(subscriptionId string, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) RequestHistoryId { + return RequestHistoryId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + RunName: runName, + ActionName: actionName, + RequestHistoryName: requestHistoryName, + } +} + +// ParseRequestHistoryID parses 'input' into a RequestHistoryId +func ParseRequestHistoryID(input string) (*RequestHistoryId, error) { + parser := resourceids.NewParserFromResourceIdType(RequestHistoryId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RequestHistoryId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { + return nil, fmt.Errorf("the segment 'requestHistoryName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseRequestHistoryIDInsensitively parses 'input' case-insensitively into a RequestHistoryId +// note: this method should only be used for API response data and not user input +func ParseRequestHistoryIDInsensitively(input string) (*RequestHistoryId, error) { + parser := resourceids.NewParserFromResourceIdType(RequestHistoryId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RequestHistoryId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.RequestHistoryName, ok = parsed.Parsed["requestHistoryName"]; !ok { + return nil, fmt.Errorf("the segment 'requestHistoryName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateRequestHistoryID checks that 'input' can be parsed as a Request History ID +func ValidateRequestHistoryID(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 := ParseRequestHistoryID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Request History ID +func (id RequestHistoryId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/runs/%s/actions/%s/requestHistories/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.RunName, id.ActionName, id.RequestHistoryName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Request History ID +func (id RequestHistoryId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticRuns", "runs", "runs"), + resourceids.UserSpecifiedSegment("runName", "runValue"), + resourceids.StaticSegment("staticActions", "actions", "actions"), + resourceids.UserSpecifiedSegment("actionName", "actionValue"), + resourceids.StaticSegment("staticRequestHistories", "requestHistories", "requestHistories"), + resourceids.UserSpecifiedSegment("requestHistoryName", "requestHistoryValue"), + } +} + +// String returns a human-readable description of this Request History ID +func (id RequestHistoryId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Run Name: %q", id.RunName), + fmt.Sprintf("Action Name: %q", id.ActionName), + fmt.Sprintf("Request History Name: %q", id.RequestHistoryName), + } + return fmt.Sprintf("Request History (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go new file mode 100644 index 000000000000..5be87b31a792 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go @@ -0,0 +1,137 @@ +package workflowrunactions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = RunId{} + +// RunId is a struct representing the Resource ID for a Run +type RunId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + RunName string +} + +// NewRunID returns a new RunId struct +func NewRunID(subscriptionId string, resourceGroupName string, workflowName string, runName string) RunId { + return RunId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + RunName: runName, + } +} + +// ParseRunID parses 'input' into a RunId +func ParseRunID(input string) (*RunId, error) { + parser := resourceids.NewParserFromResourceIdType(RunId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RunId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseRunIDInsensitively parses 'input' case-insensitively into a RunId +// note: this method should only be used for API response data and not user input +func ParseRunIDInsensitively(input string) (*RunId, error) { + parser := resourceids.NewParserFromResourceIdType(RunId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := RunId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateRunID checks that 'input' can be parsed as a Run ID +func ValidateRunID(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 := ParseRunID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Run ID +func (id RunId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/runs/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.RunName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Run ID +func (id RunId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticRuns", "runs", "runs"), + resourceids.UserSpecifiedSegment("runName", "runValue"), + } +} + +// String returns a human-readable description of this Run ID +func (id RunId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Run Name: %q", id.RunName), + } + return fmt.Sprintf("Run (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go new file mode 100644 index 000000000000..48d2f7f43f6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go @@ -0,0 +1,163 @@ +package workflowrunactions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = ScopeRepetitionId{} + +// ScopeRepetitionId is a struct representing the Resource ID for a Scope Repetition +type ScopeRepetitionId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + RunName string + ActionName string + ScopeRepetitionName string +} + +// NewScopeRepetitionID returns a new ScopeRepetitionId struct +func NewScopeRepetitionID(subscriptionId string, resourceGroupName string, workflowName string, runName string, actionName string, scopeRepetitionName string) ScopeRepetitionId { + return ScopeRepetitionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + RunName: runName, + ActionName: actionName, + ScopeRepetitionName: scopeRepetitionName, + } +} + +// ParseScopeRepetitionID parses 'input' into a ScopeRepetitionId +func ParseScopeRepetitionID(input string) (*ScopeRepetitionId, error) { + parser := resourceids.NewParserFromResourceIdType(ScopeRepetitionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ScopeRepetitionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.ScopeRepetitionName, ok = parsed.Parsed["scopeRepetitionName"]; !ok { + return nil, fmt.Errorf("the segment 'scopeRepetitionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseScopeRepetitionIDInsensitively parses 'input' case-insensitively into a ScopeRepetitionId +// note: this method should only be used for API response data and not user input +func ParseScopeRepetitionIDInsensitively(input string) (*ScopeRepetitionId, error) { + parser := resourceids.NewParserFromResourceIdType(ScopeRepetitionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ScopeRepetitionId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.RunName, ok = parsed.Parsed["runName"]; !ok { + return nil, fmt.Errorf("the segment 'runName' was not found in the resource id %q", input) + } + + if id.ActionName, ok = parsed.Parsed["actionName"]; !ok { + return nil, fmt.Errorf("the segment 'actionName' was not found in the resource id %q", input) + } + + if id.ScopeRepetitionName, ok = parsed.Parsed["scopeRepetitionName"]; !ok { + return nil, fmt.Errorf("the segment 'scopeRepetitionName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateScopeRepetitionID checks that 'input' can be parsed as a Scope Repetition ID +func ValidateScopeRepetitionID(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 := ParseScopeRepetitionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Scope Repetition ID +func (id ScopeRepetitionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/runs/%s/actions/%s/scopeRepetitions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.RunName, id.ActionName, id.ScopeRepetitionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Scope Repetition ID +func (id ScopeRepetitionId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticRuns", "runs", "runs"), + resourceids.UserSpecifiedSegment("runName", "runValue"), + resourceids.StaticSegment("staticActions", "actions", "actions"), + resourceids.UserSpecifiedSegment("actionName", "actionValue"), + resourceids.StaticSegment("staticScopeRepetitions", "scopeRepetitions", "scopeRepetitions"), + resourceids.UserSpecifiedSegment("scopeRepetitionName", "scopeRepetitionValue"), + } +} + +// String returns a human-readable description of this Scope Repetition ID +func (id ScopeRepetitionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Run Name: %q", id.RunName), + fmt.Sprintf("Action Name: %q", id.ActionName), + fmt.Sprintf("Scope Repetition Name: %q", id.ScopeRepetitionName), + } + return fmt.Sprintf("Scope Repetition (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget_autorest.go new file mode 100644 index 000000000000..608ad25cf8ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget_autorest.go @@ -0,0 +1,68 @@ +package workflowrunactions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopeRepetitionsGetOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowRunActionRepetitionDefinition +} + +// CopeRepetitionsGet ... +func (c WorkflowRunActionsClient) CopeRepetitionsGet(ctx context.Context, id ScopeRepetitionId) (result CopeRepetitionsGetOperationResponse, err error) { + req, err := c.preparerForCopeRepetitionsGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "CopeRepetitionsGet", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "CopeRepetitionsGet", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCopeRepetitionsGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "CopeRepetitionsGet", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCopeRepetitionsGet prepares the CopeRepetitionsGet request. +func (c WorkflowRunActionsClient) preparerForCopeRepetitionsGet(ctx context.Context, id ScopeRepetitionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCopeRepetitionsGet handles the response to the CopeRepetitionsGet request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForCopeRepetitionsGet(resp *http.Response) (result CopeRepetitionsGetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionslist_autorest.go new file mode 100644 index 000000000000..21aceda782bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionslist_autorest.go @@ -0,0 +1,69 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopeRepetitionsListOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowRunActionRepetitionDefinitionCollection +} + +// CopeRepetitionsList ... +func (c WorkflowRunActionsClient) CopeRepetitionsList(ctx context.Context, id ActionId) (result CopeRepetitionsListOperationResponse, err error) { + req, err := c.preparerForCopeRepetitionsList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "CopeRepetitionsList", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "CopeRepetitionsList", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCopeRepetitionsList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "CopeRepetitionsList", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCopeRepetitionsList prepares the CopeRepetitionsList request. +func (c WorkflowRunActionsClient) preparerForCopeRepetitionsList(ctx context.Context, id ActionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/scopeRepetitions", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCopeRepetitionsList handles the response to the CopeRepetitionsList request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForCopeRepetitionsList(resp *http.Response) (result CopeRepetitionsListOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_get_autorest.go new file mode 100644 index 000000000000..5033bc3a79e6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_get_autorest.go @@ -0,0 +1,68 @@ +package workflowrunactions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowRunAction +} + +// Get ... +func (c WorkflowRunActionsClient) Get(ctx context.Context, id ActionId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c WorkflowRunActionsClient) preparerForGet(ctx context.Context, id ActionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_list_autorest.go new file mode 100644 index 000000000000..3aabe40f9ae5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_list_autorest.go @@ -0,0 +1,220 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]WorkflowRunAction + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []WorkflowRunAction +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c WorkflowRunActionsClient) List(ctx context.Context, id RunId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c WorkflowRunActionsClient) preparerForList(ctx context.Context, id RunId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/actions", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c WorkflowRunActionsClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []WorkflowRunAction `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c WorkflowRunActionsClient) ListComplete(ctx context.Context, id RunId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, WorkflowRunActionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkflowRunActionsClient) ListCompleteMatchingPredicate(ctx context.Context, id RunId, options ListOperationOptions, predicate WorkflowRunActionOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]WorkflowRunAction, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces_autorest.go new file mode 100644 index 000000000000..b0eb05063890 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces_autorest.go @@ -0,0 +1,69 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListExpressionTracesOperationResponse struct { + HttpResponse *http.Response + Model *ExpressionTraces +} + +// ListExpressionTraces ... +func (c WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, id ActionId) (result ListExpressionTracesOperationResponse, err error) { + req, err := c.preparerForListExpressionTraces(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "ListExpressionTraces", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "ListExpressionTraces", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListExpressionTraces(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "ListExpressionTraces", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListExpressionTraces prepares the ListExpressionTraces request. +func (c WorkflowRunActionsClient) preparerForListExpressionTraces(ctx context.Context, id ActionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listExpressionTraces", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListExpressionTraces handles the response to the ListExpressionTraces request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForListExpressionTraces(resp *http.Response) (result ListExpressionTracesOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget_autorest.go new file mode 100644 index 000000000000..1fc34e96d81b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget_autorest.go @@ -0,0 +1,68 @@ +package workflowrunactions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionsGetOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowRunActionRepetitionDefinition +} + +// WorkflowRunActionRepetitionsGet ... +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsGet(ctx context.Context, id RepetitionId) (result WorkflowRunActionRepetitionsGetOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRepetitionsGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsGet", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsGet", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRepetitionsGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsGet", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForWorkflowRunActionRepetitionsGet prepares the WorkflowRunActionRepetitionsGet request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRepetitionsGet(ctx context.Context, id RepetitionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRepetitionsGet handles the response to the WorkflowRunActionRepetitionsGet request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRepetitionsGet(resp *http.Response) (result WorkflowRunActionRepetitionsGetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslist_autorest.go new file mode 100644 index 000000000000..2cb8f431c8ec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslist_autorest.go @@ -0,0 +1,69 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionsListOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowRunActionRepetitionDefinitionCollection +} + +// WorkflowRunActionRepetitionsList ... +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsList(ctx context.Context, id ActionId) (result WorkflowRunActionRepetitionsListOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRepetitionsList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsList", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsList", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRepetitionsList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsList", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForWorkflowRunActionRepetitionsList prepares the WorkflowRunActionRepetitionsList request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRepetitionsList(ctx context.Context, id ActionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/repetitions", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRepetitionsList handles the response to the WorkflowRunActionRepetitionsList request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRepetitionsList(resp *http.Response) (result WorkflowRunActionRepetitionsListOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces_autorest.go new file mode 100644 index 000000000000..13fac59a5eed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces_autorest.go @@ -0,0 +1,69 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionsListExpressionTracesOperationResponse struct { + HttpResponse *http.Response + Model *ExpressionTraces +} + +// WorkflowRunActionRepetitionsListExpressionTraces ... +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTraces(ctx context.Context, id RepetitionId) (result WorkflowRunActionRepetitionsListExpressionTracesOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRepetitionsListExpressionTraces(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsListExpressionTraces", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsListExpressionTraces", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRepetitionsListExpressionTraces(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsListExpressionTraces", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForWorkflowRunActionRepetitionsListExpressionTraces prepares the WorkflowRunActionRepetitionsListExpressionTraces request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRepetitionsListExpressionTraces(ctx context.Context, id RepetitionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listExpressionTraces", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRepetitionsListExpressionTraces handles the response to the WorkflowRunActionRepetitionsListExpressionTraces request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRepetitionsListExpressionTraces(resp *http.Response) (result WorkflowRunActionRepetitionsListExpressionTracesOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget_autorest.go new file mode 100644 index 000000000000..4417161780e1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget_autorest.go @@ -0,0 +1,68 @@ +package workflowrunactions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionsRequestHistoriesGetOperationResponse struct { + HttpResponse *http.Response + Model *RequestHistory +} + +// WorkflowRunActionRepetitionsRequestHistoriesGet ... +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesGet(ctx context.Context, id RepetitionRequestHistoryId) (result WorkflowRunActionRepetitionsRequestHistoriesGetOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRepetitionsRequestHistoriesGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesGet", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesGet", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRepetitionsRequestHistoriesGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesGet", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForWorkflowRunActionRepetitionsRequestHistoriesGet prepares the WorkflowRunActionRepetitionsRequestHistoriesGet request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRepetitionsRequestHistoriesGet(ctx context.Context, id RepetitionRequestHistoryId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRepetitionsRequestHistoriesGet handles the response to the WorkflowRunActionRepetitionsRequestHistoriesGet request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRepetitionsRequestHistoriesGet(resp *http.Response) (result WorkflowRunActionRepetitionsRequestHistoriesGetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistorieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistorieslist_autorest.go new file mode 100644 index 000000000000..e33fe5ae49cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistorieslist_autorest.go @@ -0,0 +1,186 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse struct { + HttpResponse *http.Response + Model *[]RequestHistory + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse, error) +} + +type WorkflowRunActionRepetitionsRequestHistoriesListCompleteResult struct { + Items []RequestHistory +} + +func (r WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse) LoadMore(ctx context.Context) (resp WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// WorkflowRunActionRepetitionsRequestHistoriesList ... +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesList(ctx context.Context, id RepetitionId) (resp WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRepetitionsRequestHistoriesList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesList", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesList", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForWorkflowRunActionRepetitionsRequestHistoriesList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesList", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForWorkflowRunActionRepetitionsRequestHistoriesList prepares the WorkflowRunActionRepetitionsRequestHistoriesList request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRepetitionsRequestHistoriesList(ctx context.Context, id RepetitionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/requestHistories", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForWorkflowRunActionRepetitionsRequestHistoriesListWithNextLink prepares the WorkflowRunActionRepetitionsRequestHistoriesList request with the given nextLink token. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRepetitionsRequestHistoriesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRepetitionsRequestHistoriesList handles the response to the WorkflowRunActionRepetitionsRequestHistoriesList request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRepetitionsRequestHistoriesList(resp *http.Response) (result WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse, err error) { + type page struct { + Values []RequestHistory `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result WorkflowRunActionRepetitionsRequestHistoriesListOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRepetitionsRequestHistoriesListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesList", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesList", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRepetitionsRequestHistoriesList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRepetitionsRequestHistoriesList", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// WorkflowRunActionRepetitionsRequestHistoriesListComplete retrieves all of the results into a single object +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesListComplete(ctx context.Context, id RepetitionId) (WorkflowRunActionRepetitionsRequestHistoriesListCompleteResult, error) { + return c.WorkflowRunActionRepetitionsRequestHistoriesListCompleteMatchingPredicate(ctx, id, RequestHistoryOperationPredicate{}) +} + +// WorkflowRunActionRepetitionsRequestHistoriesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesListCompleteMatchingPredicate(ctx context.Context, id RepetitionId, predicate RequestHistoryOperationPredicate) (resp WorkflowRunActionRepetitionsRequestHistoriesListCompleteResult, err error) { + items := make([]RequestHistory, 0) + + page, err := c.WorkflowRunActionRepetitionsRequestHistoriesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := WorkflowRunActionRepetitionsRequestHistoriesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget_autorest.go new file mode 100644 index 000000000000..7760caca78be --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget_autorest.go @@ -0,0 +1,68 @@ +package workflowrunactions + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRequestHistoriesGetOperationResponse struct { + HttpResponse *http.Response + Model *RequestHistory +} + +// WorkflowRunActionRequestHistoriesGet ... +func (c WorkflowRunActionsClient) WorkflowRunActionRequestHistoriesGet(ctx context.Context, id RequestHistoryId) (result WorkflowRunActionRequestHistoriesGetOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRequestHistoriesGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesGet", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesGet", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRequestHistoriesGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesGet", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForWorkflowRunActionRequestHistoriesGet prepares the WorkflowRunActionRequestHistoriesGet request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRequestHistoriesGet(ctx context.Context, id RequestHistoryId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRequestHistoriesGet handles the response to the WorkflowRunActionRequestHistoriesGet request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRequestHistoriesGet(resp *http.Response) (result WorkflowRunActionRequestHistoriesGetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistorieslist_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistorieslist_autorest.go new file mode 100644 index 000000000000..63c4c23fa010 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistorieslist_autorest.go @@ -0,0 +1,186 @@ +package workflowrunactions + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRequestHistoriesListOperationResponse struct { + HttpResponse *http.Response + Model *[]RequestHistory + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (WorkflowRunActionRequestHistoriesListOperationResponse, error) +} + +type WorkflowRunActionRequestHistoriesListCompleteResult struct { + Items []RequestHistory +} + +func (r WorkflowRunActionRequestHistoriesListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r WorkflowRunActionRequestHistoriesListOperationResponse) LoadMore(ctx context.Context) (resp WorkflowRunActionRequestHistoriesListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +// WorkflowRunActionRequestHistoriesList ... +func (c WorkflowRunActionsClient) WorkflowRunActionRequestHistoriesList(ctx context.Context, id ActionId) (resp WorkflowRunActionRequestHistoriesListOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRequestHistoriesList(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesList", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesList", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForWorkflowRunActionRequestHistoriesList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesList", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForWorkflowRunActionRequestHistoriesList prepares the WorkflowRunActionRequestHistoriesList request. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRequestHistoriesList(ctx context.Context, id ActionId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/requestHistories", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForWorkflowRunActionRequestHistoriesListWithNextLink prepares the WorkflowRunActionRequestHistoriesList request with the given nextLink token. +func (c WorkflowRunActionsClient) preparerForWorkflowRunActionRequestHistoriesListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowRunActionRequestHistoriesList handles the response to the WorkflowRunActionRequestHistoriesList request. The method always +// closes the http.Response Body. +func (c WorkflowRunActionsClient) responderForWorkflowRunActionRequestHistoriesList(resp *http.Response) (result WorkflowRunActionRequestHistoriesListOperationResponse, err error) { + type page struct { + Values []RequestHistory `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result WorkflowRunActionRequestHistoriesListOperationResponse, err error) { + req, err := c.preparerForWorkflowRunActionRequestHistoriesListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesList", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesList", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowRunActionRequestHistoriesList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowrunactions.WorkflowRunActionsClient", "WorkflowRunActionRequestHistoriesList", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// WorkflowRunActionRequestHistoriesListComplete retrieves all of the results into a single object +func (c WorkflowRunActionsClient) WorkflowRunActionRequestHistoriesListComplete(ctx context.Context, id ActionId) (WorkflowRunActionRequestHistoriesListCompleteResult, error) { + return c.WorkflowRunActionRequestHistoriesListCompleteMatchingPredicate(ctx, id, RequestHistoryOperationPredicate{}) +} + +// WorkflowRunActionRequestHistoriesListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkflowRunActionsClient) WorkflowRunActionRequestHistoriesListCompleteMatchingPredicate(ctx context.Context, id ActionId, predicate RequestHistoryOperationPredicate) (resp WorkflowRunActionRequestHistoriesListCompleteResult, err error) { + items := make([]RequestHistory, 0) + + page, err := c.WorkflowRunActionRequestHistoriesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := WorkflowRunActionRequestHistoriesListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_azureresourceerrorinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_azureresourceerrorinfo.go new file mode 100644 index 000000000000..59c3c304adb5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_azureresourceerrorinfo.go @@ -0,0 +1,10 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureResourceErrorInfo struct { + Code string `json:"code"` + Details *[]AzureResourceErrorInfo `json:"details,omitempty"` + Message string `json:"message"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_contenthash.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_contenthash.go new file mode 100644 index 000000000000..3c0011433bc6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_contenthash.go @@ -0,0 +1,9 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentHash struct { + Algorithm *string `json:"algorithm,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_contentlink.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_contentlink.go new file mode 100644 index 000000000000..bd3dc0e8dbcd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_contentlink.go @@ -0,0 +1,12 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContentLink struct { + ContentHash *ContentHash `json:"contentHash,omitempty"` + ContentSize *int64 `json:"contentSize,omitempty"` + ContentVersion *string `json:"contentVersion,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_errorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_errorproperties.go new file mode 100644 index 000000000000..0c17755bd62b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_errorproperties.go @@ -0,0 +1,9 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorProperties struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_errorresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_errorresponse.go new file mode 100644 index 000000000000..9856e5afdda7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_errorresponse.go @@ -0,0 +1,8 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorResponse struct { + Error *ErrorProperties `json:"error,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expression.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expression.go new file mode 100644 index 000000000000..a7689b2d49e4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expression.go @@ -0,0 +1,11 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Expression struct { + Error *AzureResourceErrorInfo `json:"error,omitempty"` + Subexpressions *[]Expression `json:"subexpressions,omitempty"` + Text *string `json:"text,omitempty"` + Value *interface{} `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expressionroot.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expressionroot.go new file mode 100644 index 000000000000..29e8bb99a418 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expressionroot.go @@ -0,0 +1,12 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressionRoot struct { + Error *AzureResourceErrorInfo `json:"error,omitempty"` + Path *string `json:"path,omitempty"` + Subexpressions *[]Expression `json:"subexpressions,omitempty"` + Text *string `json:"text,omitempty"` + Value *interface{} `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expressiontraces.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expressiontraces.go new file mode 100644 index 000000000000..f6d2b9b080e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_expressiontraces.go @@ -0,0 +1,8 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressionTraces struct { + Inputs *[]ExpressionRoot `json:"inputs,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_repetitionindex.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_repetitionindex.go new file mode 100644 index 000000000000..ba809fd07414 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_repetitionindex.go @@ -0,0 +1,9 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RepetitionIndex struct { + ItemIndex int64 `json:"itemIndex"` + ScopeName *string `json:"scopeName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_request.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_request.go new file mode 100644 index 000000000000..1ced5675ea2c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_request.go @@ -0,0 +1,10 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Request struct { + Headers *interface{} `json:"headers,omitempty"` + Method *string `json:"method,omitempty"` + Uri *string `json:"uri,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_requesthistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_requesthistory.go new file mode 100644 index 000000000000..61e48b714f3a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_requesthistory.go @@ -0,0 +1,13 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RequestHistory struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RequestHistoryProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_requesthistoryproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_requesthistoryproperties.go new file mode 100644 index 000000000000..86fd91ff9e06 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_requesthistoryproperties.go @@ -0,0 +1,41 @@ +package workflowrunactions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RequestHistoryProperties struct { + EndTime *string `json:"endTime,omitempty"` + Request *Request `json:"request,omitempty"` + Response *Response `json:"response,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +func (o *RequestHistoryProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *RequestHistoryProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *RequestHistoryProperties) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *RequestHistoryProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_response.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_response.go new file mode 100644 index 000000000000..2697b1a5aabc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_response.go @@ -0,0 +1,10 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Response struct { + BodyLink *ContentLink `json:"bodyLink,omitempty"` + Headers *interface{} `json:"headers,omitempty"` + StatusCode *int64 `json:"statusCode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_retryhistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_retryhistory.go new file mode 100644 index 000000000000..372ab23d01f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_retryhistory.go @@ -0,0 +1,43 @@ +package workflowrunactions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RetryHistory struct { + ClientRequestId *string `json:"clientRequestId,omitempty"` + Code *string `json:"code,omitempty"` + EndTime *string `json:"endTime,omitempty"` + Error *ErrorResponse `json:"error,omitempty"` + ServiceRequestId *string `json:"serviceRequestId,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +func (o *RetryHistory) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *RetryHistory) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *RetryHistory) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *RetryHistory) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_runactioncorrelation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_runactioncorrelation.go new file mode 100644 index 000000000000..dc7976ccc37c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_runactioncorrelation.go @@ -0,0 +1,10 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RunActionCorrelation struct { + ActionTrackingId *string `json:"actionTrackingId,omitempty"` + ClientKeywords *[]string `json:"clientKeywords,omitempty"` + ClientTrackingId *string `json:"clientTrackingId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunaction.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunaction.go new file mode 100644 index 000000000000..443cf266c769 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunaction.go @@ -0,0 +1,11 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunAction struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *WorkflowRunActionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionproperties.go new file mode 100644 index 000000000000..515fd157766e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionproperties.go @@ -0,0 +1,48 @@ +package workflowrunactions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionProperties struct { + Code *string `json:"code,omitempty"` + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + EndTime *string `json:"endTime,omitempty"` + Error *interface{} `json:"error,omitempty"` + InputsLink *ContentLink `json:"inputsLink,omitempty"` + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *WorkflowStatus `json:"status,omitempty"` + TrackedProperties *interface{} `json:"trackedProperties,omitempty"` + TrackingId *string `json:"trackingId,omitempty"` +} + +func (o *WorkflowRunActionProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowRunActionProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *WorkflowRunActionProperties) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowRunActionProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitiondefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitiondefinition.go new file mode 100644 index 000000000000..6705564dcf35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitiondefinition.go @@ -0,0 +1,13 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionDefinition struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties WorkflowRunActionRepetitionProperties `json:"properties"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitiondefinitioncollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitiondefinitioncollection.go new file mode 100644 index 000000000000..b2608d188dd9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitiondefinitioncollection.go @@ -0,0 +1,9 @@ +package workflowrunactions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionDefinitionCollection struct { + NextLink *string `json:"nextLink,omitempty"` + Value *[]WorkflowRunActionRepetitionDefinition `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitionproperties.go new file mode 100644 index 000000000000..759c33c60094 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/model_workflowrunactionrepetitionproperties.go @@ -0,0 +1,52 @@ +package workflowrunactions + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowRunActionRepetitionProperties struct { + Code *string `json:"code,omitempty"` + Correlation *RunActionCorrelation `json:"correlation,omitempty"` + EndTime *string `json:"endTime,omitempty"` + Error *interface{} `json:"error,omitempty"` + Inputs *interface{} `json:"inputs,omitempty"` + InputsLink *ContentLink `json:"inputsLink,omitempty"` + IterationCount *int64 `json:"iterationCount,omitempty"` + Outputs *interface{} `json:"outputs,omitempty"` + OutputsLink *ContentLink `json:"outputsLink,omitempty"` + RepetitionIndexes *[]RepetitionIndex `json:"repetitionIndexes,omitempty"` + RetryHistory *[]RetryHistory `json:"retryHistory,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *WorkflowStatus `json:"status,omitempty"` + TrackedProperties *interface{} `json:"trackedProperties,omitempty"` + TrackingId *string `json:"trackingId,omitempty"` +} + +func (o *WorkflowRunActionRepetitionProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowRunActionRepetitionProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *WorkflowRunActionRepetitionProperties) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowRunActionRepetitionProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/predicates.go new file mode 100644 index 000000000000..93ca875c4e0c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/predicates.go @@ -0,0 +1,52 @@ +package workflowrunactions + +type RequestHistoryOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p RequestHistoryOperationPredicate) Matches(input RequestHistory) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} + +type WorkflowRunActionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p WorkflowRunActionOperationPredicate) Matches(input WorkflowRunAction) bool { + + 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/logic/2019-05-01/workflowrunactions/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/version.go new file mode 100644 index 000000000000..83177937c88f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions/version.go @@ -0,0 +1,12 @@ +package workflowrunactions + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/workflowrunactions/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/README.md new file mode 100644 index 000000000000..4626b0cc0681 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/README.md @@ -0,0 +1,293 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows` Documentation + +The `workflows` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/workflows" +``` + + +### Client Initialization + +```go +client := workflows.NewWorkflowsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WorkflowsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +payload := workflows.Workflow{ + // ... +} + + +read, err := client.CreateOrUpdate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.Delete` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +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: `WorkflowsClient.Disable` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +read, err := client.Disable(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.Enable` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +read, err := client.Enable(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.GenerateUpgradedDefinition` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +payload := workflows.GenerateUpgradedDefinitionParameters{ + // ... +} + + +read, err := client.GenerateUpgradedDefinition(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.Get` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := workflows.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id, workflows.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id, workflows.DefaultListByResourceGroupOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WorkflowsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := workflows.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id, workflows.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id, workflows.DefaultListBySubscriptionOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WorkflowsClient.ListCallbackUrl` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +payload := workflows.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.ListCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.ListSwagger` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +read, err := client.ListSwagger(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.Move` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +payload := workflows.WorkflowReference{ + // ... +} + + +if err := client.MoveThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WorkflowsClient.RegenerateAccessKey` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +payload := workflows.RegenerateActionParameter{ + // ... +} + + +read, err := client.RegenerateAccessKey(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.Update` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +read, err := client.Update(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.ValidateByLocation` + +```go +ctx := context.TODO() +id := workflows.NewLocationWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "workflowValue") + +payload := workflows.Workflow{ + // ... +} + + +read, err := client.ValidateByLocation(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowsClient.ValidateByResourceGroup` + +```go +ctx := context.TODO() +id := workflows.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +payload := workflows.Workflow{ + // ... +} + + +read, err := client.ValidateByResourceGroup(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/client.go new file mode 100644 index 000000000000..664f452829cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/client.go @@ -0,0 +1,18 @@ +package workflows + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowsClient struct { + Client autorest.Client + baseUri string +} + +func NewWorkflowsClientWithBaseURI(endpoint string) WorkflowsClient { + return WorkflowsClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/constants.go new file mode 100644 index 000000000000..22274e5ee30c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/constants.go @@ -0,0 +1,279 @@ +package workflows + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type OpenAuthenticationProviderType string + +const ( + OpenAuthenticationProviderTypeAAD OpenAuthenticationProviderType = "AAD" +) + +func PossibleValuesForOpenAuthenticationProviderType() []string { + return []string{ + string(OpenAuthenticationProviderTypeAAD), + } +} + +func parseOpenAuthenticationProviderType(input string) (*OpenAuthenticationProviderType, error) { + vals := map[string]OpenAuthenticationProviderType{ + "aad": OpenAuthenticationProviderTypeAAD, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OpenAuthenticationProviderType(input) + return &out, nil +} + +type ParameterType string + +const ( + ParameterTypeArray ParameterType = "Array" + ParameterTypeBool ParameterType = "Bool" + ParameterTypeFloat ParameterType = "Float" + ParameterTypeInt ParameterType = "Int" + ParameterTypeNotSpecified ParameterType = "NotSpecified" + ParameterTypeObject ParameterType = "Object" + ParameterTypeSecureObject ParameterType = "SecureObject" + ParameterTypeSecureString ParameterType = "SecureString" + ParameterTypeString ParameterType = "String" +) + +func PossibleValuesForParameterType() []string { + return []string{ + string(ParameterTypeArray), + string(ParameterTypeBool), + string(ParameterTypeFloat), + string(ParameterTypeInt), + string(ParameterTypeNotSpecified), + string(ParameterTypeObject), + string(ParameterTypeSecureObject), + string(ParameterTypeSecureString), + string(ParameterTypeString), + } +} + +func parseParameterType(input string) (*ParameterType, error) { + vals := map[string]ParameterType{ + "array": ParameterTypeArray, + "bool": ParameterTypeBool, + "float": ParameterTypeFloat, + "int": ParameterTypeInt, + "notspecified": ParameterTypeNotSpecified, + "object": ParameterTypeObject, + "secureobject": ParameterTypeSecureObject, + "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 SkuName string + +const ( + SkuNameBasic SkuName = "Basic" + SkuNameFree SkuName = "Free" + SkuNameNotSpecified SkuName = "NotSpecified" + SkuNamePremium SkuName = "Premium" + SkuNameShared SkuName = "Shared" + SkuNameStandard SkuName = "Standard" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameBasic), + string(SkuNameFree), + string(SkuNameNotSpecified), + string(SkuNamePremium), + string(SkuNameShared), + string(SkuNameStandard), + } +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "basic": SkuNameBasic, + "free": SkuNameFree, + "notspecified": SkuNameNotSpecified, + "premium": SkuNamePremium, + "shared": SkuNameShared, + "standard": SkuNameStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type WorkflowProvisioningState string + +const ( + WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" + WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" + WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" + WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" + WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" + WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" + WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" + WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" + WorkflowProvisioningStateInProgress WorkflowProvisioningState = "InProgress" + WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" + WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" + WorkflowProvisioningStatePending WorkflowProvisioningState = "Pending" + WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" + WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" + WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" + WorkflowProvisioningStateRenewing WorkflowProvisioningState = "Renewing" + WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" + WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" + WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" + WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" + WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" + WorkflowProvisioningStateWaiting WorkflowProvisioningState = "Waiting" +) + +func PossibleValuesForWorkflowProvisioningState() []string { + return []string{ + string(WorkflowProvisioningStateAccepted), + string(WorkflowProvisioningStateCanceled), + string(WorkflowProvisioningStateCompleted), + string(WorkflowProvisioningStateCreated), + string(WorkflowProvisioningStateCreating), + string(WorkflowProvisioningStateDeleted), + string(WorkflowProvisioningStateDeleting), + string(WorkflowProvisioningStateFailed), + string(WorkflowProvisioningStateInProgress), + string(WorkflowProvisioningStateMoving), + string(WorkflowProvisioningStateNotSpecified), + string(WorkflowProvisioningStatePending), + string(WorkflowProvisioningStateReady), + string(WorkflowProvisioningStateRegistered), + string(WorkflowProvisioningStateRegistering), + string(WorkflowProvisioningStateRenewing), + string(WorkflowProvisioningStateRunning), + string(WorkflowProvisioningStateSucceeded), + string(WorkflowProvisioningStateUnregistered), + string(WorkflowProvisioningStateUnregistering), + string(WorkflowProvisioningStateUpdating), + string(WorkflowProvisioningStateWaiting), + } +} + +func parseWorkflowProvisioningState(input string) (*WorkflowProvisioningState, error) { + vals := map[string]WorkflowProvisioningState{ + "accepted": WorkflowProvisioningStateAccepted, + "canceled": WorkflowProvisioningStateCanceled, + "completed": WorkflowProvisioningStateCompleted, + "created": WorkflowProvisioningStateCreated, + "creating": WorkflowProvisioningStateCreating, + "deleted": WorkflowProvisioningStateDeleted, + "deleting": WorkflowProvisioningStateDeleting, + "failed": WorkflowProvisioningStateFailed, + "inprogress": WorkflowProvisioningStateInProgress, + "moving": WorkflowProvisioningStateMoving, + "notspecified": WorkflowProvisioningStateNotSpecified, + "pending": WorkflowProvisioningStatePending, + "ready": WorkflowProvisioningStateReady, + "registered": WorkflowProvisioningStateRegistered, + "registering": WorkflowProvisioningStateRegistering, + "renewing": WorkflowProvisioningStateRenewing, + "running": WorkflowProvisioningStateRunning, + "succeeded": WorkflowProvisioningStateSucceeded, + "unregistered": WorkflowProvisioningStateUnregistered, + "unregistering": WorkflowProvisioningStateUnregistering, + "updating": WorkflowProvisioningStateUpdating, + "waiting": WorkflowProvisioningStateWaiting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowProvisioningState(input) + return &out, nil +} + +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + WorkflowStateSuspended WorkflowState = "Suspended" +) + +func PossibleValuesForWorkflowState() []string { + return []string{ + string(WorkflowStateCompleted), + string(WorkflowStateDeleted), + string(WorkflowStateDisabled), + string(WorkflowStateEnabled), + string(WorkflowStateNotSpecified), + string(WorkflowStateSuspended), + } +} + +func parseWorkflowState(input string) (*WorkflowState, error) { + vals := map[string]WorkflowState{ + "completed": WorkflowStateCompleted, + "deleted": WorkflowStateDeleted, + "disabled": WorkflowStateDisabled, + "enabled": WorkflowStateEnabled, + "notspecified": WorkflowStateNotSpecified, + "suspended": WorkflowStateSuspended, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go new file mode 100644 index 000000000000..e863bb2542a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go @@ -0,0 +1,137 @@ +package workflows + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = LocationWorkflowId{} + +// LocationWorkflowId is a struct representing the Resource ID for a Location Workflow +type LocationWorkflowId struct { + SubscriptionId string + ResourceGroupName string + LocationName string + WorkflowName string +} + +// NewLocationWorkflowID returns a new LocationWorkflowId struct +func NewLocationWorkflowID(subscriptionId string, resourceGroupName string, locationName string, workflowName string) LocationWorkflowId { + return LocationWorkflowId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + LocationName: locationName, + WorkflowName: workflowName, + } +} + +// ParseLocationWorkflowID parses 'input' into a LocationWorkflowId +func ParseLocationWorkflowID(input string) (*LocationWorkflowId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationWorkflowId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := LocationWorkflowId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { + return nil, fmt.Errorf("the segment 'locationName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseLocationWorkflowIDInsensitively parses 'input' case-insensitively into a LocationWorkflowId +// note: this method should only be used for API response data and not user input +func ParseLocationWorkflowIDInsensitively(input string) (*LocationWorkflowId, error) { + parser := resourceids.NewParserFromResourceIdType(LocationWorkflowId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := LocationWorkflowId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { + return nil, fmt.Errorf("the segment 'locationName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateLocationWorkflowID checks that 'input' can be parsed as a Location Workflow ID +func ValidateLocationWorkflowID(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 := ParseLocationWorkflowID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location Workflow ID +func (id LocationWorkflowId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/locations/%s/workflows/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName, id.WorkflowName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location Workflow ID +func (id LocationWorkflowId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + } +} + +// String returns a human-readable description of this Location Workflow ID +func (id LocationWorkflowId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + } + return fmt.Sprintf("Location Workflow (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go new file mode 100644 index 000000000000..6d9a92c194e7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/id_workflow.go @@ -0,0 +1,124 @@ +package workflows + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = WorkflowId{} + +// WorkflowId is a struct representing the Resource ID for a Workflow +type WorkflowId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string +} + +// NewWorkflowID returns a new WorkflowId struct +func NewWorkflowID(subscriptionId string, resourceGroupName string, workflowName string) WorkflowId { + return WorkflowId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + } +} + +// ParseWorkflowID parses 'input' into a WorkflowId +func ParseWorkflowID(input string) (*WorkflowId, error) { + parser := resourceids.NewParserFromResourceIdType(WorkflowId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := WorkflowId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseWorkflowIDInsensitively parses 'input' case-insensitively into a WorkflowId +// note: this method should only be used for API response data and not user input +func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { + parser := resourceids.NewParserFromResourceIdType(WorkflowId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := WorkflowId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateWorkflowID checks that 'input' can be parsed as a Workflow ID +func ValidateWorkflowID(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 := ParseWorkflowID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Workflow ID +func (id WorkflowId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Workflow ID +func (id WorkflowId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + } +} + +// String returns a human-readable description of this Workflow ID +func (id WorkflowId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + } + return fmt.Sprintf("Workflow (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_createorupdate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_createorupdate_autorest.go new file mode 100644 index 000000000000..92336ba2b96f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_createorupdate_autorest.go @@ -0,0 +1,69 @@ +package workflows + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + HttpResponse *http.Response + Model *Workflow +} + +// CreateOrUpdate ... +func (c WorkflowsClient) CreateOrUpdate(ctx context.Context, id WorkflowId, input Workflow) (result CreateOrUpdateOperationResponse, err error) { + req, err := c.preparerForCreateOrUpdate(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "CreateOrUpdate", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForCreateOrUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "CreateOrUpdate", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForCreateOrUpdate prepares the CreateOrUpdate request. +func (c WorkflowsClient) preparerForCreateOrUpdate(ctx context.Context, id WorkflowId, input Workflow) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForCreateOrUpdate handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForCreateOrUpdate(resp *http.Response) (result CreateOrUpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_delete_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_delete_autorest.go new file mode 100644 index 000000000000..68459e432ca9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_delete_autorest.go @@ -0,0 +1,66 @@ +package workflows + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response +} + +// Delete ... +func (c WorkflowsClient) Delete(ctx context.Context, id WorkflowId) (result DeleteOperationResponse, err error) { + req, err := c.preparerForDelete(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Delete", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Delete", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDelete(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Delete", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDelete prepares the Delete request. +func (c WorkflowsClient) preparerForDelete(ctx context.Context, id WorkflowId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsDelete(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDelete handles the response to the Delete request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForDelete(resp *http.Response) (result DeleteOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_disable_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_disable_autorest.go new file mode 100644 index 000000000000..f90b58f92f38 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_disable_autorest.go @@ -0,0 +1,67 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DisableOperationResponse struct { + HttpResponse *http.Response +} + +// Disable ... +func (c WorkflowsClient) Disable(ctx context.Context, id WorkflowId) (result DisableOperationResponse, err error) { + req, err := c.preparerForDisable(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Disable", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Disable", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForDisable(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Disable", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForDisable prepares the Disable request. +func (c WorkflowsClient) preparerForDisable(ctx context.Context, id WorkflowId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/disable", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForDisable handles the response to the Disable request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForDisable(resp *http.Response) (result DisableOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_enable_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_enable_autorest.go new file mode 100644 index 000000000000..e0e3edcc660a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_enable_autorest.go @@ -0,0 +1,67 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnableOperationResponse struct { + HttpResponse *http.Response +} + +// Enable ... +func (c WorkflowsClient) Enable(ctx context.Context, id WorkflowId) (result EnableOperationResponse, err error) { + req, err := c.preparerForEnable(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Enable", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Enable", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForEnable(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Enable", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForEnable prepares the Enable request. +func (c WorkflowsClient) preparerForEnable(ctx context.Context, id WorkflowId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/enable", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForEnable handles the response to the Enable request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForEnable(resp *http.Response) (result EnableOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition_autorest.go new file mode 100644 index 000000000000..e1426562383e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition_autorest.go @@ -0,0 +1,70 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GenerateUpgradedDefinitionOperationResponse struct { + HttpResponse *http.Response + Model *interface{} +} + +// GenerateUpgradedDefinition ... +func (c WorkflowsClient) GenerateUpgradedDefinition(ctx context.Context, id WorkflowId, input GenerateUpgradedDefinitionParameters) (result GenerateUpgradedDefinitionOperationResponse, err error) { + req, err := c.preparerForGenerateUpgradedDefinition(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "GenerateUpgradedDefinition", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "GenerateUpgradedDefinition", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGenerateUpgradedDefinition(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "GenerateUpgradedDefinition", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGenerateUpgradedDefinition prepares the GenerateUpgradedDefinition request. +func (c WorkflowsClient) preparerForGenerateUpgradedDefinition(ctx context.Context, id WorkflowId, input GenerateUpgradedDefinitionParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/generateUpgradedDefinition", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGenerateUpgradedDefinition handles the response to the GenerateUpgradedDefinition request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForGenerateUpgradedDefinition(resp *http.Response) (result GenerateUpgradedDefinitionOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_get_autorest.go new file mode 100644 index 000000000000..ea4ca1978e60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_get_autorest.go @@ -0,0 +1,68 @@ +package workflows + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *Workflow +} + +// Get ... +func (c WorkflowsClient) Get(ctx context.Context, id WorkflowId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c WorkflowsClient) preparerForGet(ctx context.Context, id WorkflowId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup_autorest.go new file mode 100644 index 000000000000..8ef6f8f7dfde --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup_autorest.go @@ -0,0 +1,221 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + Model *[]Workflow + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListByResourceGroupOperationResponse, error) +} + +type ListByResourceGroupCompleteResult struct { + Items []Workflow +} + +func (r ListByResourceGroupOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListByResourceGroupOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions { + return ListByResourceGroupOperationOptions{} +} + +func (o ListByResourceGroupOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListByResourceGroupOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// ListByResourceGroup ... +func (c WorkflowsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (resp ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroup(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListByResourceGroup", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListByResourceGroup(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListByResourceGroup", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListByResourceGroup prepares the ListByResourceGroup request. +func (c WorkflowsClient) preparerForListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Logic/workflows", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListByResourceGroupWithNextLink prepares the ListByResourceGroup request with the given nextLink token. +func (c WorkflowsClient) preparerForListByResourceGroupWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListByResourceGroup handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForListByResourceGroup(resp *http.Response) (result ListByResourceGroupOperationResponse, err error) { + type page struct { + Values []Workflow `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListByResourceGroupOperationResponse, err error) { + req, err := c.preparerForListByResourceGroupWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListByResourceGroupComplete retrieves all of the results into a single object +func (c WorkflowsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, options, WorkflowOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkflowsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate WorkflowOperationPredicate) (resp ListByResourceGroupCompleteResult, err error) { + items := make([]Workflow, 0) + + page, err := c.ListByResourceGroup(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListByResourceGroupCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listbysubscription_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listbysubscription_autorest.go new file mode 100644 index 000000000000..950780ea2d37 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listbysubscription_autorest.go @@ -0,0 +1,221 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + Model *[]Workflow + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListBySubscriptionOperationResponse, error) +} + +type ListBySubscriptionCompleteResult struct { + Items []Workflow +} + +func (r ListBySubscriptionOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListBySubscriptionOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions { + return ListBySubscriptionOperationOptions{} +} + +func (o ListBySubscriptionOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListBySubscriptionOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// ListBySubscription ... +func (c WorkflowsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (resp ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscription(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListBySubscription", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForListBySubscription(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListBySubscription", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForListBySubscription prepares the ListBySubscription request. +func (c WorkflowsClient) preparerForListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/providers/Microsoft.Logic/workflows", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListBySubscriptionWithNextLink prepares the ListBySubscription request with the given nextLink token. +func (c WorkflowsClient) preparerForListBySubscriptionWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListBySubscription handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForListBySubscription(resp *http.Response) (result ListBySubscriptionOperationResponse, err error) { + type page struct { + Values []Workflow `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListBySubscriptionOperationResponse, err error) { + req, err := c.preparerForListBySubscriptionWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListBySubscription", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListBySubscription(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListBySubscription", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListBySubscriptionComplete retrieves all of the results into a single object +func (c WorkflowsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, WorkflowOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkflowsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate WorkflowOperationPredicate) (resp ListBySubscriptionCompleteResult, err error) { + items := make([]Workflow, 0) + + page, err := c.ListBySubscription(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListBySubscriptionCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl_autorest.go new file mode 100644 index 000000000000..9f8d0afe5b81 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListCallbackUrl ... +func (c WorkflowsClient) ListCallbackUrl(ctx context.Context, id WorkflowId, input GetCallbackUrlParameters) (result ListCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListCallbackUrl prepares the ListCallbackUrl request. +func (c WorkflowsClient) preparerForListCallbackUrl(ctx context.Context, id WorkflowId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListCallbackUrl handles the response to the ListCallbackUrl request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForListCallbackUrl(resp *http.Response) (result ListCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listswagger_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listswagger_autorest.go new file mode 100644 index 000000000000..fc88858b73a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_listswagger_autorest.go @@ -0,0 +1,69 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSwaggerOperationResponse struct { + HttpResponse *http.Response + Model *interface{} +} + +// ListSwagger ... +func (c WorkflowsClient) ListSwagger(ctx context.Context, id WorkflowId) (result ListSwaggerOperationResponse, err error) { + req, err := c.preparerForListSwagger(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListSwagger", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListSwagger", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListSwagger(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ListSwagger", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListSwagger prepares the ListSwagger request. +func (c WorkflowsClient) preparerForListSwagger(ctx context.Context, id WorkflowId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listSwagger", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListSwagger handles the response to the ListSwagger request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForListSwagger(resp *http.Response) (result ListSwaggerOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_move_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_move_autorest.go new file mode 100644 index 000000000000..341b8b4d5b35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_move_autorest.go @@ -0,0 +1,79 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/hashicorp/go-azure-helpers/polling" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MoveOperationResponse struct { + Poller polling.LongRunningPoller + HttpResponse *http.Response +} + +// Move ... +func (c WorkflowsClient) Move(ctx context.Context, id WorkflowId, input WorkflowReference) (result MoveOperationResponse, err error) { + req, err := c.preparerForMove(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Move", nil, "Failure preparing request") + return + } + + result, err = c.senderForMove(ctx, req) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Move", result.HttpResponse, "Failure sending request") + return + } + + return +} + +// MoveThenPoll performs Move then polls until it's completed +func (c WorkflowsClient) MoveThenPoll(ctx context.Context, id WorkflowId, input WorkflowReference) error { + result, err := c.Move(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Move: %+v", err) + } + + if err := result.Poller.PollUntilDone(); err != nil { + return fmt.Errorf("polling after Move: %+v", err) + } + + return nil +} + +// preparerForMove prepares the Move request. +func (c WorkflowsClient) preparerForMove(ctx context.Context, id WorkflowId, input WorkflowReference) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/move", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// senderForMove sends the Move request. The method will close the +// http.Response Body if it receives an error. +func (c WorkflowsClient) senderForMove(ctx context.Context, req *http.Request) (future MoveOperationResponse, err error) { + var resp *http.Response + resp, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + return + } + + future.Poller, err = polling.NewPollerFromResponse(ctx, resp, c.Client, req.Method) + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_regenerateaccesskey_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_regenerateaccesskey_autorest.go new file mode 100644 index 000000000000..3402ade6efd4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_regenerateaccesskey_autorest.go @@ -0,0 +1,68 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateAccessKeyOperationResponse struct { + HttpResponse *http.Response +} + +// RegenerateAccessKey ... +func (c WorkflowsClient) RegenerateAccessKey(ctx context.Context, id WorkflowId, input RegenerateActionParameter) (result RegenerateAccessKeyOperationResponse, err error) { + req, err := c.preparerForRegenerateAccessKey(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "RegenerateAccessKey", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "RegenerateAccessKey", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForRegenerateAccessKey(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "RegenerateAccessKey", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForRegenerateAccessKey prepares the RegenerateAccessKey request. +func (c WorkflowsClient) preparerForRegenerateAccessKey(ctx context.Context, id WorkflowId, input RegenerateActionParameter) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/regenerateAccessKey", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForRegenerateAccessKey handles the response to the RegenerateAccessKey request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForRegenerateAccessKey(resp *http.Response) (result RegenerateAccessKeyOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_update_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_update_autorest.go new file mode 100644 index 000000000000..b6cec9827309 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_update_autorest.go @@ -0,0 +1,68 @@ +package workflows + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + Model *Workflow +} + +// Update ... +func (c WorkflowsClient) Update(ctx context.Context, id WorkflowId) (result UpdateOperationResponse, err error) { + req, err := c.preparerForUpdate(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Update", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Update", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForUpdate(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "Update", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForUpdate prepares the Update request. +func (c WorkflowsClient) preparerForUpdate(ctx context.Context, id WorkflowId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForUpdate handles the response to the Update request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForUpdate(resp *http.Response) (result UpdateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_validatebylocation_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_validatebylocation_autorest.go new file mode 100644 index 000000000000..d7c51c01c433 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_validatebylocation_autorest.go @@ -0,0 +1,68 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateByLocationOperationResponse struct { + HttpResponse *http.Response +} + +// ValidateByLocation ... +func (c WorkflowsClient) ValidateByLocation(ctx context.Context, id LocationWorkflowId, input Workflow) (result ValidateByLocationOperationResponse, err error) { + req, err := c.preparerForValidateByLocation(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ValidateByLocation", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ValidateByLocation", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForValidateByLocation(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ValidateByLocation", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForValidateByLocation prepares the ValidateByLocation request. +func (c WorkflowsClient) preparerForValidateByLocation(ctx context.Context, id LocationWorkflowId, input Workflow) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/validate", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForValidateByLocation handles the response to the ValidateByLocation request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForValidateByLocation(resp *http.Response) (result ValidateByLocationOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_validatebyresourcegroup_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_validatebyresourcegroup_autorest.go new file mode 100644 index 000000000000..947e7ac96308 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/method_validatebyresourcegroup_autorest.go @@ -0,0 +1,68 @@ +package workflows + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateByResourceGroupOperationResponse struct { + HttpResponse *http.Response +} + +// ValidateByResourceGroup ... +func (c WorkflowsClient) ValidateByResourceGroup(ctx context.Context, id WorkflowId, input Workflow) (result ValidateByResourceGroupOperationResponse, err error) { + req, err := c.preparerForValidateByResourceGroup(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ValidateByResourceGroup", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ValidateByResourceGroup", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForValidateByResourceGroup(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflows.WorkflowsClient", "ValidateByResourceGroup", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForValidateByResourceGroup prepares the ValidateByResourceGroup request. +func (c WorkflowsClient) preparerForValidateByResourceGroup(ctx context.Context, id WorkflowId, input Workflow) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/validate", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForValidateByResourceGroup handles the response to the ValidateByResourceGroup request. The method always +// closes the http.Response Body. +func (c WorkflowsClient) responderForValidateByResourceGroup(resp *http.Response) (result ValidateByResourceGroupOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowaccesscontrolconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowaccesscontrolconfiguration.go new file mode 100644 index 000000000000..e110c491fc29 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowaccesscontrolconfiguration.go @@ -0,0 +1,11 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowAccessControlConfiguration struct { + Actions *FlowAccessControlConfigurationPolicy `json:"actions,omitempty"` + Contents *FlowAccessControlConfigurationPolicy `json:"contents,omitempty"` + Triggers *FlowAccessControlConfigurationPolicy `json:"triggers,omitempty"` + WorkflowManagement *FlowAccessControlConfigurationPolicy `json:"workflowManagement,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowaccesscontrolconfigurationpolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowaccesscontrolconfigurationpolicy.go new file mode 100644 index 000000000000..e14581b5ddcc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowaccesscontrolconfigurationpolicy.go @@ -0,0 +1,9 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowAccessControlConfigurationPolicy struct { + AllowedCallerIPAddresses *[]IPAddressRange `json:"allowedCallerIpAddresses,omitempty"` + OpenAuthenticationPolicies *OpenAuthenticationAccessPolicies `json:"openAuthenticationPolicies,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowendpoints.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowendpoints.go new file mode 100644 index 000000000000..ab677222e7a7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowendpoints.go @@ -0,0 +1,9 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowEndpoints struct { + AccessEndpointIPAddresses *[]IPAddress `json:"accessEndpointIpAddresses,omitempty"` + OutgoingIPAddresses *[]IPAddress `json:"outgoingIpAddresses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowendpointsconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowendpointsconfiguration.go new file mode 100644 index 000000000000..19393db48abe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_flowendpointsconfiguration.go @@ -0,0 +1,9 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowEndpointsConfiguration struct { + Connector *FlowEndpoints `json:"connector,omitempty"` + Workflow *FlowEndpoints `json:"workflow,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_generateupgradeddefinitionparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_generateupgradeddefinitionparameters.go new file mode 100644 index 000000000000..25c53e5e5ee0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_generateupgradeddefinitionparameters.go @@ -0,0 +1,8 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GenerateUpgradedDefinitionParameters struct { + TargetSchemaVersion *string `json:"targetSchemaVersion,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..13ebb143331c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package workflows + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_ipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_ipaddress.go new file mode 100644 index 000000000000..0d10e34c4f83 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_ipaddress.go @@ -0,0 +1,8 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPAddress struct { + Address *string `json:"address,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_ipaddressrange.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_ipaddressrange.go new file mode 100644 index 000000000000..347495131a89 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_ipaddressrange.go @@ -0,0 +1,8 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPAddressRange struct { + AddressRange *string `json:"addressRange,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationaccesspolicies.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationaccesspolicies.go new file mode 100644 index 000000000000..a4b8fac59707 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationaccesspolicies.go @@ -0,0 +1,8 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OpenAuthenticationAccessPolicies struct { + Policies *map[string]OpenAuthenticationAccessPolicy `json:"policies,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationaccesspolicy.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationaccesspolicy.go new file mode 100644 index 000000000000..cf1295967192 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationaccesspolicy.go @@ -0,0 +1,9 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OpenAuthenticationAccessPolicy struct { + Claims *[]OpenAuthenticationPolicyClaim `json:"claims,omitempty"` + Type *OpenAuthenticationProviderType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationpolicyclaim.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationpolicyclaim.go new file mode 100644 index 000000000000..3ab50a9ca9bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_openauthenticationpolicyclaim.go @@ -0,0 +1,9 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OpenAuthenticationPolicyClaim struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_regenerateactionparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_regenerateactionparameter.go new file mode 100644 index 000000000000..a01c112c1c1e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_regenerateactionparameter.go @@ -0,0 +1,8 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateActionParameter struct { + KeyType *KeyType `json:"keyType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_resourcereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_resourcereference.go new file mode 100644 index 000000000000..8541ecad8634 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_resourcereference.go @@ -0,0 +1,10 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_sku.go new file mode 100644 index 000000000000..a9e1220dbc77 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_sku.go @@ -0,0 +1,9 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name SkuName `json:"name"` + Plan *ResourceReference `json:"plan,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflow.go new file mode 100644 index 000000000000..6e88e130edda --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflow.go @@ -0,0 +1,18 @@ +package workflows + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Workflow struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemOrUserAssignedMap `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *WorkflowProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowparameter.go new file mode 100644 index 000000000000..c79cf198562e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowparameter.go @@ -0,0 +1,11 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowParameter struct { + Description *string `json:"description,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Type *ParameterType `json:"type,omitempty"` + Value *interface{} `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowproperties.go new file mode 100644 index 000000000000..9ef10ae99712 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowproperties.go @@ -0,0 +1,50 @@ +package workflows + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowProperties struct { + AccessControl *FlowAccessControlConfiguration `json:"accessControl,omitempty"` + AccessEndpoint *string `json:"accessEndpoint,omitempty"` + ChangedTime *string `json:"changedTime,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + Definition *interface{} `json:"definition,omitempty"` + EndpointsConfiguration *FlowEndpointsConfiguration `json:"endpointsConfiguration,omitempty"` + IntegrationAccount *ResourceReference `json:"integrationAccount,omitempty"` + IntegrationServiceEnvironment *ResourceReference `json:"integrationServiceEnvironment,omitempty"` + Parameters *map[string]WorkflowParameter `json:"parameters,omitempty"` + ProvisioningState *WorkflowProvisioningState `json:"provisioningState,omitempty"` + Sku *Sku `json:"sku,omitempty"` + State *WorkflowState `json:"state,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (o *WorkflowProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *WorkflowProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowreference.go new file mode 100644 index 000000000000..d0fab9bab989 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowreference.go @@ -0,0 +1,10 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowReference struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..4b5d876494ae --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..b79c9069d948 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package workflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/predicates.go new file mode 100644 index 000000000000..d6c10518766a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/predicates.go @@ -0,0 +1,29 @@ +package workflows + +type WorkflowOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p WorkflowOperationPredicate) Matches(input Workflow) bool { + + if p.Id != nil && (input.Id == nil && *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil && *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil && *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil && *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/version.go new file mode 100644 index 000000000000..8658baf6a6f1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows/version.go @@ -0,0 +1,12 @@ +package workflows + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/workflows/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/README.md new file mode 100644 index 000000000000..55f3a38ed7aa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/README.md @@ -0,0 +1,159 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers` Documentation + +The `workflowtriggers` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-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/logic/2019-05-01/workflowtriggers" +``` + + +### Client Initialization + +```go +client := workflowtriggers.NewWorkflowTriggersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WorkflowTriggersClient.Get` + +```go +ctx := context.TODO() +id := workflowtriggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "triggerValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowTriggersClient.GetSchemaJson` + +```go +ctx := context.TODO() +id := workflowtriggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "triggerValue") + +read, err := client.GetSchemaJson(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowTriggersClient.List` + +```go +ctx := context.TODO() +id := workflowtriggers.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue") + +// alternatively `client.List(ctx, id, workflowtriggers.DefaultListOperationOptions())` can be used to do batched pagination +items, err := client.ListComplete(ctx, id, workflowtriggers.DefaultListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WorkflowTriggersClient.ListCallbackUrl` + +```go +ctx := context.TODO() +id := workflowtriggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "triggerValue") + +read, err := client.ListCallbackUrl(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowTriggersClient.Reset` + +```go +ctx := context.TODO() +id := workflowtriggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "triggerValue") + +read, err := client.Reset(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowTriggersClient.Run` + +```go +ctx := context.TODO() +id := workflowtriggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "triggerValue") + +read, err := client.Run(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowTriggersClient.SetState` + +```go +ctx := context.TODO() +id := workflowtriggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "triggerValue") + +payload := workflowtriggers.SetTriggerStateActionDefinition{ + // ... +} + + +read, err := client.SetState(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WorkflowTriggersClient.WorkflowVersionTriggersListCallbackUrl` + +```go +ctx := context.TODO() +id := workflowtriggers.NewVersionTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "versionIdValue", "triggerValue") + +payload := workflowtriggers.GetCallbackUrlParameters{ + // ... +} + + +read, err := client.WorkflowVersionTriggersListCallbackUrl(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/client.go new file mode 100644 index 000000000000..09e2d07ce68e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/client.go @@ -0,0 +1,18 @@ +package workflowtriggers + +import "github.com/Azure/go-autorest/autorest" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggersClient struct { + Client autorest.Client + baseUri string +} + +func NewWorkflowTriggersClientWithBaseURI(endpoint string) WorkflowTriggersClient { + return WorkflowTriggersClient{ + Client: autorest.NewClientWithUserAgent(userAgent()), + baseUri: endpoint, + } +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/constants.go new file mode 100644 index 000000000000..739ac07566de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/constants.go @@ -0,0 +1,346 @@ +package workflowtriggers + +import "strings" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +func PossibleValuesForDayOfWeek() []string { + return []string{ + string(DayOfWeekFriday), + string(DayOfWeekMonday), + string(DayOfWeekSaturday), + string(DayOfWeekSunday), + string(DayOfWeekThursday), + string(DayOfWeekTuesday), + string(DayOfWeekWednesday), + } +} + +func parseDayOfWeek(input string) (*DayOfWeek, error) { + vals := map[string]DayOfWeek{ + "friday": DayOfWeekFriday, + "monday": DayOfWeekMonday, + "saturday": DayOfWeekSaturday, + "sunday": DayOfWeekSunday, + "thursday": DayOfWeekThursday, + "tuesday": DayOfWeekTuesday, + "wednesday": DayOfWeekWednesday, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DayOfWeek(input) + return &out, nil +} + +type DaysOfWeek string + +const ( + DaysOfWeekFriday DaysOfWeek = "Friday" + DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekThursday DaysOfWeek = "Thursday" + DaysOfWeekTuesday DaysOfWeek = "Tuesday" + DaysOfWeekWednesday DaysOfWeek = "Wednesday" +) + +func PossibleValuesForDaysOfWeek() []string { + return []string{ + string(DaysOfWeekFriday), + string(DaysOfWeekMonday), + string(DaysOfWeekSaturday), + string(DaysOfWeekSunday), + string(DaysOfWeekThursday), + string(DaysOfWeekTuesday), + string(DaysOfWeekWednesday), + } +} + +func parseDaysOfWeek(input string) (*DaysOfWeek, error) { + vals := map[string]DaysOfWeek{ + "friday": DaysOfWeekFriday, + "monday": DaysOfWeekMonday, + "saturday": DaysOfWeekSaturday, + "sunday": DaysOfWeekSunday, + "thursday": DaysOfWeekThursday, + "tuesday": DaysOfWeekTuesday, + "wednesday": DaysOfWeekWednesday, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DaysOfWeek(input) + return &out, nil +} + +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +func PossibleValuesForKeyType() []string { + return []string{ + string(KeyTypeNotSpecified), + string(KeyTypePrimary), + string(KeyTypeSecondary), + } +} + +func parseKeyType(input string) (*KeyType, error) { + vals := map[string]KeyType{ + "notspecified": KeyTypeNotSpecified, + "primary": KeyTypePrimary, + "secondary": KeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyType(input) + return &out, nil +} + +type RecurrenceFrequency string + +const ( + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" + RecurrenceFrequencySecond RecurrenceFrequency = "Second" + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +func PossibleValuesForRecurrenceFrequency() []string { + return []string{ + string(RecurrenceFrequencyDay), + string(RecurrenceFrequencyHour), + string(RecurrenceFrequencyMinute), + string(RecurrenceFrequencyMonth), + string(RecurrenceFrequencyNotSpecified), + string(RecurrenceFrequencySecond), + string(RecurrenceFrequencyWeek), + string(RecurrenceFrequencyYear), + } +} + +func parseRecurrenceFrequency(input string) (*RecurrenceFrequency, error) { + vals := map[string]RecurrenceFrequency{ + "day": RecurrenceFrequencyDay, + "hour": RecurrenceFrequencyHour, + "minute": RecurrenceFrequencyMinute, + "month": RecurrenceFrequencyMonth, + "notspecified": RecurrenceFrequencyNotSpecified, + "second": RecurrenceFrequencySecond, + "week": RecurrenceFrequencyWeek, + "year": RecurrenceFrequencyYear, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RecurrenceFrequency(input) + return &out, nil +} + +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + WorkflowStateSuspended WorkflowState = "Suspended" +) + +func PossibleValuesForWorkflowState() []string { + return []string{ + string(WorkflowStateCompleted), + string(WorkflowStateDeleted), + string(WorkflowStateDisabled), + string(WorkflowStateEnabled), + string(WorkflowStateNotSpecified), + string(WorkflowStateSuspended), + } +} + +func parseWorkflowState(input string) (*WorkflowState, error) { + vals := map[string]WorkflowState{ + "completed": WorkflowStateCompleted, + "deleted": WorkflowStateDeleted, + "disabled": WorkflowStateDisabled, + "enabled": WorkflowStateEnabled, + "notspecified": WorkflowStateNotSpecified, + "suspended": WorkflowStateSuspended, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowState(input) + return &out, nil +} + +type WorkflowStatus string + +const ( + WorkflowStatusAborted WorkflowStatus = "Aborted" + WorkflowStatusCancelled WorkflowStatus = "Cancelled" + WorkflowStatusFailed WorkflowStatus = "Failed" + WorkflowStatusFaulted WorkflowStatus = "Faulted" + WorkflowStatusIgnored WorkflowStatus = "Ignored" + WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" + WorkflowStatusPaused WorkflowStatus = "Paused" + WorkflowStatusRunning WorkflowStatus = "Running" + WorkflowStatusSkipped WorkflowStatus = "Skipped" + WorkflowStatusSucceeded WorkflowStatus = "Succeeded" + WorkflowStatusSuspended WorkflowStatus = "Suspended" + WorkflowStatusTimedOut WorkflowStatus = "TimedOut" + WorkflowStatusWaiting WorkflowStatus = "Waiting" +) + +func PossibleValuesForWorkflowStatus() []string { + return []string{ + string(WorkflowStatusAborted), + string(WorkflowStatusCancelled), + string(WorkflowStatusFailed), + string(WorkflowStatusFaulted), + string(WorkflowStatusIgnored), + string(WorkflowStatusNotSpecified), + string(WorkflowStatusPaused), + string(WorkflowStatusRunning), + string(WorkflowStatusSkipped), + string(WorkflowStatusSucceeded), + string(WorkflowStatusSuspended), + string(WorkflowStatusTimedOut), + string(WorkflowStatusWaiting), + } +} + +func parseWorkflowStatus(input string) (*WorkflowStatus, error) { + vals := map[string]WorkflowStatus{ + "aborted": WorkflowStatusAborted, + "cancelled": WorkflowStatusCancelled, + "failed": WorkflowStatusFailed, + "faulted": WorkflowStatusFaulted, + "ignored": WorkflowStatusIgnored, + "notspecified": WorkflowStatusNotSpecified, + "paused": WorkflowStatusPaused, + "running": WorkflowStatusRunning, + "skipped": WorkflowStatusSkipped, + "succeeded": WorkflowStatusSucceeded, + "suspended": WorkflowStatusSuspended, + "timedout": WorkflowStatusTimedOut, + "waiting": WorkflowStatusWaiting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowStatus(input) + return &out, nil +} + +type WorkflowTriggerProvisioningState string + +const ( + WorkflowTriggerProvisioningStateAccepted WorkflowTriggerProvisioningState = "Accepted" + WorkflowTriggerProvisioningStateCanceled WorkflowTriggerProvisioningState = "Canceled" + WorkflowTriggerProvisioningStateCompleted WorkflowTriggerProvisioningState = "Completed" + WorkflowTriggerProvisioningStateCreated WorkflowTriggerProvisioningState = "Created" + WorkflowTriggerProvisioningStateCreating WorkflowTriggerProvisioningState = "Creating" + WorkflowTriggerProvisioningStateDeleted WorkflowTriggerProvisioningState = "Deleted" + WorkflowTriggerProvisioningStateDeleting WorkflowTriggerProvisioningState = "Deleting" + WorkflowTriggerProvisioningStateFailed WorkflowTriggerProvisioningState = "Failed" + WorkflowTriggerProvisioningStateMoving WorkflowTriggerProvisioningState = "Moving" + WorkflowTriggerProvisioningStateNotSpecified WorkflowTriggerProvisioningState = "NotSpecified" + WorkflowTriggerProvisioningStateReady WorkflowTriggerProvisioningState = "Ready" + WorkflowTriggerProvisioningStateRegistered WorkflowTriggerProvisioningState = "Registered" + WorkflowTriggerProvisioningStateRegistering WorkflowTriggerProvisioningState = "Registering" + WorkflowTriggerProvisioningStateRunning WorkflowTriggerProvisioningState = "Running" + WorkflowTriggerProvisioningStateSucceeded WorkflowTriggerProvisioningState = "Succeeded" + WorkflowTriggerProvisioningStateUnregistered WorkflowTriggerProvisioningState = "Unregistered" + WorkflowTriggerProvisioningStateUnregistering WorkflowTriggerProvisioningState = "Unregistering" + WorkflowTriggerProvisioningStateUpdating WorkflowTriggerProvisioningState = "Updating" +) + +func PossibleValuesForWorkflowTriggerProvisioningState() []string { + return []string{ + string(WorkflowTriggerProvisioningStateAccepted), + string(WorkflowTriggerProvisioningStateCanceled), + string(WorkflowTriggerProvisioningStateCompleted), + string(WorkflowTriggerProvisioningStateCreated), + string(WorkflowTriggerProvisioningStateCreating), + string(WorkflowTriggerProvisioningStateDeleted), + string(WorkflowTriggerProvisioningStateDeleting), + string(WorkflowTriggerProvisioningStateFailed), + string(WorkflowTriggerProvisioningStateMoving), + string(WorkflowTriggerProvisioningStateNotSpecified), + string(WorkflowTriggerProvisioningStateReady), + string(WorkflowTriggerProvisioningStateRegistered), + string(WorkflowTriggerProvisioningStateRegistering), + string(WorkflowTriggerProvisioningStateRunning), + string(WorkflowTriggerProvisioningStateSucceeded), + string(WorkflowTriggerProvisioningStateUnregistered), + string(WorkflowTriggerProvisioningStateUnregistering), + string(WorkflowTriggerProvisioningStateUpdating), + } +} + +func parseWorkflowTriggerProvisioningState(input string) (*WorkflowTriggerProvisioningState, error) { + vals := map[string]WorkflowTriggerProvisioningState{ + "accepted": WorkflowTriggerProvisioningStateAccepted, + "canceled": WorkflowTriggerProvisioningStateCanceled, + "completed": WorkflowTriggerProvisioningStateCompleted, + "created": WorkflowTriggerProvisioningStateCreated, + "creating": WorkflowTriggerProvisioningStateCreating, + "deleted": WorkflowTriggerProvisioningStateDeleted, + "deleting": WorkflowTriggerProvisioningStateDeleting, + "failed": WorkflowTriggerProvisioningStateFailed, + "moving": WorkflowTriggerProvisioningStateMoving, + "notspecified": WorkflowTriggerProvisioningStateNotSpecified, + "ready": WorkflowTriggerProvisioningStateReady, + "registered": WorkflowTriggerProvisioningStateRegistered, + "registering": WorkflowTriggerProvisioningStateRegistering, + "running": WorkflowTriggerProvisioningStateRunning, + "succeeded": WorkflowTriggerProvisioningStateSucceeded, + "unregistered": WorkflowTriggerProvisioningStateUnregistered, + "unregistering": WorkflowTriggerProvisioningStateUnregistering, + "updating": WorkflowTriggerProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WorkflowTriggerProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go new file mode 100644 index 000000000000..cb3bb5795a43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go @@ -0,0 +1,137 @@ +package workflowtriggers + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = TriggerId{} + +// TriggerId is a struct representing the Resource ID for a Trigger +type TriggerId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + TriggerName string +} + +// NewTriggerID returns a new TriggerId struct +func NewTriggerID(subscriptionId string, resourceGroupName string, workflowName string, triggerName string) TriggerId { + return TriggerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + TriggerName: triggerName, + } +} + +// ParseTriggerID parses 'input' into a TriggerId +func ParseTriggerID(input string) (*TriggerId, error) { + parser := resourceids.NewParserFromResourceIdType(TriggerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := TriggerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { + return nil, fmt.Errorf("the segment 'triggerName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseTriggerIDInsensitively parses 'input' case-insensitively into a TriggerId +// note: this method should only be used for API response data and not user input +func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { + parser := resourceids.NewParserFromResourceIdType(TriggerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := TriggerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { + return nil, fmt.Errorf("the segment 'triggerName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateTriggerID checks that 'input' can be parsed as a Trigger ID +func ValidateTriggerID(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 := ParseTriggerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Trigger ID +func (id TriggerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/triggers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.TriggerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Trigger ID +func (id TriggerId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticTriggers", "triggers", "triggers"), + resourceids.UserSpecifiedSegment("triggerName", "triggerValue"), + } +} + +// String returns a human-readable description of this Trigger ID +func (id TriggerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Trigger Name: %q", id.TriggerName), + } + return fmt.Sprintf("Trigger (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go new file mode 100644 index 000000000000..58e6dc618e0e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go @@ -0,0 +1,150 @@ +package workflowtriggers + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = VersionTriggerId{} + +// VersionTriggerId is a struct representing the Resource ID for a Version Trigger +type VersionTriggerId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string + VersionId string + TriggerName string +} + +// NewVersionTriggerID returns a new VersionTriggerId struct +func NewVersionTriggerID(subscriptionId string, resourceGroupName string, workflowName string, versionId string, triggerName string) VersionTriggerId { + return VersionTriggerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + VersionId: versionId, + TriggerName: triggerName, + } +} + +// ParseVersionTriggerID parses 'input' into a VersionTriggerId +func ParseVersionTriggerID(input string) (*VersionTriggerId, error) { + parser := resourceids.NewParserFromResourceIdType(VersionTriggerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := VersionTriggerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.VersionId, ok = parsed.Parsed["versionId"]; !ok { + return nil, fmt.Errorf("the segment 'versionId' was not found in the resource id %q", input) + } + + if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { + return nil, fmt.Errorf("the segment 'triggerName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseVersionTriggerIDInsensitively parses 'input' case-insensitively into a VersionTriggerId +// note: this method should only be used for API response data and not user input +func ParseVersionTriggerIDInsensitively(input string) (*VersionTriggerId, error) { + parser := resourceids.NewParserFromResourceIdType(VersionTriggerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := VersionTriggerId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + if id.VersionId, ok = parsed.Parsed["versionId"]; !ok { + return nil, fmt.Errorf("the segment 'versionId' was not found in the resource id %q", input) + } + + if id.TriggerName, ok = parsed.Parsed["triggerName"]; !ok { + return nil, fmt.Errorf("the segment 'triggerName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateVersionTriggerID checks that 'input' can be parsed as a Version Trigger ID +func ValidateVersionTriggerID(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 := ParseVersionTriggerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Version Trigger ID +func (id VersionTriggerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s/versions/%s/triggers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName, id.VersionId, id.TriggerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Version Trigger ID +func (id VersionTriggerId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + resourceids.StaticSegment("staticVersions", "versions", "versions"), + resourceids.UserSpecifiedSegment("versionId", "versionIdValue"), + resourceids.StaticSegment("staticTriggers", "triggers", "triggers"), + resourceids.UserSpecifiedSegment("triggerName", "triggerValue"), + } +} + +// String returns a human-readable description of this Version Trigger ID +func (id VersionTriggerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + fmt.Sprintf("Version: %q", id.VersionId), + fmt.Sprintf("Trigger Name: %q", id.TriggerName), + } + return fmt.Sprintf("Version Trigger (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go new file mode 100644 index 000000000000..de1703eec544 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go @@ -0,0 +1,124 @@ +package workflowtriggers + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +var _ resourceids.ResourceId = WorkflowId{} + +// WorkflowId is a struct representing the Resource ID for a Workflow +type WorkflowId struct { + SubscriptionId string + ResourceGroupName string + WorkflowName string +} + +// NewWorkflowID returns a new WorkflowId struct +func NewWorkflowID(subscriptionId string, resourceGroupName string, workflowName string) WorkflowId { + return WorkflowId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + WorkflowName: workflowName, + } +} + +// ParseWorkflowID parses 'input' into a WorkflowId +func ParseWorkflowID(input string) (*WorkflowId, error) { + parser := resourceids.NewParserFromResourceIdType(WorkflowId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := WorkflowId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ParseWorkflowIDInsensitively parses 'input' case-insensitively into a WorkflowId +// note: this method should only be used for API response data and not user input +func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { + parser := resourceids.NewParserFromResourceIdType(WorkflowId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := WorkflowId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, fmt.Errorf("the segment 'subscriptionId' was not found in the resource id %q", input) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, fmt.Errorf("the segment 'resourceGroupName' was not found in the resource id %q", input) + } + + if id.WorkflowName, ok = parsed.Parsed["workflowName"]; !ok { + return nil, fmt.Errorf("the segment 'workflowName' was not found in the resource id %q", input) + } + + return &id, nil +} + +// ValidateWorkflowID checks that 'input' can be parsed as a Workflow ID +func ValidateWorkflowID(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 := ParseWorkflowID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Workflow ID +func (id WorkflowId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Logic/workflows/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.WorkflowName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Workflow ID +func (id WorkflowId) 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("staticMicrosoftLogic", "Microsoft.Logic", "Microsoft.Logic"), + resourceids.StaticSegment("staticWorkflows", "workflows", "workflows"), + resourceids.UserSpecifiedSegment("workflowName", "workflowValue"), + } +} + +// String returns a human-readable description of this Workflow ID +func (id WorkflowId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Workflow Name: %q", id.WorkflowName), + } + return fmt.Sprintf("Workflow (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_get_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_get_autorest.go new file mode 100644 index 000000000000..4a2655a974e5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_get_autorest.go @@ -0,0 +1,68 @@ +package workflowtriggers + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTrigger +} + +// Get ... +func (c WorkflowTriggersClient) Get(ctx context.Context, id TriggerId) (result GetOperationResponse, err error) { + req, err := c.preparerForGet(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Get", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Get", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGet(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Get", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGet prepares the Get request. +func (c WorkflowTriggersClient) preparerForGet(ctx context.Context, id TriggerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(id.ID()), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGet handles the response to the Get request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForGet(resp *http.Response) (result GetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson_autorest.go new file mode 100644 index 000000000000..9c8ea932113c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson_autorest.go @@ -0,0 +1,69 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetSchemaJsonOperationResponse struct { + HttpResponse *http.Response + Model *JsonSchema +} + +// GetSchemaJson ... +func (c WorkflowTriggersClient) GetSchemaJson(ctx context.Context, id TriggerId) (result GetSchemaJsonOperationResponse, err error) { + req, err := c.preparerForGetSchemaJson(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "GetSchemaJson", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "GetSchemaJson", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForGetSchemaJson(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "GetSchemaJson", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForGetSchemaJson prepares the GetSchemaJson request. +func (c WorkflowTriggersClient) preparerForGetSchemaJson(ctx context.Context, id TriggerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/schemas/json", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForGetSchemaJson handles the response to the GetSchemaJson request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForGetSchemaJson(resp *http.Response) (result GetSchemaJsonOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_list_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_list_autorest.go new file mode 100644 index 000000000000..6fb0d033905c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_list_autorest.go @@ -0,0 +1,220 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + Model *[]WorkflowTrigger + + nextLink *string + nextPageFunc func(ctx context.Context, nextLink string) (ListOperationResponse, error) +} + +type ListCompleteResult struct { + Items []WorkflowTrigger +} + +func (r ListOperationResponse) HasMore() bool { + return r.nextLink != nil +} + +func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error) { + if !r.HasMore() { + err = fmt.Errorf("no more pages returned") + return + } + return r.nextPageFunc(ctx, *r.nextLink) +} + +type ListOperationOptions struct { + Filter *string + Top *int64 +} + +func DefaultListOperationOptions() ListOperationOptions { + return ListOperationOptions{} +} + +func (o ListOperationOptions) toHeaders() map[string]interface{} { + out := make(map[string]interface{}) + + return out +} + +func (o ListOperationOptions) toQueryString() map[string]interface{} { + out := make(map[string]interface{}) + + if o.Filter != nil { + out["$filter"] = *o.Filter + } + + if o.Top != nil { + out["$top"] = *o.Top + } + + return out +} + +// List ... +func (c WorkflowTriggersClient) List(ctx context.Context, id WorkflowId, options ListOperationOptions) (resp ListOperationResponse, err error) { + req, err := c.preparerForList(ctx, id, options) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "List", nil, "Failure preparing request") + return + } + + resp.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "List", resp.HttpResponse, "Failure sending request") + return + } + + resp, err = c.responderForList(resp.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "List", resp.HttpResponse, "Failure responding to request") + return + } + return +} + +// preparerForList prepares the List request. +func (c WorkflowTriggersClient) preparerForList(ctx context.Context, id WorkflowId, options ListOperationOptions) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + for k, v := range options.toQueryString() { + queryParameters[k] = autorest.Encode("query", v) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithHeaders(options.toHeaders()), + autorest.WithPath(fmt.Sprintf("%s/triggers", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// preparerForListWithNextLink prepares the List request with the given nextLink token. +func (c WorkflowTriggersClient) preparerForListWithNextLink(ctx context.Context, nextLink string) (*http.Request, error) { + uri, err := url.Parse(nextLink) + if err != nil { + return nil, fmt.Errorf("parsing nextLink %q: %+v", nextLink, err) + } + queryParameters := map[string]interface{}{} + for k, v := range uri.Query() { + if len(v) == 0 { + continue + } + val := v[0] + val = autorest.Encode("query", val) + queryParameters[k] = val + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(uri.Path), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForList handles the response to the List request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForList(resp *http.Response) (result ListOperationResponse, err error) { + type page struct { + Values []WorkflowTrigger `json:"value"` + NextLink *string `json:"nextLink"` + } + var respObj page + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&respObj), + autorest.ByClosing()) + result.HttpResponse = resp + result.Model = &respObj.Values + result.nextLink = respObj.NextLink + if respObj.NextLink != nil { + result.nextPageFunc = func(ctx context.Context, nextLink string) (result ListOperationResponse, err error) { + req, err := c.preparerForListWithNextLink(ctx, nextLink) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "List", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "List", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForList(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "List", result.HttpResponse, "Failure responding to request") + return + } + + return + } + } + return +} + +// ListComplete retrieves all of the results into a single object +func (c WorkflowTriggersClient) ListComplete(ctx context.Context, id WorkflowId, options ListOperationOptions) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, options, WorkflowTriggerOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate +func (c WorkflowTriggersClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkflowId, options ListOperationOptions, predicate WorkflowTriggerOperationPredicate) (resp ListCompleteResult, err error) { + items := make([]WorkflowTrigger, 0) + + page, err := c.List(ctx, id, options) + if err != nil { + err = fmt.Errorf("loading the initial page: %+v", err) + return + } + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + for page.HasMore() { + page, err = page.LoadMore(ctx) + if err != nil { + err = fmt.Errorf("loading the next page: %+v", err) + return + } + + if page.Model != nil { + for _, v := range *page.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + } + + out := ListCompleteResult{ + Items: items, + } + return out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl_autorest.go new file mode 100644 index 000000000000..0f7e30a34eb6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl_autorest.go @@ -0,0 +1,69 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// ListCallbackUrl ... +func (c WorkflowTriggersClient) ListCallbackUrl(ctx context.Context, id TriggerId) (result ListCallbackUrlOperationResponse, err error) { + req, err := c.preparerForListCallbackUrl(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "ListCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "ListCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForListCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "ListCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForListCallbackUrl prepares the ListCallbackUrl request. +func (c WorkflowTriggersClient) preparerForListCallbackUrl(ctx context.Context, id TriggerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listCallbackUrl", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForListCallbackUrl handles the response to the ListCallbackUrl request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForListCallbackUrl(resp *http.Response) (result ListCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_reset_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_reset_autorest.go new file mode 100644 index 000000000000..29cb6d229c83 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_reset_autorest.go @@ -0,0 +1,67 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResetOperationResponse struct { + HttpResponse *http.Response +} + +// Reset ... +func (c WorkflowTriggersClient) Reset(ctx context.Context, id TriggerId) (result ResetOperationResponse, err error) { + req, err := c.preparerForReset(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Reset", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Reset", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForReset(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Reset", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForReset prepares the Reset request. +func (c WorkflowTriggersClient) preparerForReset(ctx context.Context, id TriggerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/reset", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForReset handles the response to the Reset request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForReset(resp *http.Response) (result ResetOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_run_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_run_autorest.go new file mode 100644 index 000000000000..02bb0bbcebe9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_run_autorest.go @@ -0,0 +1,67 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RunOperationResponse struct { + HttpResponse *http.Response +} + +// Run ... +func (c WorkflowTriggersClient) Run(ctx context.Context, id TriggerId) (result RunOperationResponse, err error) { + req, err := c.preparerForRun(ctx, id) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Run", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Run", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForRun(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "Run", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForRun prepares the Run request. +func (c WorkflowTriggersClient) preparerForRun(ctx context.Context, id TriggerId) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/run", id.ID())), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForRun handles the response to the Run request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForRun(resp *http.Response) (result RunOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_setstate_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_setstate_autorest.go new file mode 100644 index 000000000000..133d57458848 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_setstate_autorest.go @@ -0,0 +1,68 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SetStateOperationResponse struct { + HttpResponse *http.Response +} + +// SetState ... +func (c WorkflowTriggersClient) SetState(ctx context.Context, id TriggerId, input SetTriggerStateActionDefinition) (result SetStateOperationResponse, err error) { + req, err := c.preparerForSetState(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "SetState", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "SetState", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForSetState(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "SetState", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForSetState prepares the SetState request. +func (c WorkflowTriggersClient) preparerForSetState(ctx context.Context, id TriggerId, input SetTriggerStateActionDefinition) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/setState", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForSetState handles the response to the SetState request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForSetState(resp *http.Response) (result SetStateOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl_autorest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl_autorest.go new file mode 100644 index 000000000000..edbf5b1a3f44 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl_autorest.go @@ -0,0 +1,70 @@ +package workflowtriggers + +import ( + "context" + "fmt" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowVersionTriggersListCallbackUrlOperationResponse struct { + HttpResponse *http.Response + Model *WorkflowTriggerCallbackUrl +} + +// WorkflowVersionTriggersListCallbackUrl ... +func (c WorkflowTriggersClient) WorkflowVersionTriggersListCallbackUrl(ctx context.Context, id VersionTriggerId, input GetCallbackUrlParameters) (result WorkflowVersionTriggersListCallbackUrlOperationResponse, err error) { + req, err := c.preparerForWorkflowVersionTriggersListCallbackUrl(ctx, id, input) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "WorkflowVersionTriggersListCallbackUrl", nil, "Failure preparing request") + return + } + + result.HttpResponse, err = c.Client.Send(req, azure.DoRetryWithRegistration(c.Client)) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "WorkflowVersionTriggersListCallbackUrl", result.HttpResponse, "Failure sending request") + return + } + + result, err = c.responderForWorkflowVersionTriggersListCallbackUrl(result.HttpResponse) + if err != nil { + err = autorest.NewErrorWithError(err, "workflowtriggers.WorkflowTriggersClient", "WorkflowVersionTriggersListCallbackUrl", result.HttpResponse, "Failure responding to request") + return + } + + return +} + +// preparerForWorkflowVersionTriggersListCallbackUrl prepares the WorkflowVersionTriggersListCallbackUrl request. +func (c WorkflowTriggersClient) preparerForWorkflowVersionTriggersListCallbackUrl(ctx context.Context, id VersionTriggerId, input GetCallbackUrlParameters) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": defaultApiVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(c.baseUri), + autorest.WithPath(fmt.Sprintf("%s/listCallbackUrl", id.ID())), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// responderForWorkflowVersionTriggersListCallbackUrl handles the response to the WorkflowVersionTriggersListCallbackUrl request. The method always +// closes the http.Response Body. +func (c WorkflowTriggersClient) responderForWorkflowVersionTriggersListCallbackUrl(resp *http.Response) (result WorkflowVersionTriggersListCallbackUrlOperationResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Model), + autorest.ByClosing()) + result.HttpResponse = resp + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_getcallbackurlparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_getcallbackurlparameters.go new file mode 100644 index 000000000000..8614e9abf176 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_getcallbackurlparameters.go @@ -0,0 +1,27 @@ +package workflowtriggers + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetCallbackUrlParameters struct { + KeyType *KeyType `json:"keyType,omitempty"` + NotAfter *string `json:"notAfter,omitempty"` +} + +func (o *GetCallbackUrlParameters) GetNotAfterAsTime() (*time.Time, error) { + if o.NotAfter == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NotAfter, "2006-01-02T15:04:05Z07:00") +} + +func (o *GetCallbackUrlParameters) SetNotAfterAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NotAfter = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_jsonschema.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_jsonschema.go new file mode 100644 index 000000000000..9dbec86f7579 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_jsonschema.go @@ -0,0 +1,9 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonSchema struct { + Content *string `json:"content,omitempty"` + Title *string `json:"title,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_recurrenceschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_recurrenceschedule.go new file mode 100644 index 000000000000..7ea8413d4cd9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_recurrenceschedule.go @@ -0,0 +1,12 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RecurrenceSchedule struct { + Hours *[]int64 `json:"hours,omitempty"` + Minutes *[]int64 `json:"minutes,omitempty"` + MonthDays *[]int64 `json:"monthDays,omitempty"` + MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"` + WeekDays *[]DaysOfWeek `json:"weekDays,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_recurrencescheduleoccurrence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_recurrencescheduleoccurrence.go new file mode 100644 index 000000000000..39f417c38d7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_recurrencescheduleoccurrence.go @@ -0,0 +1,9 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RecurrenceScheduleOccurrence struct { + Day *DayOfWeek `json:"day,omitempty"` + Occurrence *int64 `json:"occurrence,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_resourcereference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_resourcereference.go new file mode 100644 index 000000000000..f96ba2e28a0a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_resourcereference.go @@ -0,0 +1,10 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_settriggerstateactiondefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_settriggerstateactiondefinition.go new file mode 100644 index 000000000000..00003151a90c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_settriggerstateactiondefinition.go @@ -0,0 +1,8 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SetTriggerStateActionDefinition struct { + Source WorkflowTriggerReference `json:"source"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtrigger.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtrigger.go new file mode 100644 index 000000000000..b2502e9f9c42 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtrigger.go @@ -0,0 +1,11 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTrigger struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *WorkflowTriggerProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggercallbackurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggercallbackurl.go new file mode 100644 index 000000000000..fd5a9082bd7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggercallbackurl.go @@ -0,0 +1,13 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerCallbackUrl struct { + BasePath *string `json:"basePath,omitempty"` + Method *string `json:"method,omitempty"` + Queries *WorkflowTriggerListCallbackUrlQueries `json:"queries,omitempty"` + RelativePath *string `json:"relativePath,omitempty"` + RelativePathParameters *[]string `json:"relativePathParameters,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerlistcallbackurlqueries.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerlistcallbackurlqueries.go new file mode 100644 index 000000000000..cc3b231968b1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerlistcallbackurlqueries.go @@ -0,0 +1,12 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerListCallbackUrlQueries struct { + ApiVersion *string `json:"api-version,omitempty"` + Se *string `json:"se,omitempty"` + Sig *string `json:"sig,omitempty"` + Sp *string `json:"sp,omitempty"` + Sv *string `json:"sv,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerproperties.go new file mode 100644 index 000000000000..b860a57a39ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerproperties.go @@ -0,0 +1,70 @@ +package workflowtriggers + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerProperties struct { + ChangedTime *string `json:"changedTime,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + LastExecutionTime *string `json:"lastExecutionTime,omitempty"` + NextExecutionTime *string `json:"nextExecutionTime,omitempty"` + ProvisioningState *WorkflowTriggerProvisioningState `json:"provisioningState,omitempty"` + Recurrence *WorkflowTriggerRecurrence `json:"recurrence,omitempty"` + State *WorkflowState `json:"state,omitempty"` + Status *WorkflowStatus `json:"status,omitempty"` + Workflow *ResourceReference `json:"workflow,omitempty"` +} + +func (o *WorkflowTriggerProperties) GetChangedTimeAsTime() (*time.Time, error) { + if o.ChangedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ChangedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowTriggerProperties) SetChangedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ChangedTime = &formatted +} + +func (o *WorkflowTriggerProperties) GetCreatedTimeAsTime() (*time.Time, error) { + if o.CreatedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreatedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowTriggerProperties) SetCreatedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreatedTime = &formatted +} + +func (o *WorkflowTriggerProperties) GetLastExecutionTimeAsTime() (*time.Time, error) { + if o.LastExecutionTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastExecutionTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowTriggerProperties) SetLastExecutionTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastExecutionTime = &formatted +} + +func (o *WorkflowTriggerProperties) GetNextExecutionTimeAsTime() (*time.Time, error) { + if o.NextExecutionTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NextExecutionTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WorkflowTriggerProperties) SetNextExecutionTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NextExecutionTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerrecurrence.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerrecurrence.go new file mode 100644 index 000000000000..ec9873b45184 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerrecurrence.go @@ -0,0 +1,13 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerRecurrence struct { + EndTime *string `json:"endTime,omitempty"` + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` + Interval *int64 `json:"interval,omitempty"` + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerreference.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerreference.go new file mode 100644 index 000000000000..7f6891935505 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/model_workflowtriggerreference.go @@ -0,0 +1,12 @@ +package workflowtriggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WorkflowTriggerReference struct { + FlowName *string `json:"flowName,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + TriggerName *string `json:"triggerName,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/predicates.go new file mode 100644 index 000000000000..5526a8e07bd1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/predicates.go @@ -0,0 +1,24 @@ +package workflowtriggers + +type WorkflowTriggerOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p WorkflowTriggerOperationPredicate) Matches(input WorkflowTrigger) bool { + + 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/logic/2019-05-01/workflowtriggers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/version.go new file mode 100644 index 000000000000..1045dd9e4740 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers/version.go @@ -0,0 +1,12 @@ +package workflowtriggers + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2019-05-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggers/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index f339a766cb1b..f89144d95cc3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -28,7 +28,6 @@ github.com/Azure/azure-sdk-for-go/services/healthcareapis/mgmt/2021-11-01/health github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2021-10-01/keyvault github.com/Azure/azure-sdk-for-go/services/keyvault/v7.1/keyvault github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2022-02-01/kusto -github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2019-05-01/logic github.com/Azure/azure-sdk-for-go/services/logz/mgmt/2020-10-01/logz github.com/Azure/azure-sdk-for-go/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering github.com/Azure/azure-sdk-for-go/services/monitor/mgmt/2020-10-01/insights @@ -292,6 +291,19 @@ github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedu github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2021-12-01-preview/loadtests +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows +github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2022-05-01/datastore github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2022-05-01/machinelearningcomputes github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2022-05-01/workspaces