-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hc-github-team-tf-azure
committed
Oct 16, 2024
1 parent
0a8354b
commit f8090d5
Showing
725 changed files
with
51,782 additions
and
53 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...ce-manager/astronomer/2023-08-01/organizations/model_liftrbasemarketplacedetailsupdate.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package organizations | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type LiftrBaseMarketplaceDetailsUpdate struct { | ||
OfferDetails *LiftrBaseOfferDetailsUpdate `json:"offerDetails,omitempty"` | ||
SubscriptionId *string `json:"subscriptionId,omitempty"` | ||
SubscriptionStatus *MarketplaceSubscriptionStatus `json:"subscriptionStatus,omitempty"` | ||
} |
13 changes: 13 additions & 0 deletions
13
resource-manager/astronomer/2023-08-01/organizations/model_liftrbaseofferdetailsupdate.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package organizations | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type LiftrBaseOfferDetailsUpdate struct { | ||
OfferId *string `json:"offerId,omitempty"` | ||
PlanId *string `json:"planId,omitempty"` | ||
PlanName *string `json:"planName,omitempty"` | ||
PublisherId *string `json:"publisherId,omitempty"` | ||
TermId *string `json:"termId,omitempty"` | ||
TermUnit *string `json:"termUnit,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...ce-manager/astronomer/2024-08-27/organizations/model_liftrbasemarketplacedetailsupdate.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package organizations | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type LiftrBaseMarketplaceDetailsUpdate struct { | ||
OfferDetails *LiftrBaseOfferDetailsUpdate `json:"offerDetails,omitempty"` | ||
SubscriptionId *string `json:"subscriptionId,omitempty"` | ||
SubscriptionStatus *MarketplaceSubscriptionStatus `json:"subscriptionStatus,omitempty"` | ||
} |
14 changes: 14 additions & 0 deletions
14
resource-manager/astronomer/2024-08-27/organizations/model_liftrbaseofferdetailsupdate.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package organizations | ||
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See NOTICE.txt in the project root for license information. | ||
|
||
type LiftrBaseOfferDetailsUpdate struct { | ||
OfferId *string `json:"offerId,omitempty"` | ||
PlanId *string `json:"planId,omitempty"` | ||
PlanName *string `json:"planName,omitempty"` | ||
PublisherId *string `json:"publisherId,omitempty"` | ||
RenewalMode *RenewalMode `json:"renewalMode,omitempty"` | ||
TermId *string `json:"termId,omitempty"` | ||
TermUnit *string `json:"termUnit,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
resource-manager/deviceregistry/2024-09-01-preview/assetendpointprofiles/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
|
||
## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceregistry/2024-09-01-preview/assetendpointprofiles` Documentation | ||
|
||
The `assetendpointprofiles` SDK allows for interaction with Azure Resource Manager `deviceregistry` (API Version `2024-09-01-preview`). | ||
|
||
This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). | ||
|
||
### Import Path | ||
|
||
```go | ||
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" | ||
import "github.com/hashicorp/go-azure-sdk/resource-manager/deviceregistry/2024-09-01-preview/assetendpointprofiles" | ||
``` | ||
|
||
|
||
### Client Initialization | ||
|
||
```go | ||
client := assetendpointprofiles.NewAssetEndpointProfilesClientWithBaseURI("https://management.azure.com") | ||
client.Client.Authorizer = authorizer | ||
``` | ||
|
||
|
||
### Example Usage: `AssetEndpointProfilesClient.CreateOrReplace` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := assetendpointprofiles.NewAssetEndpointProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "assetEndpointProfileName") | ||
|
||
payload := assetendpointprofiles.AssetEndpointProfile{ | ||
// ... | ||
} | ||
|
||
|
||
if err := client.CreateOrReplaceThenPoll(ctx, id, payload); err != nil { | ||
// handle the error | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AssetEndpointProfilesClient.Delete` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := assetendpointprofiles.NewAssetEndpointProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "assetEndpointProfileName") | ||
|
||
if err := client.DeleteThenPoll(ctx, id); err != nil { | ||
// handle the error | ||
} | ||
``` | ||
|
||
|
||
### Example Usage: `AssetEndpointProfilesClient.Get` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := assetendpointprofiles.NewAssetEndpointProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "assetEndpointProfileName") | ||
|
||
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: `AssetEndpointProfilesClient.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: `AssetEndpointProfilesClient.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: `AssetEndpointProfilesClient.Update` | ||
|
||
```go | ||
ctx := context.TODO() | ||
id := assetendpointprofiles.NewAssetEndpointProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "assetEndpointProfileName") | ||
|
||
payload := assetendpointprofiles.AssetEndpointProfileUpdate{ | ||
// ... | ||
} | ||
|
||
|
||
if err := client.UpdateThenPoll(ctx, id, payload); err != nil { | ||
// handle the error | ||
} | ||
``` |
26 changes: 26 additions & 0 deletions
26
resource-manager/deviceregistry/2024-09-01-preview/assetendpointprofiles/client.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package assetendpointprofiles | ||
|
||
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 AssetEndpointProfilesClient struct { | ||
Client *resourcemanager.Client | ||
} | ||
|
||
func NewAssetEndpointProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*AssetEndpointProfilesClient, error) { | ||
client, err := resourcemanager.NewClient(sdkApi, "assetendpointprofiles", defaultApiVersion) | ||
if err != nil { | ||
return nil, fmt.Errorf("instantiating AssetEndpointProfilesClient: %+v", err) | ||
} | ||
|
||
return &AssetEndpointProfilesClient{ | ||
Client: client, | ||
}, nil | ||
} |
104 changes: 104 additions & 0 deletions
104
resource-manager/deviceregistry/2024-09-01-preview/assetendpointprofiles/constants.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package assetendpointprofiles | ||
|
||
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 AuthenticationMethod string | ||
|
||
const ( | ||
AuthenticationMethodAnonymous AuthenticationMethod = "Anonymous" | ||
AuthenticationMethodCertificate AuthenticationMethod = "Certificate" | ||
AuthenticationMethodUsernamePassword AuthenticationMethod = "UsernamePassword" | ||
) | ||
|
||
func PossibleValuesForAuthenticationMethod() []string { | ||
return []string{ | ||
string(AuthenticationMethodAnonymous), | ||
string(AuthenticationMethodCertificate), | ||
string(AuthenticationMethodUsernamePassword), | ||
} | ||
} | ||
|
||
func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { | ||
var decoded string | ||
if err := json.Unmarshal(bytes, &decoded); err != nil { | ||
return fmt.Errorf("unmarshaling: %+v", err) | ||
} | ||
out, err := parseAuthenticationMethod(decoded) | ||
if err != nil { | ||
return fmt.Errorf("parsing %q: %+v", decoded, err) | ||
} | ||
*s = *out | ||
return nil | ||
} | ||
|
||
func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { | ||
vals := map[string]AuthenticationMethod{ | ||
"anonymous": AuthenticationMethodAnonymous, | ||
"certificate": AuthenticationMethodCertificate, | ||
"usernamepassword": AuthenticationMethodUsernamePassword, | ||
} | ||
if v, ok := vals[strings.ToLower(input)]; ok { | ||
return &v, nil | ||
} | ||
|
||
// otherwise presume it's an undefined value and best-effort it | ||
out := AuthenticationMethod(input) | ||
return &out, nil | ||
} | ||
|
||
type ProvisioningState string | ||
|
||
const ( | ||
ProvisioningStateAccepted ProvisioningState = "Accepted" | ||
ProvisioningStateCanceled ProvisioningState = "Canceled" | ||
ProvisioningStateDeleting ProvisioningState = "Deleting" | ||
ProvisioningStateFailed ProvisioningState = "Failed" | ||
ProvisioningStateSucceeded ProvisioningState = "Succeeded" | ||
) | ||
|
||
func PossibleValuesForProvisioningState() []string { | ||
return []string{ | ||
string(ProvisioningStateAccepted), | ||
string(ProvisioningStateCanceled), | ||
string(ProvisioningStateDeleting), | ||
string(ProvisioningStateFailed), | ||
string(ProvisioningStateSucceeded), | ||
} | ||
} | ||
|
||
func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { | ||
var decoded string | ||
if err := json.Unmarshal(bytes, &decoded); err != nil { | ||
return fmt.Errorf("unmarshaling: %+v", err) | ||
} | ||
out, err := parseProvisioningState(decoded) | ||
if err != nil { | ||
return fmt.Errorf("parsing %q: %+v", decoded, err) | ||
} | ||
*s = *out | ||
return nil | ||
} | ||
|
||
func parseProvisioningState(input string) (*ProvisioningState, error) { | ||
vals := map[string]ProvisioningState{ | ||
"accepted": ProvisioningStateAccepted, | ||
"canceled": ProvisioningStateCanceled, | ||
"deleting": ProvisioningStateDeleting, | ||
"failed": ProvisioningStateFailed, | ||
"succeeded": ProvisioningStateSucceeded, | ||
} | ||
if v, ok := vals[strings.ToLower(input)]; ok { | ||
return &v, nil | ||
} | ||
|
||
// otherwise presume it's an undefined value and best-effort it | ||
out := ProvisioningState(input) | ||
return &out, nil | ||
} |
Oops, something went wrong.