Skip to content

Commit

Permalink
Merge pull request #361 from hashicorp/auto-pr/e2f2d218
Browse files Browse the repository at this point in the history
Auto PR: Regenerating the Go SDK (2edea1f)
  • Loading branch information
tombuildsstuff authored Mar 10, 2023
2 parents c1de4f8 + 2edea1f commit 45368c7
Show file tree
Hide file tree
Showing 2,206 changed files with 156,887 additions and 9,471 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ func parseParameterType(input string) (*ParameterType, error) {
type Type string

const (
TypeLinkedServiceReference Type = "LinkedServiceReference"
TypeIntegrationRuntimeReference Type = "IntegrationRuntimeReference"
)

func PossibleValuesForType() []string {
return []string{
string(TypeLinkedServiceReference),
string(TypeIntegrationRuntimeReference),
}
}

func parseType(input string) (*Type, error) {
vals := map[string]Type{
"linkedservicereference": TypeLinkedServiceReference,
"integrationruntimereference": TypeIntegrationRuntimeReference,
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
Expand Down
28 changes: 28 additions & 0 deletions resource-manager/media/2022-07-01/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package v2022_07_01

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings"
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
"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 Client struct {
Encodings *encodings.EncodingsClient
}

func NewClientWithBaseURI(api environments.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) {
encodingsClient, err := encodings.NewEncodingsClientWithBaseURI(api)
if err != nil {
return nil, fmt.Errorf("building Encodings client: %+v", err)
}
configureFunc(encodingsClient.Client)

return &Client{
Encodings: encodingsClient,
}, nil
}
218 changes: 218 additions & 0 deletions resource-manager/media/2022-07-01/encodings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@

## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings` Documentation

The `encodings` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-07-01`).

This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs).

### Import Path

```go
import "github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings"
```


### Client Initialization

```go
client := encodings.NewEncodingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
```


### Example Usage: `EncodingsClient.JobsCancelJob`

```go
ctx := context.TODO()
id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue")

read, err := client.JobsCancelJob(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.JobsCreate`

```go
ctx := context.TODO()
id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue")

payload := encodings.Job{
// ...
}


read, err := client.JobsCreate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.JobsDelete`

```go
ctx := context.TODO()
id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue")

read, err := client.JobsDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.JobsGet`

```go
ctx := context.TODO()
id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue")

read, err := client.JobsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.JobsList`

```go
ctx := context.TODO()
id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue")

// alternatively `client.JobsList(ctx, id, encodings.DefaultJobsListOperationOptions())` can be used to do batched pagination
items, err := client.JobsListComplete(ctx, id, encodings.DefaultJobsListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
```


### Example Usage: `EncodingsClient.JobsUpdate`

```go
ctx := context.TODO()
id := encodings.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue", "jobValue")

payload := encodings.Job{
// ...
}


read, err := client.JobsUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.TransformsCreateOrUpdate`

```go
ctx := context.TODO()
id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue")

payload := encodings.Transform{
// ...
}


read, err := client.TransformsCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.TransformsDelete`

```go
ctx := context.TODO()
id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue")

read, err := client.TransformsDelete(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.TransformsGet`

```go
ctx := context.TODO()
id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue")

read, err := client.TransformsGet(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```


### Example Usage: `EncodingsClient.TransformsList`

```go
ctx := context.TODO()
id := encodings.NewMediaServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue")

// alternatively `client.TransformsList(ctx, id, encodings.DefaultTransformsListOperationOptions())` can be used to do batched pagination
items, err := client.TransformsListComplete(ctx, id, encodings.DefaultTransformsListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
```


### Example Usage: `EncodingsClient.TransformsUpdate`

```go
ctx := context.TODO()
id := encodings.NewTransformID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mediaServiceValue", "transformValue")

payload := encodings.Transform{
// ...
}


read, err := client.TransformsUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
```
26 changes: 26 additions & 0 deletions resource-manager/media/2022-07-01/encodings/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package encodings

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
"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 EncodingsClient struct {
Client *resourcemanager.Client
}

func NewEncodingsClientWithBaseURI(api environments.Api) (*EncodingsClient, error) {
client, err := resourcemanager.NewResourceManagerClient(api, "encodings", defaultApiVersion)
if err != nil {
return nil, fmt.Errorf("instantiating EncodingsClient: %+v", err)
}

return &EncodingsClient{
Client: client,
}, nil
}
Loading

0 comments on commit 45368c7

Please sign in to comment.