diff --git a/go.mod b/go.mod index a8a1abc89d86d..08f355b0db0ec 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.1 github.com/hashicorp/go-azure-helpers v0.61.0 - github.com/hashicorp/go-azure-sdk v0.20230918.1115907 + github.com/hashicorp/go-azure-sdk v0.20231005.1153009 github.com/hashicorp/go-hclog v1.5.0 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index 76fae18e20e35..0ba68dfa48a35 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= github.com/hashicorp/go-azure-helpers v0.61.0 h1:dIz23Vp8LdErxuImc6V5QIPtJcWjMgqP75bfp8o1Lro= github.com/hashicorp/go-azure-helpers v0.61.0/go.mod h1:BQUQp5udwbJ8pnzl0wByCLVEEyPMAFpJ9vOREiCzObo= -github.com/hashicorp/go-azure-sdk v0.20230918.1115907 h1:V+SyLwBD9tpnW00H/AnqM2ir11CUchc0EPuf2Mi0c+s= -github.com/hashicorp/go-azure-sdk v0.20230918.1115907/go.mod h1:KSQRt0kuQGxFXo3t0KtQwTXhOWWxso2ZoSbtqQitruY= +github.com/hashicorp/go-azure-sdk v0.20231005.1153009 h1:aHZV7H6KjIU9gAkGAPx21seYpPKDWN7b0mxZr0fo9ag= +github.com/hashicorp/go-azure-sdk v0.20231005.1153009/go.mod h1:KSQRt0kuQGxFXo3t0KtQwTXhOWWxso2ZoSbtqQitruY= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go index 44db0ebc7d1ce..ac5ca445e8dc1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeys.go @@ -31,7 +31,7 @@ func (c IotDpsResourceClient) ListKeys(ctx context.Context, id commonids.Provisi http.StatusOK, }, HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listkeys", id.ID()), + Path: fmt.Sprintf("%s/listKeys", id.ID()), } req, err := c.Client.NewRequest(ctx, opts) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go index e69e22dd8a6a9..71982c4e96f6c 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go @@ -26,7 +26,7 @@ func (c IotDpsResourceClient) ListKeysForKeyName(ctx context.Context, id KeyId) http.StatusOK, }, HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listkeys", id.ID()), + Path: fmt.Sprintf("%s/listKeys", id.ID()), } req, err := c.Client.NewRequest(ctx, opts) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/client.go new file mode 100644 index 0000000000000..c0bd9ca26e4f7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/client.go @@ -0,0 +1,46 @@ +package v2023_04_01 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate" + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration" + "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + NginxCertificate *nginxcertificate.NginxCertificateClient + NginxConfiguration *nginxconfiguration.NginxConfigurationClient + NginxDeployment *nginxdeployment.NginxDeploymentClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + nginxCertificateClient, err := nginxcertificate.NewNginxCertificateClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxCertificate client: %+v", err) + } + configureFunc(nginxCertificateClient.Client) + + nginxConfigurationClient, err := nginxconfiguration.NewNginxConfigurationClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxConfiguration client: %+v", err) + } + configureFunc(nginxConfigurationClient.Client) + + nginxDeploymentClient, err := nginxdeployment.NewNginxDeploymentClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building NginxDeployment client: %+v", err) + } + configureFunc(nginxDeploymentClient.Client) + + return &Client{ + NginxCertificate: nginxCertificateClient, + NginxConfiguration: nginxConfigurationClient, + NginxDeployment: nginxDeploymentClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/README.md new file mode 100644 index 0000000000000..6393b84570211 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate` Documentation + +The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-04-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/nginx/2023-04-01/nginxcertificate" +``` + + +### Client Initialization + +```go +client := nginxcertificate.NewNginxCertificateClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxCertificateClient.CertificatesCreateOrUpdate` + +```go +ctx := context.TODO() +id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") + +payload := nginxcertificate.NginxCertificate{ + // ... +} + + +if err := client.CertificatesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxCertificateClient.CertificatesDelete` + +```go +ctx := context.TODO() +id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") + +if err := client.CertificatesDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxCertificateClient.CertificatesGet` + +```go +ctx := context.TODO() +id := nginxcertificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "certificateValue") + +read, err := client.CertificatesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NginxCertificateClient.CertificatesList` + +```go +ctx := context.TODO() +id := nginxcertificate.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +// alternatively `client.CertificatesList(ctx, id)` can be used to do batched pagination +items, err := client.CertificatesListComplete(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/nginx/2023-04-01/nginxcertificate/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/client.go new file mode 100644 index 0000000000000..afeaf1e338a2f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/client.go @@ -0,0 +1,26 @@ +package nginxcertificate + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxCertificateClient struct { + Client *resourcemanager.Client +} + +func NewNginxCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxCertificateClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxcertificate", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating NginxCertificateClient: %+v", err) + } + + return &NginxCertificateClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/constants.go new file mode 100644 index 0000000000000..5cea630d9fe8b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/constants.go @@ -0,0 +1,72 @@ +package nginxcertificate + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateNotSpecified), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "notspecified": ProvisioningStateNotSpecified, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go new file mode 100644 index 0000000000000..4d6f53b5b26ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go @@ -0,0 +1,140 @@ +package nginxcertificate + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = CertificateId{} + +// CertificateId is a struct representing the Resource ID for a Certificate +type CertificateId struct { + SubscriptionId string + ResourceGroupName string + NginxDeploymentName string + CertificateName string +} + +// NewCertificateID returns a new CertificateId struct +func NewCertificateID(subscriptionId string, resourceGroupName string, nginxDeploymentName string, certificateName string) CertificateId { + return CertificateId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NginxDeploymentName: nginxDeploymentName, + 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, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + } + + 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, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + if id.CertificateName, ok = parsed.Parsed["certificateName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "certificateName", *parsed) + } + + 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/Nginx.NginxPlus/nginxDeployments/%s/certificates/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NginxDeploymentName, 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("staticNginxNginxPlus", "Nginx.NginxPlus", "Nginx.NginxPlus"), + resourceids.StaticSegment("staticNginxDeployments", "nginxDeployments", "nginxDeployments"), + resourceids.UserSpecifiedSegment("nginxDeploymentName", "nginxDeploymentValue"), + 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("Nginx Deployment Name: %q", id.NginxDeploymentName), + 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/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go new file mode 100644 index 0000000000000..ad8f96db4898a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go @@ -0,0 +1,127 @@ +package nginxcertificate + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = NginxDeploymentId{} + +// NginxDeploymentId is a struct representing the Resource ID for a Nginx Deployment +type NginxDeploymentId struct { + SubscriptionId string + ResourceGroupName string + NginxDeploymentName string +} + +// NewNginxDeploymentID returns a new NginxDeploymentId struct +func NewNginxDeploymentID(subscriptionId string, resourceGroupName string, nginxDeploymentName string) NginxDeploymentId { + return NginxDeploymentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NginxDeploymentName: nginxDeploymentName, + } +} + +// ParseNginxDeploymentID parses 'input' into a NginxDeploymentId +func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { + parser := resourceids.NewParserFromResourceIdType(NginxDeploymentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := NginxDeploymentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + return &id, nil +} + +// ParseNginxDeploymentIDInsensitively parses 'input' case-insensitively into a NginxDeploymentId +// note: this method should only be used for API response data and not user input +func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, error) { + parser := resourceids.NewParserFromResourceIdType(NginxDeploymentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := NginxDeploymentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + return &id, nil +} + +// ValidateNginxDeploymentID checks that 'input' can be parsed as a Nginx Deployment ID +func ValidateNginxDeploymentID(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 := ParseNginxDeploymentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Nginx Deployment ID +func (id NginxDeploymentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Nginx.NginxPlus/nginxDeployments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NginxDeploymentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Nginx Deployment ID +func (id NginxDeploymentId) 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("staticNginxNginxPlus", "Nginx.NginxPlus", "Nginx.NginxPlus"), + resourceids.StaticSegment("staticNginxDeployments", "nginxDeployments", "nginxDeployments"), + resourceids.UserSpecifiedSegment("nginxDeploymentName", "nginxDeploymentValue"), + } +} + +// String returns a human-readable description of this Nginx Deployment ID +func (id NginxDeploymentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Nginx Deployment Name: %q", id.NginxDeploymentName), + } + return fmt.Sprintf("Nginx Deployment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatescreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatescreateorupdate.go new file mode 100644 index 0000000000000..d57814cc77db7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatescreateorupdate.go @@ -0,0 +1,74 @@ +package nginxcertificate + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CertificatesCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// CertificatesCreateOrUpdate ... +func (c NginxCertificateClient) CertificatesCreateOrUpdate(ctx context.Context, id CertificateId, input NginxCertificate) (result CertificatesCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CertificatesCreateOrUpdateThenPoll performs CertificatesCreateOrUpdate then polls until it's completed +func (c NginxCertificateClient) CertificatesCreateOrUpdateThenPoll(ctx context.Context, id CertificateId, input NginxCertificate) error { + result, err := c.CertificatesCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CertificatesCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CertificatesCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesdelete.go new file mode 100644 index 0000000000000..2e68fad4bb873 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesdelete.go @@ -0,0 +1,71 @@ +package nginxcertificate + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CertificatesDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// CertificatesDelete ... +func (c NginxCertificateClient) CertificatesDelete(ctx context.Context, id CertificateId) (result CertificatesDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CertificatesDeleteThenPoll performs CertificatesDelete then polls until it's completed +func (c NginxCertificateClient) CertificatesDeleteThenPoll(ctx context.Context, id CertificateId) error { + result, err := c.CertificatesDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing CertificatesDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CertificatesDelete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go new file mode 100644 index 0000000000000..85b4e7490cd75 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go @@ -0,0 +1,51 @@ +package nginxcertificate + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CertificatesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *NginxCertificate +} + +// CertificatesGet ... +func (c NginxCertificateClient) CertificatesGet(ctx context.Context, id CertificateId) (result CertificatesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificateslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificateslist.go new file mode 100644 index 0000000000000..d4bc2da3ddfea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificateslist.go @@ -0,0 +1,89 @@ +package nginxcertificate + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CertificatesListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NginxCertificate +} + +type CertificatesListCompleteResult struct { + Items []NginxCertificate +} + +// CertificatesList ... +func (c NginxCertificateClient) CertificatesList(ctx context.Context, id NginxDeploymentId) (result CertificatesListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/certificates", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]NginxCertificate `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// CertificatesListComplete retrieves all the results into a single object +func (c NginxCertificateClient) CertificatesListComplete(ctx context.Context, id NginxDeploymentId) (CertificatesListCompleteResult, error) { + return c.CertificatesListCompleteMatchingPredicate(ctx, id, NginxCertificateOperationPredicate{}) +} + +// CertificatesListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NginxCertificateClient) CertificatesListCompleteMatchingPredicate(ctx context.Context, id NginxDeploymentId, predicate NginxCertificateOperationPredicate) (result CertificatesListCompleteResult, err error) { + items := make([]NginxCertificate, 0) + + resp, err := c.CertificatesList(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = CertificatesListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/model_nginxcertificate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/model_nginxcertificate.go new file mode 100644 index 0000000000000..0a59d6e6aee0d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/model_nginxcertificate.go @@ -0,0 +1,17 @@ +package nginxcertificate + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxCertificate struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NginxCertificateProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/model_nginxcertificateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/model_nginxcertificateproperties.go new file mode 100644 index 0000000000000..6b0784ad01666 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/model_nginxcertificateproperties.go @@ -0,0 +1,11 @@ +package nginxcertificate + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxCertificateProperties struct { + CertificateVirtualPath *string `json:"certificateVirtualPath,omitempty"` + KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` + KeyVirtualPath *string `json:"keyVirtualPath,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/predicates.go new file mode 100644 index 0000000000000..b01a724d879ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/predicates.go @@ -0,0 +1,32 @@ +package nginxcertificate + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxCertificateOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p NginxCertificateOperationPredicate) Matches(input NginxCertificate) 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/nginx/2023-04-01/nginxcertificate/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/version.go new file mode 100644 index 0000000000000..fc6fb161517e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate/version.go @@ -0,0 +1,12 @@ +package nginxcertificate + +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 = "2023-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md new file mode 100644 index 0000000000000..56c1305237be8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration` Documentation + +The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-04-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/nginx/2023-04-01/nginxconfiguration" +``` + + +### Client Initialization + +```go +client := nginxconfiguration.NewNginxConfigurationClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsCreateOrUpdate` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +payload := nginxconfiguration.NginxConfiguration{ + // ... +} + + +if err := client.ConfigurationsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsDelete` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +if err := client.ConfigurationsDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsGet` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue", "configurationValue") + +read, err := client.ConfigurationsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NginxConfigurationClient.ConfigurationsList` + +```go +ctx := context.TODO() +id := nginxconfiguration.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +// alternatively `client.ConfigurationsList(ctx, id)` can be used to do batched pagination +items, err := client.ConfigurationsListComplete(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/nginx/2023-04-01/nginxconfiguration/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/client.go new file mode 100644 index 0000000000000..d845625bb5901 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/client.go @@ -0,0 +1,26 @@ +package nginxconfiguration + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxConfigurationClient struct { + Client *resourcemanager.Client +} + +func NewNginxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfiguration", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating NginxConfigurationClient: %+v", err) + } + + return &NginxConfigurationClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/constants.go new file mode 100644 index 0000000000000..9abf4d96b6bec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/constants.go @@ -0,0 +1,72 @@ +package nginxconfiguration + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateNotSpecified), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "notspecified": ProvisioningStateNotSpecified, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go new file mode 100644 index 0000000000000..7a3131a1eaf4f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go @@ -0,0 +1,140 @@ +package nginxconfiguration + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = ConfigurationId{} + +// ConfigurationId is a struct representing the Resource ID for a Configuration +type ConfigurationId struct { + SubscriptionId string + ResourceGroupName string + NginxDeploymentName string + ConfigurationName string +} + +// NewConfigurationID returns a new ConfigurationId struct +func NewConfigurationID(subscriptionId string, resourceGroupName string, nginxDeploymentName string, configurationName string) ConfigurationId { + return ConfigurationId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NginxDeploymentName: nginxDeploymentName, + ConfigurationName: configurationName, + } +} + +// ParseConfigurationID parses 'input' into a ConfigurationId +func ParseConfigurationID(input string) (*ConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(ConfigurationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ConfigurationId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + } + + return &id, nil +} + +// ParseConfigurationIDInsensitively parses 'input' case-insensitively into a ConfigurationId +// note: this method should only be used for API response data and not user input +func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { + parser := resourceids.NewParserFromResourceIdType(ConfigurationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := ConfigurationId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + if id.ConfigurationName, ok = parsed.Parsed["configurationName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationName", *parsed) + } + + return &id, nil +} + +// ValidateConfigurationID checks that 'input' can be parsed as a Configuration ID +func ValidateConfigurationID(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 := ParseConfigurationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Configuration ID +func (id ConfigurationId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Nginx.NginxPlus/nginxDeployments/%s/configurations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NginxDeploymentName, id.ConfigurationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Configuration ID +func (id ConfigurationId) 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("staticNginxNginxPlus", "Nginx.NginxPlus", "Nginx.NginxPlus"), + resourceids.StaticSegment("staticNginxDeployments", "nginxDeployments", "nginxDeployments"), + resourceids.UserSpecifiedSegment("nginxDeploymentName", "nginxDeploymentValue"), + resourceids.StaticSegment("staticConfigurations", "configurations", "configurations"), + resourceids.UserSpecifiedSegment("configurationName", "configurationValue"), + } +} + +// String returns a human-readable description of this Configuration ID +func (id ConfigurationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Nginx Deployment Name: %q", id.NginxDeploymentName), + fmt.Sprintf("Configuration Name: %q", id.ConfigurationName), + } + return fmt.Sprintf("Configuration (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go new file mode 100644 index 0000000000000..ab125d9e6cae8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go @@ -0,0 +1,127 @@ +package nginxconfiguration + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = NginxDeploymentId{} + +// NginxDeploymentId is a struct representing the Resource ID for a Nginx Deployment +type NginxDeploymentId struct { + SubscriptionId string + ResourceGroupName string + NginxDeploymentName string +} + +// NewNginxDeploymentID returns a new NginxDeploymentId struct +func NewNginxDeploymentID(subscriptionId string, resourceGroupName string, nginxDeploymentName string) NginxDeploymentId { + return NginxDeploymentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NginxDeploymentName: nginxDeploymentName, + } +} + +// ParseNginxDeploymentID parses 'input' into a NginxDeploymentId +func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { + parser := resourceids.NewParserFromResourceIdType(NginxDeploymentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := NginxDeploymentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + return &id, nil +} + +// ParseNginxDeploymentIDInsensitively parses 'input' case-insensitively into a NginxDeploymentId +// note: this method should only be used for API response data and not user input +func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, error) { + parser := resourceids.NewParserFromResourceIdType(NginxDeploymentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := NginxDeploymentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + return &id, nil +} + +// ValidateNginxDeploymentID checks that 'input' can be parsed as a Nginx Deployment ID +func ValidateNginxDeploymentID(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 := ParseNginxDeploymentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Nginx Deployment ID +func (id NginxDeploymentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Nginx.NginxPlus/nginxDeployments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NginxDeploymentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Nginx Deployment ID +func (id NginxDeploymentId) 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("staticNginxNginxPlus", "Nginx.NginxPlus", "Nginx.NginxPlus"), + resourceids.StaticSegment("staticNginxDeployments", "nginxDeployments", "nginxDeployments"), + resourceids.UserSpecifiedSegment("nginxDeploymentName", "nginxDeploymentValue"), + } +} + +// String returns a human-readable description of this Nginx Deployment ID +func (id NginxDeploymentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Nginx Deployment Name: %q", id.NginxDeploymentName), + } + return fmt.Sprintf("Nginx Deployment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationscreateorupdate.go new file mode 100644 index 0000000000000..33e0a6addeea3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationscreateorupdate.go @@ -0,0 +1,74 @@ +package nginxconfiguration + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationsCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// ConfigurationsCreateOrUpdate ... +func (c NginxConfigurationClient) ConfigurationsCreateOrUpdate(ctx context.Context, id ConfigurationId, input NginxConfiguration) (result ConfigurationsCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ConfigurationsCreateOrUpdateThenPoll performs ConfigurationsCreateOrUpdate then polls until it's completed +func (c NginxConfigurationClient) ConfigurationsCreateOrUpdateThenPoll(ctx context.Context, id ConfigurationId, input NginxConfiguration) error { + result, err := c.ConfigurationsCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ConfigurationsCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ConfigurationsCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsdelete.go new file mode 100644 index 0000000000000..37e56e51da779 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsdelete.go @@ -0,0 +1,71 @@ +package nginxconfiguration + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationsDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// ConfigurationsDelete ... +func (c NginxConfigurationClient) ConfigurationsDelete(ctx context.Context, id ConfigurationId) (result ConfigurationsDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ConfigurationsDeleteThenPoll performs ConfigurationsDelete then polls until it's completed +func (c NginxConfigurationClient) ConfigurationsDeleteThenPoll(ctx context.Context, id ConfigurationId) error { + result, err := c.ConfigurationsDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing ConfigurationsDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ConfigurationsDelete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go new file mode 100644 index 0000000000000..159fea219276f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go @@ -0,0 +1,51 @@ +package nginxconfiguration + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationsGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *NginxConfiguration +} + +// ConfigurationsGet ... +func (c NginxConfigurationClient) ConfigurationsGet(ctx context.Context, id ConfigurationId) (result ConfigurationsGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationslist.go new file mode 100644 index 0000000000000..dfa24d256d4b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationslist.go @@ -0,0 +1,89 @@ +package nginxconfiguration + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConfigurationsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NginxConfiguration +} + +type ConfigurationsListCompleteResult struct { + Items []NginxConfiguration +} + +// ConfigurationsList ... +func (c NginxConfigurationClient) ConfigurationsList(ctx context.Context, id NginxDeploymentId) (result ConfigurationsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/configurations", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]NginxConfiguration `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ConfigurationsListComplete retrieves all the results into a single object +func (c NginxConfigurationClient) ConfigurationsListComplete(ctx context.Context, id NginxDeploymentId) (ConfigurationsListCompleteResult, error) { + return c.ConfigurationsListCompleteMatchingPredicate(ctx, id, NginxConfigurationOperationPredicate{}) +} + +// ConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NginxConfigurationClient) ConfigurationsListCompleteMatchingPredicate(ctx context.Context, id NginxDeploymentId, predicate NginxConfigurationOperationPredicate) (result ConfigurationsListCompleteResult, err error) { + items := make([]NginxConfiguration, 0) + + resp, err := c.ConfigurationsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ConfigurationsListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfiguration.go new file mode 100644 index 0000000000000..06645eebbbad6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfiguration.go @@ -0,0 +1,17 @@ +package nginxconfiguration + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxConfiguration struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NginxConfigurationProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationfile.go new file mode 100644 index 0000000000000..127f7ff425a2b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationfile.go @@ -0,0 +1,9 @@ +package nginxconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxConfigurationFile struct { + Content *string `json:"content,omitempty"` + VirtualPath *string `json:"virtualPath,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationpackage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationpackage.go new file mode 100644 index 0000000000000..b247778b53945 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationpackage.go @@ -0,0 +1,9 @@ +package nginxconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxConfigurationPackage struct { + Data *string `json:"data,omitempty"` + ProtectedFiles *[]string `json:"protectedFiles,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationproperties.go new file mode 100644 index 0000000000000..b68a006b58d4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/model_nginxconfigurationproperties.go @@ -0,0 +1,12 @@ +package nginxconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxConfigurationProperties struct { + Files *[]NginxConfigurationFile `json:"files,omitempty"` + Package *NginxConfigurationPackage `json:"package,omitempty"` + ProtectedFiles *[]NginxConfigurationFile `json:"protectedFiles,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RootFile *string `json:"rootFile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/predicates.go new file mode 100644 index 0000000000000..0958a9d2b5d59 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/predicates.go @@ -0,0 +1,32 @@ +package nginxconfiguration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxConfigurationOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p NginxConfigurationOperationPredicate) Matches(input NginxConfiguration) 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/nginx/2023-04-01/nginxconfiguration/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/version.go new file mode 100644 index 0000000000000..fe2596735014b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration/version.go @@ -0,0 +1,12 @@ +package nginxconfiguration + +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 = "2023-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/README.md new file mode 100644 index 0000000000000..514bcc50030df --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/README.md @@ -0,0 +1,116 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment` Documentation + +The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-04-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/nginx/2023-04-01/nginxdeployment" +``` + + +### Client Initialization + +```go +client := nginxdeployment.NewNginxDeploymentClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsCreateOrUpdate` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +payload := nginxdeployment.NginxDeployment{ + // ... +} + + +if err := client.DeploymentsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsDelete` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +if err := client.DeploymentsDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsGet` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +read, err := client.DeploymentsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsList` + +```go +ctx := context.TODO() +id := nginxdeployment.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.DeploymentsList(ctx, id)` can be used to do batched pagination +items, err := client.DeploymentsListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsListByResourceGroup` + +```go +ctx := context.TODO() +id := nginxdeployment.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.DeploymentsListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.DeploymentsListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NginxDeploymentClient.DeploymentsUpdate` + +```go +ctx := context.TODO() +id := nginxdeployment.NewNginxDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "nginxDeploymentValue") + +payload := nginxdeployment.NginxDeploymentUpdateParameters{ + // ... +} + + +if err := client.DeploymentsUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/client.go new file mode 100644 index 0000000000000..7f5e031b02e17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/client.go @@ -0,0 +1,26 @@ +package nginxdeployment + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentClient struct { + Client *resourcemanager.Client +} + +func NewNginxDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxDeploymentClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxdeployment", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating NginxDeploymentClient: %+v", err) + } + + return &NginxDeploymentClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/constants.go new file mode 100644 index 0000000000000..4d2e27c3ab786 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/constants.go @@ -0,0 +1,113 @@ +package nginxdeployment + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxPrivateIPAllocationMethod string + +const ( + NginxPrivateIPAllocationMethodDynamic NginxPrivateIPAllocationMethod = "Dynamic" + NginxPrivateIPAllocationMethodStatic NginxPrivateIPAllocationMethod = "Static" +) + +func PossibleValuesForNginxPrivateIPAllocationMethod() []string { + return []string{ + string(NginxPrivateIPAllocationMethodDynamic), + string(NginxPrivateIPAllocationMethodStatic), + } +} + +func (s *NginxPrivateIPAllocationMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNginxPrivateIPAllocationMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNginxPrivateIPAllocationMethod(input string) (*NginxPrivateIPAllocationMethod, error) { + vals := map[string]NginxPrivateIPAllocationMethod{ + "dynamic": NginxPrivateIPAllocationMethodDynamic, + "static": NginxPrivateIPAllocationMethodStatic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NginxPrivateIPAllocationMethod(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleted), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateNotSpecified), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleted": ProvisioningStateDeleted, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "notspecified": ProvisioningStateNotSpecified, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go new file mode 100644 index 0000000000000..bd5eb587fac5a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go @@ -0,0 +1,127 @@ +package nginxdeployment + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = NginxDeploymentId{} + +// NginxDeploymentId is a struct representing the Resource ID for a Nginx Deployment +type NginxDeploymentId struct { + SubscriptionId string + ResourceGroupName string + NginxDeploymentName string +} + +// NewNginxDeploymentID returns a new NginxDeploymentId struct +func NewNginxDeploymentID(subscriptionId string, resourceGroupName string, nginxDeploymentName string) NginxDeploymentId { + return NginxDeploymentId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + NginxDeploymentName: nginxDeploymentName, + } +} + +// ParseNginxDeploymentID parses 'input' into a NginxDeploymentId +func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { + parser := resourceids.NewParserFromResourceIdType(NginxDeploymentId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := NginxDeploymentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + return &id, nil +} + +// ParseNginxDeploymentIDInsensitively parses 'input' case-insensitively into a NginxDeploymentId +// note: this method should only be used for API response data and not user input +func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, error) { + parser := resourceids.NewParserFromResourceIdType(NginxDeploymentId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + var ok bool + id := NginxDeploymentId{} + + if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) + } + + if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) + } + + if id.NginxDeploymentName, ok = parsed.Parsed["nginxDeploymentName"]; !ok { + return nil, resourceids.NewSegmentNotSpecifiedError(id, "nginxDeploymentName", *parsed) + } + + return &id, nil +} + +// ValidateNginxDeploymentID checks that 'input' can be parsed as a Nginx Deployment ID +func ValidateNginxDeploymentID(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 := ParseNginxDeploymentID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Nginx Deployment ID +func (id NginxDeploymentId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Nginx.NginxPlus/nginxDeployments/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NginxDeploymentName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Nginx Deployment ID +func (id NginxDeploymentId) 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("staticNginxNginxPlus", "Nginx.NginxPlus", "Nginx.NginxPlus"), + resourceids.StaticSegment("staticNginxDeployments", "nginxDeployments", "nginxDeployments"), + resourceids.UserSpecifiedSegment("nginxDeploymentName", "nginxDeploymentValue"), + } +} + +// String returns a human-readable description of this Nginx Deployment ID +func (id NginxDeploymentId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Nginx Deployment Name: %q", id.NginxDeploymentName), + } + return fmt.Sprintf("Nginx Deployment (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentscreateorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentscreateorupdate.go new file mode 100644 index 0000000000000..52a0c650a4085 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentscreateorupdate.go @@ -0,0 +1,74 @@ +package nginxdeployment + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentsCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DeploymentsCreateOrUpdate ... +func (c NginxDeploymentClient) DeploymentsCreateOrUpdate(ctx context.Context, id NginxDeploymentId, input NginxDeployment) (result DeploymentsCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeploymentsCreateOrUpdateThenPoll performs DeploymentsCreateOrUpdate then polls until it's completed +func (c NginxDeploymentClient) DeploymentsCreateOrUpdateThenPoll(ctx context.Context, id NginxDeploymentId, input NginxDeployment) error { + result, err := c.DeploymentsCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DeploymentsCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DeploymentsCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsdelete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsdelete.go new file mode 100644 index 0000000000000..062f299f4a418 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsdelete.go @@ -0,0 +1,71 @@ +package nginxdeployment + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentsDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DeploymentsDelete ... +func (c NginxDeploymentClient) DeploymentsDelete(ctx context.Context, id NginxDeploymentId) (result DeploymentsDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeploymentsDeleteThenPoll performs DeploymentsDelete then polls until it's completed +func (c NginxDeploymentClient) DeploymentsDeleteThenPoll(ctx context.Context, id NginxDeploymentId) error { + result, err := c.DeploymentsDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing DeploymentsDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DeploymentsDelete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go new file mode 100644 index 0000000000000..d9da675e7ce35 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go @@ -0,0 +1,51 @@ +package nginxdeployment + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentsGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *NginxDeployment +} + +// DeploymentsGet ... +func (c NginxDeploymentClient) DeploymentsGet(ctx context.Context, id NginxDeploymentId) (result DeploymentsGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentslist.go new file mode 100644 index 0000000000000..3f74eb011eae2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentslist.go @@ -0,0 +1,90 @@ +package nginxdeployment + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NginxDeployment +} + +type DeploymentsListCompleteResult struct { + Items []NginxDeployment +} + +// DeploymentsList ... +func (c NginxDeploymentClient) DeploymentsList(ctx context.Context, id commonids.SubscriptionId) (result DeploymentsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Nginx.NginxPlus/nginxDeployments", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]NginxDeployment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// DeploymentsListComplete retrieves all the results into a single object +func (c NginxDeploymentClient) DeploymentsListComplete(ctx context.Context, id commonids.SubscriptionId) (DeploymentsListCompleteResult, error) { + return c.DeploymentsListCompleteMatchingPredicate(ctx, id, NginxDeploymentOperationPredicate{}) +} + +// DeploymentsListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NginxDeploymentClient) DeploymentsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NginxDeploymentOperationPredicate) (result DeploymentsListCompleteResult, err error) { + items := make([]NginxDeployment, 0) + + resp, err := c.DeploymentsList(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = DeploymentsListCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentslistbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentslistbyresourcegroup.go new file mode 100644 index 0000000000000..6af8c44b3b4d4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentslistbyresourcegroup.go @@ -0,0 +1,90 @@ +package nginxdeployment + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentsListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NginxDeployment +} + +type DeploymentsListByResourceGroupCompleteResult struct { + Items []NginxDeployment +} + +// DeploymentsListByResourceGroup ... +func (c NginxDeploymentClient) DeploymentsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result DeploymentsListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/providers/Nginx.NginxPlus/nginxDeployments", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]NginxDeployment `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// DeploymentsListByResourceGroupComplete retrieves all the results into a single object +func (c NginxDeploymentClient) DeploymentsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (DeploymentsListByResourceGroupCompleteResult, error) { + return c.DeploymentsListByResourceGroupCompleteMatchingPredicate(ctx, id, NginxDeploymentOperationPredicate{}) +} + +// DeploymentsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NginxDeploymentClient) DeploymentsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NginxDeploymentOperationPredicate) (result DeploymentsListByResourceGroupCompleteResult, err error) { + items := make([]NginxDeployment, 0) + + resp, err := c.DeploymentsListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = DeploymentsListByResourceGroupCompleteResult{ + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsupdate.go new file mode 100644 index 0000000000000..8b0f923809514 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsupdate.go @@ -0,0 +1,74 @@ +package nginxdeployment + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeploymentsUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DeploymentsUpdate ... +func (c NginxDeploymentClient) DeploymentsUpdate(ctx context.Context, id NginxDeploymentId, input NginxDeploymentUpdateParameters) (result DeploymentsUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeploymentsUpdateThenPoll performs DeploymentsUpdate then polls until it's completed +func (c NginxDeploymentClient) DeploymentsUpdateThenPoll(ctx context.Context, id NginxDeploymentId, input NginxDeploymentUpdateParameters) error { + result, err := c.DeploymentsUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DeploymentsUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DeploymentsUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeployment.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeployment.go new file mode 100644 index 0000000000000..25453bf6d8849 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeployment.go @@ -0,0 +1,21 @@ +package nginxdeployment + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeployment struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *NginxDeploymentProperties `json:"properties,omitempty"` + Sku *ResourceSku `json:"sku,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,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/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentproperties.go new file mode 100644 index 0000000000000..a74fcb9959cc5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentproperties.go @@ -0,0 +1,16 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentProperties struct { + EnableDiagnosticsSupport *bool `json:"enableDiagnosticsSupport,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + Logging *NginxLogging `json:"logging,omitempty"` + ManagedResourceGroup *string `json:"managedResourceGroup,omitempty"` + NetworkProfile *NginxNetworkProfile `json:"networkProfile,omitempty"` + NginxVersion *string `json:"nginxVersion,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ScalingProperties *NginxDeploymentScalingProperties `json:"scalingProperties,omitempty"` + UserProfile *NginxDeploymentUserProfile `json:"userProfile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentscalingproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentscalingproperties.go new file mode 100644 index 0000000000000..6465206f672cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentscalingproperties.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentScalingProperties struct { + Capacity *int64 `json:"capacity,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentupdateparameters.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentupdateparameters.go new file mode 100644 index 0000000000000..00b1615d7e056 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentupdateparameters.go @@ -0,0 +1,16 @@ +package nginxdeployment + +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 NginxDeploymentUpdateParameters struct { + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + Properties *NginxDeploymentUpdateProperties `json:"properties,omitempty"` + Sku *ResourceSku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentupdateproperties.go new file mode 100644 index 0000000000000..14d915e59b918 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentupdateproperties.go @@ -0,0 +1,11 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentUpdateProperties struct { + EnableDiagnosticsSupport *bool `json:"enableDiagnosticsSupport,omitempty"` + Logging *NginxLogging `json:"logging,omitempty"` + ScalingProperties *NginxDeploymentScalingProperties `json:"scalingProperties,omitempty"` + UserProfile *NginxDeploymentUserProfile `json:"userProfile,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentuserprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentuserprofile.go new file mode 100644 index 0000000000000..153bfb0e2e1e9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxdeploymentuserprofile.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentUserProfile struct { + PreferredEmail *string `json:"preferredEmail,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxfrontendipconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxfrontendipconfiguration.go new file mode 100644 index 0000000000000..e084038d6903c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxfrontendipconfiguration.go @@ -0,0 +1,9 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxFrontendIPConfiguration struct { + PrivateIPAddresses *[]NginxPrivateIPAddress `json:"privateIPAddresses,omitempty"` + PublicIPAddresses *[]NginxPublicIPAddress `json:"publicIPAddresses,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxlogging.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxlogging.go new file mode 100644 index 0000000000000..c5c8ff18d0579 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxlogging.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxLogging struct { + StorageAccount *NginxStorageAccount `json:"storageAccount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go new file mode 100644 index 0000000000000..b101806aebb6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxnetworkinterfaceconfiguration.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxNetworkInterfaceConfiguration struct { + SubnetId *string `json:"subnetId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxnetworkprofile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxnetworkprofile.go new file mode 100644 index 0000000000000..26ded847b53bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxnetworkprofile.go @@ -0,0 +1,9 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxNetworkProfile struct { + FrontEndIPConfiguration *NginxFrontendIPConfiguration `json:"frontEndIPConfiguration,omitempty"` + NetworkInterfaceConfiguration *NginxNetworkInterfaceConfiguration `json:"networkInterfaceConfiguration,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxprivateipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxprivateipaddress.go new file mode 100644 index 0000000000000..9bce7dba73010 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxprivateipaddress.go @@ -0,0 +1,10 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxPrivateIPAddress struct { + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + PrivateIPAllocationMethod *NginxPrivateIPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + SubnetId *string `json:"subnetId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxpublicipaddress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxpublicipaddress.go new file mode 100644 index 0000000000000..05e8036a6e4a9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxpublicipaddress.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxPublicIPAddress struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxstorageaccount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxstorageaccount.go new file mode 100644 index 0000000000000..f53382105bf94 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_nginxstorageaccount.go @@ -0,0 +1,9 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxStorageAccount struct { + AccountName *string `json:"accountName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_resourcesku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_resourcesku.go new file mode 100644 index 0000000000000..85a9b9b55da80 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/model_resourcesku.go @@ -0,0 +1,8 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSku struct { + Name string `json:"name"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/predicates.go new file mode 100644 index 0000000000000..d1754320d3aa0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/predicates.go @@ -0,0 +1,32 @@ +package nginxdeployment + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NginxDeploymentOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p NginxDeploymentOperationPredicate) Matches(input NginxDeployment) 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/nginx/2023-04-01/nginxdeployment/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/version.go new file mode 100644 index 0000000000000..4b45b7e413de4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment/version.go @@ -0,0 +1,12 @@ +package nginxdeployment + +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 = "2023-04-01" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys.go index 627d1914d56ac..c63e54a1d3f09 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account/method_listkeys.go @@ -26,7 +26,7 @@ func (c AccountClient) ListKeys(ctx context.Context, id AccountId) (result ListK http.StatusOK, }, HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listkeys", id.ID()), + Path: fmt.Sprintf("%s/listKeys", id.ID()), } req, err := c.Client.NewRequest(ctx, opts) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go index 934aad299db0b..36647fbf3818a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go @@ -53,7 +53,7 @@ func (c AppliancesClient) ListKeys(ctx context.Context, id ApplianceId, options http.StatusOK, }, HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listkeys", id.ID()), + Path: fmt.Sprintf("%s/listKeys", id.ID()), OptionsObject: options, } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go index e10e3d2e7e666..388b85b93c8b6 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/application_ids.go @@ -33,6 +33,7 @@ var PublishedApis = map[string]string{ "AzureIotHubDeviceProvisioning": iotHubDeviceProvisioningAppId, "AzureKeyVault": keyVaultAppId, "AzureKubernetesServiceAadServer": kubernetesServiceAadServerAppId, + "AzureLinuxVirtualMachineSignIn": azureLinuxVmSignIn, "AzureMaps": mapsAppId, "AzureMediaServices": mediaServicesAppId, "AzurePortal": portalAppId, @@ -48,6 +49,7 @@ var PublishedApis = map[string]string{ "AzureSynapseStudio": synapseStudioAppId, "AzureTimeSeriesInsights": timeSeriesInsightsAppId, "AzureVPN": azureVPNAppId, + "AzureWindowsVirtualMachineSignIn": azureWindowsVmSignIn, "Bing": bingAppId, "BotFrameworkDevPortal": botFrameworkDevPortalAppId, "BranchConnectWebService": branchConnectWebServiceAppId, @@ -79,6 +81,7 @@ var PublishedApis = map[string]string{ "Microsoft365DataAtRestEncryption": microsoft365DataAtRestEncryptionAppId, "MicrosoftAzureCli": microsoftAzureCliAppId, "MicrosoftGraph": microsoftGraphAppId, + "MicrosoftIntuneEnrollment": microsoftIntuneEnrollment, "MicrosoftInvoicing": microsoftInvoicingAppId, "MicrosoftOffice": microsoftOfficeAppId, "MicrosoftStorageSync": microsoftStorageSyncAppId, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go index a15c4c044493a..1459fc7e79866 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/constants.go @@ -13,6 +13,8 @@ const azureAdIdentityGovernanceInsightsAppId = "58c746b0-a0b0-4647-a8f6-12dde598 const azureAdIntegratedAppAppId = "af47b99c-8954-4b45-ab68-8121157418ef" const azureAdNotificationAppId = "fc03f97a-9db0-4627-a216-ec98ce54e018" const azureDevOpsAppId = "499b84ac-1321-427f-aa17-267ca6975798" +const azureLinuxVmSignIn = "ce6ff14a-7fdc-4685-bbe0-f6afdfcfa8e0" +const azureWindowsVmSignIn = "372140e0-b3b7-4226-8ef9-d57986796201" const azureServiceManagementAppId = "797f4846-ba00-4fd7-ba43-dac1f8f63013" const azureVPNAppId = "41b23e61-6c1e-4545-b367-cd054e0ed4b4" const batchAppId = "ddbf3205-c6bd-46ae-8127-60eb93363864" @@ -62,6 +64,7 @@ const microsoft365DataAtRestEncryptionAppId = "c066d759-24ae-40e7-a56f-027002b5d const microsoftAzureCliAppId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46" const microsoftGraphAppId = "00000003-0000-0000-c000-000000000000" const microsoftInvoicingAppId = "b6b84568-6c01-4981-a80f-09da9a20bbed" +const microsoftIntuneEnrollment = "d4ebce55-015a-49b5-a083-c84d1797ae8c" const microsoftOfficeAppId = "d3590ed6-52b3-4102-aeff-aad2292ab01c" const microsoftStorageSyncAppId = "9469b9f5-6722-4481-a2b2-14ed560b706f" const microsoftTeamsAppId = "1fec8e78-bce4-4aaf-ab1b-5451cc387264" diff --git a/vendor/modules.txt b/vendor/modules.txt index 5ac0dce13de82..0dadfa6470f78 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -156,7 +156,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk v0.20230918.1115907 +# github.com/hashicorp/go-azure-sdk v0.20231005.1153009 ## explicit; go 1.19 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview @@ -744,6 +744,10 @@ github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2022-08-01 github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2022-08-01/nginxcertificate github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2022-08-01/nginxconfiguration github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2022-08-01/nginxdeployment +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01 +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration +github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries