schemaversions

package
v0.20241212.1154051 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/deviceregistry/2024-09-01-preview/schemaversions Documentation

The schemaversions 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.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/deviceregistry/2024-09-01-preview/schemaversions"

Client Initialization

client := schemaversions.NewSchemaVersionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SchemaVersionsClient.CreateOrReplace

ctx := context.TODO()
id := schemaversions.NewSchemaVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "schemaRegistryName", "schemaName", "schemaVersionName")

payload := schemaversions.SchemaVersion{
	// ...
}


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

Example Usage: SchemaVersionsClient.Delete

ctx := context.TODO()
id := schemaversions.NewSchemaVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "schemaRegistryName", "schemaName", "schemaVersionName")

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

Example Usage: SchemaVersionsClient.Get

ctx := context.TODO()
id := schemaversions.NewSchemaVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "schemaRegistryName", "schemaName", "schemaVersionName")

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: SchemaVersionsClient.ListBySchema

ctx := context.TODO()
id := schemaversions.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "schemaRegistryName", "schemaName")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateSchemaID

func ValidateSchemaID(input interface{}, key string) (warnings []string, errors []error)

ValidateSchemaID checks that 'input' can be parsed as a Schema ID

func ValidateSchemaVersionID

func ValidateSchemaVersionID(input interface{}, key string) (warnings []string, errors []error)

ValidateSchemaVersionID checks that 'input' can be parsed as a Schema Version ID

Types

type CreateOrReplaceOperationResponse

type CreateOrReplaceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SchemaVersion
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SchemaVersion
}

type ListBySchemaCompleteResult

type ListBySchemaCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SchemaVersion
}

type ListBySchemaCustomPager

type ListBySchemaCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySchemaCustomPager) NextPageLink() *odata.Link

type ListBySchemaOperationResponse

type ListBySchemaOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SchemaVersion
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type SchemaId

type SchemaId struct {
	SubscriptionId     string
	ResourceGroupName  string
	SchemaRegistryName string
	SchemaName         string
}

SchemaId is a struct representing the Resource ID for a Schema

func NewSchemaID

func NewSchemaID(subscriptionId string, resourceGroupName string, schemaRegistryName string, schemaName string) SchemaId

NewSchemaID returns a new SchemaId struct

func ParseSchemaID

func ParseSchemaID(input string) (*SchemaId, error)

ParseSchemaID parses 'input' into a SchemaId

func ParseSchemaIDInsensitively

func ParseSchemaIDInsensitively(input string) (*SchemaId, error)

ParseSchemaIDInsensitively parses 'input' case-insensitively into a SchemaId note: this method should only be used for API response data and not user input

func (*SchemaId) FromParseResult

func (id *SchemaId) FromParseResult(input resourceids.ParseResult) error

func (SchemaId) ID

func (id SchemaId) ID() string

ID returns the formatted Schema ID

func (SchemaId) Segments

func (id SchemaId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Schema ID

func (SchemaId) String

func (id SchemaId) String() string

String returns a human-readable description of this Schema ID

type SchemaVersion

type SchemaVersion struct {
	Id         *string                  `json:"id,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *SchemaVersionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type SchemaVersionId

type SchemaVersionId struct {
	SubscriptionId     string
	ResourceGroupName  string
	SchemaRegistryName string
	SchemaName         string
	SchemaVersionName  string
}

SchemaVersionId is a struct representing the Resource ID for a Schema Version

func NewSchemaVersionID

func NewSchemaVersionID(subscriptionId string, resourceGroupName string, schemaRegistryName string, schemaName string, schemaVersionName string) SchemaVersionId

NewSchemaVersionID returns a new SchemaVersionId struct

func ParseSchemaVersionID

func ParseSchemaVersionID(input string) (*SchemaVersionId, error)

ParseSchemaVersionID parses 'input' into a SchemaVersionId

func ParseSchemaVersionIDInsensitively

func ParseSchemaVersionIDInsensitively(input string) (*SchemaVersionId, error)

ParseSchemaVersionIDInsensitively parses 'input' case-insensitively into a SchemaVersionId note: this method should only be used for API response data and not user input

func (*SchemaVersionId) FromParseResult

func (id *SchemaVersionId) FromParseResult(input resourceids.ParseResult) error

func (SchemaVersionId) ID

func (id SchemaVersionId) ID() string

ID returns the formatted Schema Version ID

func (SchemaVersionId) Segments

func (id SchemaVersionId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Schema Version ID

func (SchemaVersionId) String

func (id SchemaVersionId) String() string

String returns a human-readable description of this Schema Version ID

type SchemaVersionOperationPredicate

type SchemaVersionOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (SchemaVersionOperationPredicate) Matches

type SchemaVersionProperties

type SchemaVersionProperties struct {
	Description       *string            `json:"description,omitempty"`
	Hash              *string            `json:"hash,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	SchemaContent     string             `json:"schemaContent"`
	Uuid              *string            `json:"uuid,omitempty"`
}

type SchemaVersionsClient

type SchemaVersionsClient struct {
	Client *resourcemanager.Client
}

func NewSchemaVersionsClientWithBaseURI

func NewSchemaVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaVersionsClient, error)

func (SchemaVersionsClient) CreateOrReplace

CreateOrReplace ...

func (SchemaVersionsClient) Delete

Delete ...

func (SchemaVersionsClient) Get

Get ...

func (SchemaVersionsClient) ListBySchema

func (c SchemaVersionsClient) ListBySchema(ctx context.Context, id SchemaId) (result ListBySchemaOperationResponse, err error)

ListBySchema ...

func (SchemaVersionsClient) ListBySchemaComplete

func (c SchemaVersionsClient) ListBySchemaComplete(ctx context.Context, id SchemaId) (ListBySchemaCompleteResult, error)

ListBySchemaComplete retrieves all the results into a single object

func (SchemaVersionsClient) ListBySchemaCompleteMatchingPredicate

func (c SchemaVersionsClient) ListBySchemaCompleteMatchingPredicate(ctx context.Context, id SchemaId, predicate SchemaVersionOperationPredicate) (result ListBySchemaCompleteResult, err error)

ListBySchemaCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL