Skip to content

Commit

Permalink
Updating based on cdbd25d76
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-tf-azure committed Oct 16, 2024
1 parent 0a8354b commit f8090d5
Show file tree
Hide file tree
Showing 725 changed files with 51,782 additions and 53 deletions.
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"`
}
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"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package organizations
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type OrganizationResourceUpdateProperties struct {
Marketplace *LiftrBaseMarketplaceDetailsUpdate `json:"marketplace,omitempty"`
PartnerOrganizationProperties *LiftrBaseDataPartnerOrganizationPropertiesUpdate `json:"partnerOrganizationProperties,omitempty"`
User *LiftrBaseUserDetailsUpdate `json:"user,omitempty"`
}
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"`
}
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"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package organizations
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type OrganizationResourceUpdateProperties struct {
Marketplace *LiftrBaseMarketplaceDetailsUpdate `json:"marketplace,omitempty"`
PartnerOrganizationProperties *LiftrBaseDataPartnerOrganizationPropertiesUpdate `json:"partnerOrganizationProperties,omitempty"`
User *LiftrBaseUserDetailsUpdate `json:"user,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package dataflowdebugsession
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type PostgreSqlV2LinkedServiceTypeProperties struct {
AuthenticationType string `json:"authenticationType"`
CommandTimeout *int64 `json:"commandTimeout,omitempty"`
ConnectionTimeout *int64 `json:"connectionTimeout,omitempty"`
Database string `json:"database"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type SnowflakeLinkedV2ServiceTypeProperties struct {
ClientSecret SecretBase `json:"clientSecret"`
Database string `json:"database"`
EncryptedCredential *string `json:"encryptedCredential,omitempty"`
Host *string `json:"host,omitempty"`
Password SecretBase `json:"password"`
PrivateKey SecretBase `json:"privateKey"`
PrivateKeyPassphrase SecretBase `json:"privateKeyPassphrase"`
Expand All @@ -33,6 +34,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err
ClientId *string `json:"clientId,omitempty"`
Database string `json:"database"`
EncryptedCredential *string `json:"encryptedCredential,omitempty"`
Host *string `json:"host,omitempty"`
Scope *string `json:"scope,omitempty"`
TenantId *string `json:"tenantId,omitempty"`
User *string `json:"user,omitempty"`
Expand All @@ -47,6 +49,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err
s.ClientId = decoded.ClientId
s.Database = decoded.Database
s.EncryptedCredential = decoded.EncryptedCredential
s.Host = decoded.Host
s.Scope = decoded.Scope
s.TenantId = decoded.TenantId
s.User = decoded.User
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package linkedservices
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type PostgreSqlV2LinkedServiceTypeProperties struct {
AuthenticationType string `json:"authenticationType"`
CommandTimeout *int64 `json:"commandTimeout,omitempty"`
ConnectionTimeout *int64 `json:"connectionTimeout,omitempty"`
Database string `json:"database"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type SnowflakeLinkedV2ServiceTypeProperties struct {
ClientSecret SecretBase `json:"clientSecret"`
Database string `json:"database"`
EncryptedCredential *string `json:"encryptedCredential,omitempty"`
Host *string `json:"host,omitempty"`
Password SecretBase `json:"password"`
PrivateKey SecretBase `json:"privateKey"`
PrivateKeyPassphrase SecretBase `json:"privateKeyPassphrase"`
Expand All @@ -33,6 +34,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err
ClientId *string `json:"clientId,omitempty"`
Database string `json:"database"`
EncryptedCredential *string `json:"encryptedCredential,omitempty"`
Host *string `json:"host,omitempty"`
Scope *string `json:"scope,omitempty"`
TenantId *string `json:"tenantId,omitempty"`
User *string `json:"user,omitempty"`
Expand All @@ -47,6 +49,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err
s.ClientId = decoded.ClientId
s.Database = decoded.Database
s.EncryptedCredential = decoded.EncryptedCredential
s.Host = decoded.Host
s.Scope = decoded.Scope
s.TenantId = decoded.TenantId
s.User = decoded.User
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var _ CopySource = SalesforceV2Source{}
type SalesforceV2Source struct {
AdditionalColumns *interface{} `json:"additionalColumns,omitempty"`
IncludeDeletedObjects *bool `json:"includeDeletedObjects,omitempty"`
PageSize *int64 `json:"pageSize,omitempty"`
Query *string `json:"query,omitempty"`
QueryTimeout *string `json:"queryTimeout,omitempty"`
SOQLQuery *string `json:"SOQLQuery,omitempty"`
Expand Down
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
}
```
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
}
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
}
Loading

0 comments on commit f8090d5

Please sign in to comment.