diff --git a/internal/services/containerapps/client/client.go b/internal/services/containerapps/client/client.go index 6818cc353bee..be9f2bf04aa2 100644 --- a/internal/services/containerapps/client/client.go +++ b/internal/services/containerapps/client/client.go @@ -10,8 +10,8 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedenvironments" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/containerapps/container_app_job_resource.go b/internal/services/containerapps/container_app_job_resource.go index 62a7017a9271..7b4fa4ee12da 100644 --- a/internal/services/containerapps/container_app_job_resource.go +++ b/internal/services/containerapps/container_app_job_resource.go @@ -16,8 +16,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-provider-azurerm/internal/features" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" diff --git a/internal/services/containerapps/container_app_job_resource_test.go b/internal/services/containerapps/container_app_job_resource_test.go index 396587e7f36c..8c0be8b5e9df 100644 --- a/internal/services/containerapps/container_app_job_resource_test.go +++ b/internal/services/containerapps/container_app_job_resource_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/containerapps/helpers/container_app_job.go b/internal/services/containerapps/helpers/container_app_job.go index dda8bc847394..dcd83c005e8f 100644 --- a/internal/services/containerapps/helpers/container_app_job.go +++ b/internal/services/containerapps/helpers/container_app_job.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/go-azure-helpers/lang/pointer" - "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs" + "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" ) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/README.md new file mode 100644 index 000000000000..e379a74954c3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/README.md @@ -0,0 +1,261 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs` Documentation + +The `jobs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs" +``` + + +### Client Initialization + +```go +client := jobs.NewJobsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `JobsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +payload := jobs.Job{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.Delete` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.ExecutionsList` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +// alternatively `client.ExecutionsList(ctx, id, jobs.DefaultExecutionsListOperationOptions())` can be used to do batched pagination +items, err := client.ExecutionsListComplete(ctx, id, jobs.DefaultExecutionsListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.Get` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.GetDetector` + +```go +ctx := context.TODO() +id := jobs.NewDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue", "detectorValue") + +read, err := client.GetDetector(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.JobExecution` + +```go +ctx := context.TODO() +id := jobs.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue", "executionValue") + +read, err := client.JobExecution(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.ListDetectors` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +// alternatively `client.ListDetectors(ctx, id)` can be used to do batched pagination +items, err := client.ListDetectorsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.ListSecrets` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +read, err := client.ListSecrets(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.ProxyGet` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +read, err := client.ProxyGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `JobsClient.Start` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +payload := jobs.JobExecutionTemplate{ + // ... +} + + +if err := client.StartThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.StopExecution` + +```go +ctx := context.TODO() +id := jobs.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue", "executionValue") + +if err := client.StopExecutionThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `JobsClient.StopMultipleExecutions` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +// alternatively `client.StopMultipleExecutions(ctx, id)` can be used to do batched pagination +items, err := client.StopMultipleExecutionsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `JobsClient.Update` + +```go +ctx := context.TODO() +id := jobs.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jobValue") + +payload := jobs.JobPatchProperties{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/client.go new file mode 100644 index 000000000000..f89b0c72db7b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/client.go @@ -0,0 +1,26 @@ +package jobs + +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 JobsClient struct { + Client *resourcemanager.Client +} + +func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating JobsClient: %+v", err) + } + + return &JobsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/constants.go new file mode 100644 index 000000000000..c3726796349f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/constants.go @@ -0,0 +1,421 @@ +package jobs + +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 ExtendedLocationTypes string + +const ( + ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation" +) + +func PossibleValuesForExtendedLocationTypes() []string { + return []string{ + string(ExtendedLocationTypesCustomLocation), + } +} + +func (s *ExtendedLocationTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExtendedLocationTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExtendedLocationTypes(input string) (*ExtendedLocationTypes, error) { + vals := map[string]ExtendedLocationTypes{ + "customlocation": ExtendedLocationTypesCustomLocation, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExtendedLocationTypes(input) + return &out, nil +} + +type IdentitySettingsLifeCycle string + +const ( + IdentitySettingsLifeCycleAll IdentitySettingsLifeCycle = "All" + IdentitySettingsLifeCycleInit IdentitySettingsLifeCycle = "Init" + IdentitySettingsLifeCycleMain IdentitySettingsLifeCycle = "Main" + IdentitySettingsLifeCycleNone IdentitySettingsLifeCycle = "None" +) + +func PossibleValuesForIdentitySettingsLifeCycle() []string { + return []string{ + string(IdentitySettingsLifeCycleAll), + string(IdentitySettingsLifeCycleInit), + string(IdentitySettingsLifeCycleMain), + string(IdentitySettingsLifeCycleNone), + } +} + +func (s *IdentitySettingsLifeCycle) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIdentitySettingsLifeCycle(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIdentitySettingsLifeCycle(input string) (*IdentitySettingsLifeCycle, error) { + vals := map[string]IdentitySettingsLifeCycle{ + "all": IdentitySettingsLifeCycleAll, + "init": IdentitySettingsLifeCycleInit, + "main": IdentitySettingsLifeCycleMain, + "none": IdentitySettingsLifeCycleNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IdentitySettingsLifeCycle(input) + return &out, nil +} + +type ImageType string + +const ( + ImageTypeCloudBuild ImageType = "CloudBuild" + ImageTypeContainerImage ImageType = "ContainerImage" +) + +func PossibleValuesForImageType() []string { + return []string{ + string(ImageTypeCloudBuild), + string(ImageTypeContainerImage), + } +} + +func (s *ImageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseImageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseImageType(input string) (*ImageType, error) { + vals := map[string]ImageType{ + "cloudbuild": ImageTypeCloudBuild, + "containerimage": ImageTypeContainerImage, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ImageType(input) + return &out, nil +} + +type JobExecutionRunningState string + +const ( + JobExecutionRunningStateDegraded JobExecutionRunningState = "Degraded" + JobExecutionRunningStateFailed JobExecutionRunningState = "Failed" + JobExecutionRunningStateProcessing JobExecutionRunningState = "Processing" + JobExecutionRunningStateRunning JobExecutionRunningState = "Running" + JobExecutionRunningStateStopped JobExecutionRunningState = "Stopped" + JobExecutionRunningStateSucceeded JobExecutionRunningState = "Succeeded" + JobExecutionRunningStateUnknown JobExecutionRunningState = "Unknown" +) + +func PossibleValuesForJobExecutionRunningState() []string { + return []string{ + string(JobExecutionRunningStateDegraded), + string(JobExecutionRunningStateFailed), + string(JobExecutionRunningStateProcessing), + string(JobExecutionRunningStateRunning), + string(JobExecutionRunningStateStopped), + string(JobExecutionRunningStateSucceeded), + string(JobExecutionRunningStateUnknown), + } +} + +func (s *JobExecutionRunningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseJobExecutionRunningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseJobExecutionRunningState(input string) (*JobExecutionRunningState, error) { + vals := map[string]JobExecutionRunningState{ + "degraded": JobExecutionRunningStateDegraded, + "failed": JobExecutionRunningStateFailed, + "processing": JobExecutionRunningStateProcessing, + "running": JobExecutionRunningStateRunning, + "stopped": JobExecutionRunningStateStopped, + "succeeded": JobExecutionRunningStateSucceeded, + "unknown": JobExecutionRunningStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobExecutionRunningState(input) + return &out, nil +} + +type JobProvisioningState string + +const ( + JobProvisioningStateCanceled JobProvisioningState = "Canceled" + JobProvisioningStateDeleting JobProvisioningState = "Deleting" + JobProvisioningStateFailed JobProvisioningState = "Failed" + JobProvisioningStateInProgress JobProvisioningState = "InProgress" + JobProvisioningStateSucceeded JobProvisioningState = "Succeeded" +) + +func PossibleValuesForJobProvisioningState() []string { + return []string{ + string(JobProvisioningStateCanceled), + string(JobProvisioningStateDeleting), + string(JobProvisioningStateFailed), + string(JobProvisioningStateInProgress), + string(JobProvisioningStateSucceeded), + } +} + +func (s *JobProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseJobProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseJobProvisioningState(input string) (*JobProvisioningState, error) { + vals := map[string]JobProvisioningState{ + "canceled": JobProvisioningStateCanceled, + "deleting": JobProvisioningStateDeleting, + "failed": JobProvisioningStateFailed, + "inprogress": JobProvisioningStateInProgress, + "succeeded": JobProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := JobProvisioningState(input) + return &out, nil +} + +type Scheme string + +const ( + SchemeHTTP Scheme = "HTTP" + SchemeHTTPS Scheme = "HTTPS" +) + +func PossibleValuesForScheme() []string { + return []string{ + string(SchemeHTTP), + string(SchemeHTTPS), + } +} + +func (s *Scheme) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScheme(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScheme(input string) (*Scheme, error) { + vals := map[string]Scheme{ + "http": SchemeHTTP, + "https": SchemeHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Scheme(input) + return &out, nil +} + +type StorageType string + +const ( + StorageTypeAzureFile StorageType = "AzureFile" + StorageTypeEmptyDir StorageType = "EmptyDir" + StorageTypeNfsAzureFile StorageType = "NfsAzureFile" + StorageTypeSecret StorageType = "Secret" + StorageTypeSmb StorageType = "Smb" +) + +func PossibleValuesForStorageType() []string { + return []string{ + string(StorageTypeAzureFile), + string(StorageTypeEmptyDir), + string(StorageTypeNfsAzureFile), + string(StorageTypeSecret), + string(StorageTypeSmb), + } +} + +func (s *StorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageType(input string) (*StorageType, error) { + vals := map[string]StorageType{ + "azurefile": StorageTypeAzureFile, + "emptydir": StorageTypeEmptyDir, + "nfsazurefile": StorageTypeNfsAzureFile, + "secret": StorageTypeSecret, + "smb": StorageTypeSmb, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageType(input) + return &out, nil +} + +type TriggerType string + +const ( + TriggerTypeEvent TriggerType = "Event" + TriggerTypeManual TriggerType = "Manual" + TriggerTypeSchedule TriggerType = "Schedule" +) + +func PossibleValuesForTriggerType() []string { + return []string{ + string(TriggerTypeEvent), + string(TriggerTypeManual), + string(TriggerTypeSchedule), + } +} + +func (s *TriggerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTriggerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTriggerType(input string) (*TriggerType, error) { + vals := map[string]TriggerType{ + "event": TriggerTypeEvent, + "manual": TriggerTypeManual, + "schedule": TriggerTypeSchedule, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TriggerType(input) + return &out, nil +} + +type Type string + +const ( + TypeLiveness Type = "Liveness" + TypeReadiness Type = "Readiness" + TypeStartup Type = "Startup" +) + +func PossibleValuesForType() []string { + return []string{ + string(TypeLiveness), + string(TypeReadiness), + string(TypeStartup), + } +} + +func (s *Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseType(input string) (*Type, error) { + vals := map[string]Type{ + "liveness": TypeLiveness, + "readiness": TypeReadiness, + "startup": TypeStartup, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Type(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go new file mode 100644 index 000000000000..778152219f6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go @@ -0,0 +1,139 @@ +package jobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&DetectorId{}) +} + +var _ resourceids.ResourceId = &DetectorId{} + +// DetectorId is a struct representing the Resource ID for a Detector +type DetectorId struct { + SubscriptionId string + ResourceGroupName string + JobName string + DetectorName string +} + +// NewDetectorID returns a new DetectorId struct +func NewDetectorID(subscriptionId string, resourceGroupName string, jobName string, detectorName string) DetectorId { + return DetectorId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + JobName: jobName, + DetectorName: detectorName, + } +} + +// ParseDetectorID parses 'input' into a DetectorId +func ParseDetectorID(input string) (*DetectorId, error) { + parser := resourceids.NewParserFromResourceIdType(&DetectorId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DetectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDetectorIDInsensitively parses 'input' case-insensitively into a DetectorId +// note: this method should only be used for API response data and not user input +func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { + parser := resourceids.NewParserFromResourceIdType(&DetectorId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DetectorId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DetectorId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) + } + + if id.DetectorName, ok = input.Parsed["detectorName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "detectorName", input) + } + + return nil +} + +// ValidateDetectorID checks that 'input' can be parsed as a Detector ID +func ValidateDetectorID(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 := ParseDetectorID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Detector ID +func (id DetectorId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/jobs/%s/detectors/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.JobName, id.DetectorName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Detector ID +func (id DetectorId) 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("staticMicrosoftApp", "Microsoft.App", "Microsoft.App"), + resourceids.StaticSegment("staticJobs", "jobs", "jobs"), + resourceids.UserSpecifiedSegment("jobName", "jobValue"), + resourceids.StaticSegment("staticDetectors", "detectors", "detectors"), + resourceids.UserSpecifiedSegment("detectorName", "detectorValue"), + } +} + +// String returns a human-readable description of this Detector ID +func (id DetectorId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Job Name: %q", id.JobName), + fmt.Sprintf("Detector Name: %q", id.DetectorName), + } + return fmt.Sprintf("Detector (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go new file mode 100644 index 000000000000..252582285a74 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go @@ -0,0 +1,139 @@ +package jobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ExecutionId{}) +} + +var _ resourceids.ResourceId = &ExecutionId{} + +// ExecutionId is a struct representing the Resource ID for a Execution +type ExecutionId struct { + SubscriptionId string + ResourceGroupName string + JobName string + ExecutionName string +} + +// NewExecutionID returns a new ExecutionId struct +func NewExecutionID(subscriptionId string, resourceGroupName string, jobName string, executionName string) ExecutionId { + return ExecutionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + JobName: jobName, + ExecutionName: executionName, + } +} + +// ParseExecutionID parses 'input' into a ExecutionId +func ParseExecutionID(input string) (*ExecutionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExecutionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExecutionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseExecutionIDInsensitively parses 'input' case-insensitively into a ExecutionId +// note: this method should only be used for API response data and not user input +func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { + parser := resourceids.NewParserFromResourceIdType(&ExecutionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ExecutionId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ExecutionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) + } + + if id.ExecutionName, ok = input.Parsed["executionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "executionName", input) + } + + return nil +} + +// ValidateExecutionID checks that 'input' can be parsed as a Execution ID +func ValidateExecutionID(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 := ParseExecutionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Execution ID +func (id ExecutionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/jobs/%s/executions/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.JobName, id.ExecutionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Execution ID +func (id ExecutionId) 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("staticMicrosoftApp", "Microsoft.App", "Microsoft.App"), + resourceids.StaticSegment("staticJobs", "jobs", "jobs"), + resourceids.UserSpecifiedSegment("jobName", "jobValue"), + resourceids.StaticSegment("staticExecutions", "executions", "executions"), + resourceids.UserSpecifiedSegment("executionName", "executionValue"), + } +} + +// String returns a human-readable description of this Execution ID +func (id ExecutionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Job Name: %q", id.JobName), + fmt.Sprintf("Execution Name: %q", id.ExecutionName), + } + return fmt.Sprintf("Execution (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go new file mode 100644 index 000000000000..818f9f6aa828 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go @@ -0,0 +1,130 @@ +package jobs + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&JobId{}) +} + +var _ resourceids.ResourceId = &JobId{} + +// JobId is a struct representing the Resource ID for a Job +type JobId struct { + SubscriptionId string + ResourceGroupName string + JobName string +} + +// NewJobID returns a new JobId struct +func NewJobID(subscriptionId string, resourceGroupName string, jobName string) JobId { + return JobId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + JobName: jobName, + } +} + +// ParseJobID parses 'input' into a JobId +func ParseJobID(input string) (*JobId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseJobIDInsensitively parses 'input' case-insensitively into a JobId +// note: this method should only be used for API response data and not user input +func ParseJobIDInsensitively(input string) (*JobId, error) { + parser := resourceids.NewParserFromResourceIdType(&JobId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := JobId{} + if err := id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *JobId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.JobName, ok = input.Parsed["jobName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "jobName", input) + } + + return nil +} + +// ValidateJobID checks that 'input' can be parsed as a Job ID +func ValidateJobID(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 := ParseJobID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Job ID +func (id JobId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/jobs/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.JobName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Job ID +func (id JobId) 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("staticMicrosoftApp", "Microsoft.App", "Microsoft.App"), + resourceids.StaticSegment("staticJobs", "jobs", "jobs"), + resourceids.UserSpecifiedSegment("jobName", "jobValue"), + } +} + +// String returns a human-readable description of this Job ID +func (id JobId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Job Name: %q", id.JobName), + } + return fmt.Sprintf("Job (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_createorupdate.go new file mode 100644 index 000000000000..ef6e9f361f53 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_createorupdate.go @@ -0,0 +1,75 @@ +package jobs + +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 CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// CreateOrUpdate ... +func (c JobsClient) CreateOrUpdate(ctx context.Context, id JobId, input Job) (result CreateOrUpdateOperationResponse, 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 +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c JobsClient) CreateOrUpdateThenPoll(ctx context.Context, id JobId, input Job) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_delete.go new file mode 100644 index 000000000000..8523d87d6af9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_delete.go @@ -0,0 +1,71 @@ +package jobs + +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 DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c JobsClient) Delete(ctx context.Context, id JobId) (result DeleteOperationResponse, 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 +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c JobsClient) DeleteThenPoll(ctx context.Context, id JobId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go new file mode 100644 index 000000000000..8032ccc4ee22 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go @@ -0,0 +1,133 @@ +package jobs + +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 ExecutionsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]JobExecution +} + +type ExecutionsListCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobExecution +} + +type ExecutionsListOperationOptions struct { + Filter *string +} + +func DefaultExecutionsListOperationOptions() ExecutionsListOperationOptions { + return ExecutionsListOperationOptions{} +} + +func (o ExecutionsListOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o ExecutionsListOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + return &out +} + +func (o ExecutionsListOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Filter != nil { + out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) + } + return &out +} + +type ExecutionsListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ExecutionsListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ExecutionsList ... +func (c JobsClient) ExecutionsList(ctx context.Context, id JobId, options ExecutionsListOperationOptions) (result ExecutionsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &ExecutionsListCustomPager{}, + Path: fmt.Sprintf("%s/executions", 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 *[]JobExecution `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ExecutionsListComplete retrieves all the results into a single object +func (c JobsClient) ExecutionsListComplete(ctx context.Context, id JobId, options ExecutionsListOperationOptions) (ExecutionsListCompleteResult, error) { + return c.ExecutionsListCompleteMatchingPredicate(ctx, id, options, JobExecutionOperationPredicate{}) +} + +// ExecutionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ExecutionsListCompleteMatchingPredicate(ctx context.Context, id JobId, options ExecutionsListOperationOptions, predicate JobExecutionOperationPredicate) (result ExecutionsListCompleteResult, err error) { + items := make([]JobExecution, 0) + + resp, err := c.ExecutionsList(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ExecutionsListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go new file mode 100644 index 000000000000..3e21435af338 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go @@ -0,0 +1,54 @@ +package jobs + +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 GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// Get ... +func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationResponse, 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 + } + + var model Job + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go new file mode 100644 index 000000000000..548f39c53699 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go @@ -0,0 +1,54 @@ +package jobs + +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 GetDetectorOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Diagnostics +} + +// GetDetector ... +func (c JobsClient) GetDetector(ctx context.Context, id DetectorId) (result GetDetectorOperationResponse, 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 + } + + var model Diagnostics + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go new file mode 100644 index 000000000000..910aedeff62c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go @@ -0,0 +1,54 @@ +package jobs + +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 JobExecutionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobExecution +} + +// JobExecution ... +func (c JobsClient) JobExecution(ctx context.Context, id ExecutionId) (result JobExecutionOperationResponse, 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 + } + + var model JobExecution + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbyresourcegroup.go new file mode 100644 index 000000000000..0596f8a764b5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package jobs + +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 ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Job +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []Job +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c JobsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.App/jobs", 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 *[]Job `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c JobsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, JobOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate JobOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Job, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbysubscription.go new file mode 100644 index 000000000000..682abb825f0a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listbysubscription.go @@ -0,0 +1,106 @@ +package jobs + +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 ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Job +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []Job +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c JobsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.App/jobs", 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 *[]Job `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c JobsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, JobOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate JobOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]Job, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listdetectors.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listdetectors.go new file mode 100644 index 000000000000..ce52fa3e8b65 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listdetectors.go @@ -0,0 +1,105 @@ +package jobs + +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 ListDetectorsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Diagnostics +} + +type ListDetectorsCompleteResult struct { + LatestHttpResponse *http.Response + Items []Diagnostics +} + +type ListDetectorsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListDetectorsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListDetectors ... +func (c JobsClient) ListDetectors(ctx context.Context, id JobId) (result ListDetectorsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListDetectorsCustomPager{}, + Path: fmt.Sprintf("%s/detectors", 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 *[]Diagnostics `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListDetectorsComplete retrieves all the results into a single object +func (c JobsClient) ListDetectorsComplete(ctx context.Context, id JobId) (ListDetectorsCompleteResult, error) { + return c.ListDetectorsCompleteMatchingPredicate(ctx, id, DiagnosticsOperationPredicate{}) +} + +// ListDetectorsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c JobsClient) ListDetectorsCompleteMatchingPredicate(ctx context.Context, id JobId, predicate DiagnosticsOperationPredicate) (result ListDetectorsCompleteResult, err error) { + items := make([]Diagnostics, 0) + + resp, err := c.ListDetectors(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListDetectorsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go new file mode 100644 index 000000000000..33fe668d3c9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go @@ -0,0 +1,55 @@ +package jobs + +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 ListSecretsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *JobSecretsCollection +} + +// ListSecrets ... +func (c JobsClient) ListSecrets(ctx context.Context, id JobId) (result ListSecretsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/listSecrets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model JobSecretsCollection + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go new file mode 100644 index 000000000000..278f2840fda2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go @@ -0,0 +1,55 @@ +package jobs + +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 ProxyGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// ProxyGet ... +func (c JobsClient) ProxyGet(ctx context.Context, id JobId) (result ProxyGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/detectorProperties/rootApi", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Job + result.Model = &model + + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_start.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_start.go new file mode 100644 index 000000000000..9be83c5ebf07 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_start.go @@ -0,0 +1,75 @@ +package jobs + +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 StartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *JobExecutionBase +} + +// Start ... +func (c JobsClient) Start(ctx context.Context, id JobId, input JobExecutionTemplate) (result StartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", 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 +} + +// StartThenPoll performs Start then polls until it's completed +func (c JobsClient) StartThenPoll(ctx context.Context, id JobId, input JobExecutionTemplate) error { + result, err := c.Start(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopexecution.go new file mode 100644 index 000000000000..47c37cf69a74 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopexecution.go @@ -0,0 +1,70 @@ +package jobs + +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 StopExecutionOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// StopExecution ... +func (c JobsClient) StopExecution(ctx context.Context, id ExecutionId) (result StopExecutionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", 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 +} + +// StopExecutionThenPoll performs StopExecution then polls until it's completed +func (c JobsClient) StopExecutionThenPoll(ctx context.Context, id ExecutionId) error { + result, err := c.StopExecution(ctx, id) + if err != nil { + return fmt.Errorf("performing StopExecution: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopExecution: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopmultipleexecutions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopmultipleexecutions.go new file mode 100644 index 000000000000..415f7ddca742 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_stopmultipleexecutions.go @@ -0,0 +1,89 @@ +package jobs + +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 StopMultipleExecutionsOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *[]JobExecution +} + +type StopMultipleExecutionsCompleteResult struct { + LatestHttpResponse *http.Response + Items []JobExecution +} + +type StopMultipleExecutionsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *StopMultipleExecutionsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// StopMultipleExecutions ... +func (c JobsClient) StopMultipleExecutions(ctx context.Context, id JobId) (result StopMultipleExecutionsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &StopMultipleExecutionsCustomPager{}, + Path: fmt.Sprintf("%s/stop", 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 +} + +// StopMultipleExecutionsThenPoll performs StopMultipleExecutions then polls until it's completed +func (c JobsClient) StopMultipleExecutionsThenPoll(ctx context.Context, id JobId) error { + result, err := c.StopMultipleExecutions(ctx, id) + if err != nil { + return fmt.Errorf("performing StopMultipleExecutions: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after StopMultipleExecutions: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_update.go new file mode 100644 index 000000000000..b88a194a95e0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/method_update.go @@ -0,0 +1,75 @@ +package jobs + +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 UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Job +} + +// Update ... +func (c JobsClient) Update(ctx context.Context, id JobId, input JobPatchProperties) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + 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 +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c JobsClient) UpdateThenPoll(ctx context.Context, id JobId, input JobPatchProperties) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_basecontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_basecontainer.go new file mode 100644 index 000000000000..23c8738457a6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_basecontainer.go @@ -0,0 +1,15 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BaseContainer struct { + Args *[]string `json:"args,omitempty"` + Command *[]string `json:"command,omitempty"` + Env *[]EnvironmentVar `json:"env,omitempty"` + Image *string `json:"image,omitempty"` + ImageType *ImageType `json:"imageType,omitempty"` + Name *string `json:"name,omitempty"` + Resources *ContainerResources `json:"resources,omitempty"` + VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_container.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_container.go new file mode 100644 index 000000000000..c6450177a71f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_container.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Container struct { + Args *[]string `json:"args,omitempty"` + Command *[]string `json:"command,omitempty"` + Env *[]EnvironmentVar `json:"env,omitempty"` + Image *string `json:"image,omitempty"` + ImageType *ImageType `json:"imageType,omitempty"` + Name *string `json:"name,omitempty"` + Probes *[]ContainerAppProbe `json:"probes,omitempty"` + Resources *ContainerResources `json:"resources,omitempty"` + VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobe.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobe.go new file mode 100644 index 000000000000..e89f40cc8974 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobe.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbe struct { + FailureThreshold *int64 `json:"failureThreshold,omitempty"` + HTTPGet *ContainerAppProbeHTTPGet `json:"httpGet,omitempty"` + InitialDelaySeconds *int64 `json:"initialDelaySeconds,omitempty"` + PeriodSeconds *int64 `json:"periodSeconds,omitempty"` + SuccessThreshold *int64 `json:"successThreshold,omitempty"` + TcpSocket *ContainerAppProbeTcpSocket `json:"tcpSocket,omitempty"` + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` + Type *Type `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpget.go new file mode 100644 index 000000000000..1ab675e45931 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpget.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbeHTTPGet struct { + HTTPHeaders *[]ContainerAppProbeHTTPGetHTTPHeadersInlined `json:"httpHeaders,omitempty"` + Host *string `json:"host,omitempty"` + Path *string `json:"path,omitempty"` + Port int64 `json:"port"` + Scheme *Scheme `json:"scheme,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpgethttpheadersinlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpgethttpheadersinlined.go new file mode 100644 index 000000000000..becc34945ce1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobehttpgethttpheadersinlined.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbeHTTPGetHTTPHeadersInlined struct { + Name string `json:"name"` + Value string `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobetcpsocket.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobetcpsocket.go new file mode 100644 index 000000000000..e9e583e39825 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerappprobetcpsocket.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerAppProbeTcpSocket struct { + Host *string `json:"host,omitempty"` + Port int64 `json:"port"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerexecutionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerexecutionstatus.go new file mode 100644 index 000000000000..cbd0c355a4db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerexecutionstatus.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerExecutionStatus struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + Code *int64 `json:"code,omitempty"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerresources.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerresources.go new file mode 100644 index 000000000000..f48b9f767864 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_containerresources.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContainerResources struct { + Cpu *float64 `json:"cpu,omitempty"` + EphemeralStorage *string `json:"ephemeralStorage,omitempty"` + Memory *string `json:"memory,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadata.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadata.go new file mode 100644 index 000000000000..06c119bbae19 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadata.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataProviderMetadata struct { + PropertyBag *[]DiagnosticDataProviderMetadataPropertyBagInlined `json:"propertyBag,omitempty"` + ProviderName *string `json:"providerName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadatapropertybaginlined.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadatapropertybaginlined.go new file mode 100644 index 000000000000..04a6fbcd52e8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdataprovidermetadatapropertybaginlined.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataProviderMetadataPropertyBagInlined struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponsecolumn.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponsecolumn.go new file mode 100644 index 000000000000..a26027ca6135 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponsecolumn.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataTableResponseColumn struct { + ColumnName *string `json:"columnName,omitempty"` + ColumnType *string `json:"columnType,omitempty"` + DataType *string `json:"dataType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponseobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponseobject.go new file mode 100644 index 000000000000..b69b892b9ed5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticdatatableresponseobject.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticDataTableResponseObject struct { + Columns *[]DiagnosticDataTableResponseColumn `json:"columns,omitempty"` + Rows *[]interface{} `json:"rows,omitempty"` + TableName *string `json:"tableName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticrendering.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticrendering.go new file mode 100644 index 000000000000..157c4b308353 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticrendering.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticRendering struct { + Description *string `json:"description,omitempty"` + IsVisible *bool `json:"isVisible,omitempty"` + Title *string `json:"title,omitempty"` + Type *int64 `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnostics.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnostics.go new file mode 100644 index 000000000000..7ae29be0ad6c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnostics.go @@ -0,0 +1,16 @@ +package jobs + +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 Diagnostics struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DiagnosticsProperties `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/containerapps/2024-02-02-preview/jobs/model_diagnosticsdataapiresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdataapiresponse.go new file mode 100644 index 000000000000..57329a4aea36 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdataapiresponse.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsDataApiResponse struct { + RenderingProperties *DiagnosticRendering `json:"renderingProperties,omitempty"` + Table *DiagnosticDataTableResponseObject `json:"table,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdefinition.go new file mode 100644 index 000000000000..9ffb303aaae9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsdefinition.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsDefinition struct { + AnalysisTypes *[]string `json:"analysisTypes,omitempty"` + Author *string `json:"author,omitempty"` + Category *string `json:"category,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Score *float64 `json:"score,omitempty"` + SupportTopicList *[]DiagnosticSupportTopic `json:"supportTopicList,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsproperties.go new file mode 100644 index 000000000000..a6012a1a0dd3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsproperties.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsProperties struct { + DataProviderMetadata *DiagnosticDataProviderMetadata `json:"dataProviderMetadata,omitempty"` + Dataset *[]DiagnosticsDataApiResponse `json:"dataset,omitempty"` + Metadata *DiagnosticsDefinition `json:"metadata,omitempty"` + Status *DiagnosticsStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsstatus.go new file mode 100644 index 000000000000..0ff1fe8b90c6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsstatus.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsStatus struct { + Message *string `json:"message,omitempty"` + StatusId *int64 `json:"statusId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsupporttopic.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsupporttopic.go new file mode 100644 index 000000000000..a68cb40cb631 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_diagnosticsupporttopic.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticSupportTopic struct { + Id *string `json:"id,omitempty"` + PesId *string `json:"pesId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_environmentvar.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_environmentvar.go new file mode 100644 index 000000000000..ca2a887d4a46 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_environmentvar.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnvironmentVar struct { + Name *string `json:"name,omitempty"` + SecretRef *string `json:"secretRef,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_executionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_executionstatus.go new file mode 100644 index 000000000000..f4aec8ead086 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_executionstatus.go @@ -0,0 +1,8 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutionStatus struct { + Replicas *[]ReplicaExecutionStatus `json:"replicas,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_extendedlocation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_extendedlocation.go new file mode 100644 index 000000000000..590cc4c7cfcb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_extendedlocation.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExtendedLocation struct { + Name *string `json:"name,omitempty"` + Type *ExtendedLocationTypes `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_identitysettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_identitysettings.go new file mode 100644 index 000000000000..8ab254c0e993 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_identitysettings.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IdentitySettings struct { + Identity string `json:"identity"` + Lifecycle *IdentitySettingsLifeCycle `json:"lifecycle,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_job.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_job.go new file mode 100644 index 000000000000..5401e2712747 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_job.go @@ -0,0 +1,21 @@ +package jobs + +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 Job struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Id *string `json:"id,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *JobProperties `json:"properties,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/containerapps/2024-02-02-preview/jobs/model_jobconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfiguration.go new file mode 100644 index 000000000000..a440282f0694 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfiguration.go @@ -0,0 +1,16 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfiguration struct { + EventTriggerConfig *JobConfigurationEventTriggerConfig `json:"eventTriggerConfig,omitempty"` + IdentitySettings *[]IdentitySettings `json:"identitySettings,omitempty"` + ManualTriggerConfig *JobConfigurationManualTriggerConfig `json:"manualTriggerConfig,omitempty"` + Registries *[]RegistryCredentials `json:"registries,omitempty"` + ReplicaRetryLimit *int64 `json:"replicaRetryLimit,omitempty"` + ReplicaTimeout int64 `json:"replicaTimeout"` + ScheduleTriggerConfig *JobConfigurationScheduleTriggerConfig `json:"scheduleTriggerConfig,omitempty"` + Secrets *[]Secret `json:"secrets,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationeventtriggerconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationeventtriggerconfig.go new file mode 100644 index 000000000000..a50616ad9c4b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationeventtriggerconfig.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfigurationEventTriggerConfig struct { + Parallelism *int64 `json:"parallelism,omitempty"` + ReplicaCompletionCount *int64 `json:"replicaCompletionCount,omitempty"` + Scale *JobScale `json:"scale,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationmanualtriggerconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationmanualtriggerconfig.go new file mode 100644 index 000000000000..bb4bd29d5ace --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationmanualtriggerconfig.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfigurationManualTriggerConfig struct { + Parallelism *int64 `json:"parallelism,omitempty"` + ReplicaCompletionCount *int64 `json:"replicaCompletionCount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationscheduletriggerconfig.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationscheduletriggerconfig.go new file mode 100644 index 000000000000..6e82bdb66219 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobconfigurationscheduletriggerconfig.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobConfigurationScheduleTriggerConfig struct { + CronExpression string `json:"cronExpression"` + Parallelism *int64 `json:"parallelism,omitempty"` + ReplicaCompletionCount *int64 `json:"replicaCompletionCount,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecution.go new file mode 100644 index 000000000000..04a28d5b095d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecution.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecution struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *JobExecutionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionbase.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionbase.go new file mode 100644 index 000000000000..b6bf9e5b55b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionbase.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionBase struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutioncontainer.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutioncontainer.go new file mode 100644 index 000000000000..709af1fd8363 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutioncontainer.go @@ -0,0 +1,13 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionContainer struct { + Args *[]string `json:"args,omitempty"` + Command *[]string `json:"command,omitempty"` + Env *[]EnvironmentVar `json:"env,omitempty"` + Image *string `json:"image,omitempty"` + Name *string `json:"name,omitempty"` + Resources *ContainerResources `json:"resources,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionproperties.go new file mode 100644 index 000000000000..b0001531f0bf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutionproperties.go @@ -0,0 +1,42 @@ +package jobs + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionProperties struct { + DetailedStatus *ExecutionStatus `json:"detailedStatus,omitempty"` + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *JobExecutionRunningState `json:"status,omitempty"` + Template *JobExecutionTemplate `json:"template,omitempty"` +} + +func (o *JobExecutionProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *JobExecutionProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *JobExecutionProperties) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *JobExecutionProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutiontemplate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutiontemplate.go new file mode 100644 index 000000000000..b7f77c776931 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobexecutiontemplate.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobExecutionTemplate struct { + Containers *[]JobExecutionContainer `json:"containers,omitempty"` + InitContainers *[]JobExecutionContainer `json:"initContainers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchproperties.go new file mode 100644 index 000000000000..e767f594586f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchproperties.go @@ -0,0 +1,15 @@ +package jobs + +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 JobPatchProperties struct { + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *JobPatchPropertiesProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchpropertiesproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchpropertiesproperties.go new file mode 100644 index 000000000000..c1d2ed337c2b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobpatchpropertiesproperties.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobPatchPropertiesProperties struct { + Configuration *JobConfiguration `json:"configuration,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + EventStreamEndpoint *string `json:"eventStreamEndpoint,omitempty"` + OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"` + Template *JobTemplate `json:"template,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobproperties.go new file mode 100644 index 000000000000..9865a06d79f0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobproperties.go @@ -0,0 +1,14 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobProperties struct { + Configuration *JobConfiguration `json:"configuration,omitempty"` + EnvironmentId *string `json:"environmentId,omitempty"` + EventStreamEndpoint *string `json:"eventStreamEndpoint,omitempty"` + OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"` + ProvisioningState *JobProvisioningState `json:"provisioningState,omitempty"` + Template *JobTemplate `json:"template,omitempty"` + WorkloadProfileName *string `json:"workloadProfileName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscale.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscale.go new file mode 100644 index 000000000000..c13b18eea1b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscale.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobScale struct { + MaxExecutions *int64 `json:"maxExecutions,omitempty"` + MinExecutions *int64 `json:"minExecutions,omitempty"` + PollingInterval *int64 `json:"pollingInterval,omitempty"` + Rules *[]JobScaleRule `json:"rules,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscalerule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscalerule.go new file mode 100644 index 000000000000..5ee06f9d1faa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobscalerule.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobScaleRule struct { + Auth *[]ScaleRuleAuth `json:"auth,omitempty"` + Identity *string `json:"identity,omitempty"` + Metadata *interface{} `json:"metadata,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobsecretscollection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobsecretscollection.go new file mode 100644 index 000000000000..9844058eda61 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobsecretscollection.go @@ -0,0 +1,8 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobSecretsCollection struct { + Value []Secret `json:"value"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobtemplate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobtemplate.go new file mode 100644 index 000000000000..6e9bce871a97 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_jobtemplate.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JobTemplate struct { + Containers *[]Container `json:"containers,omitempty"` + InitContainers *[]BaseContainer `json:"initContainers,omitempty"` + Volumes *[]Volume `json:"volumes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_registrycredentials.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_registrycredentials.go new file mode 100644 index 000000000000..c82f4c124569 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_registrycredentials.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegistryCredentials struct { + Identity *string `json:"identity,omitempty"` + PasswordSecretRef *string `json:"passwordSecretRef,omitempty"` + Server *string `json:"server,omitempty"` + Username *string `json:"username,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_replicaexecutionstatus.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_replicaexecutionstatus.go new file mode 100644 index 000000000000..5ef5278b6e7d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_replicaexecutionstatus.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicaExecutionStatus struct { + Containers *[]ContainerExecutionStatus `json:"containers,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_scaleruleauth.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_scaleruleauth.go new file mode 100644 index 000000000000..92b41db202a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_scaleruleauth.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScaleRuleAuth struct { + SecretRef *string `json:"secretRef,omitempty"` + TriggerParameter *string `json:"triggerParameter,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secret.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secret.go new file mode 100644 index 000000000000..8aee0a491c3f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secret.go @@ -0,0 +1,11 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Secret struct { + Identity *string `json:"identity,omitempty"` + KeyVaultUrl *string `json:"keyVaultUrl,omitempty"` + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secretvolumeitem.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secretvolumeitem.go new file mode 100644 index 000000000000..bfa219692a9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_secretvolumeitem.go @@ -0,0 +1,9 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretVolumeItem struct { + Path *string `json:"path,omitempty"` + SecretRef *string `json:"secretRef,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volume.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volume.go new file mode 100644 index 000000000000..4414f8230a11 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volume.go @@ -0,0 +1,12 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Volume struct { + MountOptions *string `json:"mountOptions,omitempty"` + Name *string `json:"name,omitempty"` + Secrets *[]SecretVolumeItem `json:"secrets,omitempty"` + StorageName *string `json:"storageName,omitempty"` + StorageType *StorageType `json:"storageType,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volumemount.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volumemount.go new file mode 100644 index 000000000000..2274bfc6b086 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/model_volumemount.go @@ -0,0 +1,10 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VolumeMount struct { + MountPath *string `json:"mountPath,omitempty"` + SubPath *string `json:"subPath,omitempty"` + VolumeName *string `json:"volumeName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/predicates.go new file mode 100644 index 000000000000..d558cc7f436f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/predicates.go @@ -0,0 +1,78 @@ +package jobs + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DiagnosticsOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p DiagnosticsOperationPredicate) Matches(input Diagnostics) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type JobOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p JobOperationPredicate) Matches(input Job) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type JobExecutionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p JobExecutionOperationPredicate) Matches(input JobExecution) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/version.go new file mode 100644 index 000000000000..66a99b1c30a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs/version.go @@ -0,0 +1,12 @@ +package jobs + +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 = "2024-02-02-preview" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index e2f400402635..b876fa68c7f9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -359,6 +359,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/dapr github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages +github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedenvironments github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview