schemas

package
v0.20241118.1115603 Latest Latest
Warning

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

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

README

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

The schemas 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/schemas"

Client Initialization

client := schemas.NewSchemasClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SchemasClient.CreateOrReplace

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

payload := schemas.Schema{
	// ...
}


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: SchemasClient.Delete

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

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: SchemasClient.Get

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

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: SchemasClient.ListBySchemaRegistry

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

// alternatively `client.ListBySchemaRegistry(ctx, id)` can be used to do batched pagination
items, err := client.ListBySchemaRegistryComplete(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 PossibleValuesForFormat

func PossibleValuesForFormat() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSchemaType

func PossibleValuesForSchemaType() []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 ValidateSchemaRegistryID

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

ValidateSchemaRegistryID checks that 'input' can be parsed as a Schema Registry ID

Types

type CreateOrReplaceOperationResponse

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

type DeleteOperationResponse

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

type Format

type Format string
const (
	FormatDeltaOnePointZero                Format = "Delta/1.0"
	FormatJsonSchemaDraftNegativeZeroSeven Format = "JsonSchema/draft-07"
)

func (*Format) UnmarshalJSON

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

type GetOperationResponse

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

type ListBySchemaRegistryCompleteResult

type ListBySchemaRegistryCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Schema
}

type ListBySchemaRegistryCustomPager

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

type ListBySchemaRegistryOperationResponse

type ListBySchemaRegistryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Schema
}

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 Schema

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

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 SchemaOperationPredicate

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

func (SchemaOperationPredicate) Matches

func (p SchemaOperationPredicate) Matches(input Schema) bool

type SchemaProperties

type SchemaProperties struct {
	Description       *string            `json:"description,omitempty"`
	DisplayName       *string            `json:"displayName,omitempty"`
	Format            Format             `json:"format"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	SchemaType        SchemaType         `json:"schemaType"`
	Tags              *map[string]string `json:"tags,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
}

type SchemaRegistryId

type SchemaRegistryId struct {
	SubscriptionId     string
	ResourceGroupName  string
	SchemaRegistryName string
}

SchemaRegistryId is a struct representing the Resource ID for a Schema Registry

func NewSchemaRegistryID

func NewSchemaRegistryID(subscriptionId string, resourceGroupName string, schemaRegistryName string) SchemaRegistryId

NewSchemaRegistryID returns a new SchemaRegistryId struct

func ParseSchemaRegistryID

func ParseSchemaRegistryID(input string) (*SchemaRegistryId, error)

ParseSchemaRegistryID parses 'input' into a SchemaRegistryId

func ParseSchemaRegistryIDInsensitively

func ParseSchemaRegistryIDInsensitively(input string) (*SchemaRegistryId, error)

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

func (*SchemaRegistryId) FromParseResult

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

func (SchemaRegistryId) ID

func (id SchemaRegistryId) ID() string

ID returns the formatted Schema Registry ID

func (SchemaRegistryId) Segments

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

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

func (SchemaRegistryId) String

func (id SchemaRegistryId) String() string

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

type SchemaType

type SchemaType string
const (
	SchemaTypeMessageSchema SchemaType = "MessageSchema"
)

func (*SchemaType) UnmarshalJSON

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

type SchemasClient

type SchemasClient struct {
	Client *resourcemanager.Client
}

func NewSchemasClientWithBaseURI

func NewSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemasClient, error)

func (SchemasClient) CreateOrReplace

func (c SchemasClient) CreateOrReplace(ctx context.Context, id SchemaId, input Schema) (result CreateOrReplaceOperationResponse, err error)

CreateOrReplace ...

func (SchemasClient) Delete

func (c SchemasClient) Delete(ctx context.Context, id SchemaId) (result DeleteOperationResponse, err error)

Delete ...

func (SchemasClient) Get

func (c SchemasClient) Get(ctx context.Context, id SchemaId) (result GetOperationResponse, err error)

Get ...

func (SchemasClient) ListBySchemaRegistry

func (c SchemasClient) ListBySchemaRegistry(ctx context.Context, id SchemaRegistryId) (result ListBySchemaRegistryOperationResponse, err error)

ListBySchemaRegistry ...

func (SchemasClient) ListBySchemaRegistryComplete

func (c SchemasClient) ListBySchemaRegistryComplete(ctx context.Context, id SchemaRegistryId) (ListBySchemaRegistryCompleteResult, error)

ListBySchemaRegistryComplete retrieves all the results into a single object

func (SchemasClient) ListBySchemaRegistryCompleteMatchingPredicate

func (c SchemasClient) ListBySchemaRegistryCompleteMatchingPredicate(ctx context.Context, id SchemaRegistryId, predicate SchemaOperationPredicate) (result ListBySchemaRegistryCompleteResult, err error)

ListBySchemaRegistryCompleteMatchingPredicate 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