schema

package
v0.20230922.1111207 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/schema Documentation

The schema SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-03-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/apimanagement/2023-03-01-preview/schema"

Client Initialization

client := schema.NewSchemaClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SchemaClient.GlobalSchemaCreateOrUpdate

ctx := context.TODO()
id := schema.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "schemaIdValue")

payload := schema.GlobalSchemaContract{
	// ...
}


if err := client.GlobalSchemaCreateOrUpdateThenPoll(ctx, id, payload, schema.DefaultGlobalSchemaCreateOrUpdateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: SchemaClient.GlobalSchemaDelete

ctx := context.TODO()
id := schema.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "schemaIdValue")

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

Example Usage: SchemaClient.GlobalSchemaGet

ctx := context.TODO()
id := schema.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "schemaIdValue")

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

Example Usage: SchemaClient.GlobalSchemaGetEntityTag

ctx := context.TODO()
id := schema.NewSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "schemaIdValue")

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

Example Usage: SchemaClient.GlobalSchemaListByService

ctx := context.TODO()
id := schema.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

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

Example Usage: SchemaClient.WorkspaceGlobalSchemaCreateOrUpdate

ctx := context.TODO()
id := schema.NewWorkspaceSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "schemaIdValue")

payload := schema.GlobalSchemaContract{
	// ...
}


if err := client.WorkspaceGlobalSchemaCreateOrUpdateThenPoll(ctx, id, payload, schema.DefaultWorkspaceGlobalSchemaCreateOrUpdateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: SchemaClient.WorkspaceGlobalSchemaDelete

ctx := context.TODO()
id := schema.NewWorkspaceSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "schemaIdValue")

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

Example Usage: SchemaClient.WorkspaceGlobalSchemaGet

ctx := context.TODO()
id := schema.NewWorkspaceSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "schemaIdValue")

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

Example Usage: SchemaClient.WorkspaceGlobalSchemaGetEntityTag

ctx := context.TODO()
id := schema.NewWorkspaceSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue", "schemaIdValue")

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

Example Usage: SchemaClient.WorkspaceGlobalSchemaListByService

ctx := context.TODO()
id := schema.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceIdValue")

// alternatively `client.WorkspaceGlobalSchemaListByService(ctx, id, schema.DefaultWorkspaceGlobalSchemaListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.WorkspaceGlobalSchemaListByServiceComplete(ctx, id, schema.DefaultWorkspaceGlobalSchemaListByServiceOperationOptions())
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 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 ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

func ValidateWorkspaceSchemaID

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

ValidateWorkspaceSchemaID checks that 'input' can be parsed as a Workspace Schema ID

Types

type GlobalSchemaContract

type GlobalSchemaContract struct {
	Id         *string                         `json:"id,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties *GlobalSchemaContractProperties `json:"properties,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type GlobalSchemaContractOperationPredicate

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

func (GlobalSchemaContractOperationPredicate) Matches

type GlobalSchemaContractProperties

type GlobalSchemaContractProperties struct {
	Description *string      `json:"description,omitempty"`
	Document    *interface{} `json:"document,omitempty"`
	SchemaType  SchemaType   `json:"schemaType"`
	Value       *interface{} `json:"value,omitempty"`
}

type GlobalSchemaCreateOrUpdateOperationOptions

type GlobalSchemaCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultGlobalSchemaCreateOrUpdateOperationOptions

func DefaultGlobalSchemaCreateOrUpdateOperationOptions() GlobalSchemaCreateOrUpdateOperationOptions

func (GlobalSchemaCreateOrUpdateOperationOptions) ToHeaders

func (GlobalSchemaCreateOrUpdateOperationOptions) ToOData

func (GlobalSchemaCreateOrUpdateOperationOptions) ToQuery

type GlobalSchemaCreateOrUpdateOperationResponse

type GlobalSchemaCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GlobalSchemaDeleteOperationOptions

type GlobalSchemaDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultGlobalSchemaDeleteOperationOptions

func DefaultGlobalSchemaDeleteOperationOptions() GlobalSchemaDeleteOperationOptions

func (GlobalSchemaDeleteOperationOptions) ToHeaders

func (GlobalSchemaDeleteOperationOptions) ToOData

func (GlobalSchemaDeleteOperationOptions) ToQuery

type GlobalSchemaDeleteOperationResponse

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

type GlobalSchemaGetEntityTagOperationResponse

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

type GlobalSchemaGetOperationResponse

type GlobalSchemaGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GlobalSchemaContract
}

type GlobalSchemaListByServiceCompleteResult

type GlobalSchemaListByServiceCompleteResult struct {
	Items []GlobalSchemaContract
}

type GlobalSchemaListByServiceOperationOptions

type GlobalSchemaListByServiceOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultGlobalSchemaListByServiceOperationOptions

func DefaultGlobalSchemaListByServiceOperationOptions() GlobalSchemaListByServiceOperationOptions

func (GlobalSchemaListByServiceOperationOptions) ToHeaders

func (GlobalSchemaListByServiceOperationOptions) ToOData

func (GlobalSchemaListByServiceOperationOptions) ToQuery

type GlobalSchemaListByServiceOperationResponse

type GlobalSchemaListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]GlobalSchemaContract
}

type SchemaClient

type SchemaClient struct {
	Client *resourcemanager.Client
}

func NewSchemaClientWithBaseURI

func NewSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaClient, error)

func (SchemaClient) GlobalSchemaCreateOrUpdate

GlobalSchemaCreateOrUpdate ...

func (SchemaClient) GlobalSchemaCreateOrUpdateThenPoll

func (c SchemaClient) GlobalSchemaCreateOrUpdateThenPoll(ctx context.Context, id SchemaId, input GlobalSchemaContract, options GlobalSchemaCreateOrUpdateOperationOptions) error

GlobalSchemaCreateOrUpdateThenPoll performs GlobalSchemaCreateOrUpdate then polls until it's completed

func (SchemaClient) GlobalSchemaDelete

GlobalSchemaDelete ...

func (SchemaClient) GlobalSchemaGet

func (c SchemaClient) GlobalSchemaGet(ctx context.Context, id SchemaId) (result GlobalSchemaGetOperationResponse, err error)

GlobalSchemaGet ...

func (SchemaClient) GlobalSchemaGetEntityTag

func (c SchemaClient) GlobalSchemaGetEntityTag(ctx context.Context, id SchemaId) (result GlobalSchemaGetEntityTagOperationResponse, err error)

GlobalSchemaGetEntityTag ...

func (SchemaClient) GlobalSchemaListByService

GlobalSchemaListByService ...

func (SchemaClient) GlobalSchemaListByServiceComplete

GlobalSchemaListByServiceComplete retrieves all the results into a single object

func (SchemaClient) GlobalSchemaListByServiceCompleteMatchingPredicate

func (c SchemaClient) GlobalSchemaListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options GlobalSchemaListByServiceOperationOptions, predicate GlobalSchemaContractOperationPredicate) (result GlobalSchemaListByServiceCompleteResult, err error)

GlobalSchemaListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SchemaClient) WorkspaceGlobalSchemaCreateOrUpdate

WorkspaceGlobalSchemaCreateOrUpdate ...

func (SchemaClient) WorkspaceGlobalSchemaCreateOrUpdateThenPoll

func (c SchemaClient) WorkspaceGlobalSchemaCreateOrUpdateThenPoll(ctx context.Context, id WorkspaceSchemaId, input GlobalSchemaContract, options WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) error

WorkspaceGlobalSchemaCreateOrUpdateThenPoll performs WorkspaceGlobalSchemaCreateOrUpdate then polls until it's completed

func (SchemaClient) WorkspaceGlobalSchemaDelete

WorkspaceGlobalSchemaDelete ...

func (SchemaClient) WorkspaceGlobalSchemaGet

func (c SchemaClient) WorkspaceGlobalSchemaGet(ctx context.Context, id WorkspaceSchemaId) (result WorkspaceGlobalSchemaGetOperationResponse, err error)

WorkspaceGlobalSchemaGet ...

func (SchemaClient) WorkspaceGlobalSchemaGetEntityTag

func (c SchemaClient) WorkspaceGlobalSchemaGetEntityTag(ctx context.Context, id WorkspaceSchemaId) (result WorkspaceGlobalSchemaGetEntityTagOperationResponse, err error)

WorkspaceGlobalSchemaGetEntityTag ...

func (SchemaClient) WorkspaceGlobalSchemaListByService

WorkspaceGlobalSchemaListByService ...

func (SchemaClient) WorkspaceGlobalSchemaListByServiceComplete

WorkspaceGlobalSchemaListByServiceComplete retrieves all the results into a single object

func (SchemaClient) WorkspaceGlobalSchemaListByServiceCompleteMatchingPredicate

func (c SchemaClient) WorkspaceGlobalSchemaListByServiceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options WorkspaceGlobalSchemaListByServiceOperationOptions, predicate GlobalSchemaContractOperationPredicate) (result WorkspaceGlobalSchemaListByServiceCompleteResult, err error)

WorkspaceGlobalSchemaListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SchemaId

type SchemaId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	SchemaId          string
}

SchemaId is a struct representing the Resource ID for a Schema

func NewSchemaID

func NewSchemaID(subscriptionId string, resourceGroupName string, serviceName string, schemaId 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) 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 SchemaType

type SchemaType string
const (
	SchemaTypeJson SchemaType = "json"
	SchemaTypeXml  SchemaType = "xml"
)

func (*SchemaType) UnmarshalJSON

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

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type WorkspaceGlobalSchemaCreateOrUpdateOperationOptions

type WorkspaceGlobalSchemaCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceGlobalSchemaCreateOrUpdateOperationOptions

func DefaultWorkspaceGlobalSchemaCreateOrUpdateOperationOptions() WorkspaceGlobalSchemaCreateOrUpdateOperationOptions

func (WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToOData

func (WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToQuery

type WorkspaceGlobalSchemaCreateOrUpdateOperationResponse

type WorkspaceGlobalSchemaCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type WorkspaceGlobalSchemaDeleteOperationOptions

type WorkspaceGlobalSchemaDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceGlobalSchemaDeleteOperationOptions

func DefaultWorkspaceGlobalSchemaDeleteOperationOptions() WorkspaceGlobalSchemaDeleteOperationOptions

func (WorkspaceGlobalSchemaDeleteOperationOptions) ToHeaders

func (WorkspaceGlobalSchemaDeleteOperationOptions) ToOData

func (WorkspaceGlobalSchemaDeleteOperationOptions) ToQuery

type WorkspaceGlobalSchemaDeleteOperationResponse

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

type WorkspaceGlobalSchemaGetEntityTagOperationResponse

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

type WorkspaceGlobalSchemaGetOperationResponse

type WorkspaceGlobalSchemaGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GlobalSchemaContract
}

type WorkspaceGlobalSchemaListByServiceCompleteResult

type WorkspaceGlobalSchemaListByServiceCompleteResult struct {
	Items []GlobalSchemaContract
}

type WorkspaceGlobalSchemaListByServiceOperationOptions

type WorkspaceGlobalSchemaListByServiceOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultWorkspaceGlobalSchemaListByServiceOperationOptions

func DefaultWorkspaceGlobalSchemaListByServiceOperationOptions() WorkspaceGlobalSchemaListByServiceOperationOptions

func (WorkspaceGlobalSchemaListByServiceOperationOptions) ToHeaders

func (WorkspaceGlobalSchemaListByServiceOperationOptions) ToOData

func (WorkspaceGlobalSchemaListByServiceOperationOptions) ToQuery

type WorkspaceGlobalSchemaListByServiceOperationResponse

type WorkspaceGlobalSchemaListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]GlobalSchemaContract
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceId       string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

type WorkspaceSchemaId

type WorkspaceSchemaId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceId       string
	SchemaId          string
}

WorkspaceSchemaId is a struct representing the Resource ID for a Workspace Schema

func NewWorkspaceSchemaID

func NewWorkspaceSchemaID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, schemaId string) WorkspaceSchemaId

NewWorkspaceSchemaID returns a new WorkspaceSchemaId struct

func ParseWorkspaceSchemaID

func ParseWorkspaceSchemaID(input string) (*WorkspaceSchemaId, error)

ParseWorkspaceSchemaID parses 'input' into a WorkspaceSchemaId

func ParseWorkspaceSchemaIDInsensitively

func ParseWorkspaceSchemaIDInsensitively(input string) (*WorkspaceSchemaId, error)

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

func (WorkspaceSchemaId) ID

func (id WorkspaceSchemaId) ID() string

ID returns the formatted Workspace Schema ID

func (WorkspaceSchemaId) Segments

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

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

func (WorkspaceSchemaId) String

func (id WorkspaceSchemaId) String() string

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

Jump to

Keyboard shortcuts

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