-
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.
Merge pull request #361 from hashicorp/auto-pr/e2f2d218
Auto PR: Regenerating the Go SDK (2edea1f)
- Loading branch information
Showing
2,206 changed files
with
156,887 additions
and
9,471 deletions.
There are no files selected for viewing
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
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 | ||
} |
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,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 | ||
} | ||
``` |
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 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 | ||
} |
Oops, something went wrong.