apischema

package
v0.20241126.1723 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The apischema SDK allows for interaction with Azure Resource Manager 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/apischema"

Client Initialization

client := apischema.NewApiSchemaClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiSchemaClient.CreateOrUpdate

ctx := context.TODO()
id := apischema.NewApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "apiId", "schemaId")

payload := apischema.SchemaContract{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload, apischema.DefaultCreateOrUpdateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: ApiSchemaClient.Delete

ctx := context.TODO()
id := apischema.NewApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "apiId", "schemaId")

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

Example Usage: ApiSchemaClient.Get

ctx := context.TODO()
id := apischema.NewApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "apiId", "schemaId")

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: ApiSchemaClient.GetEntityTag

ctx := context.TODO()
id := apischema.NewApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "apiId", "schemaId")

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

Example Usage: ApiSchemaClient.ListByApi

ctx := context.TODO()
id := apischema.NewApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "apiId")

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

Example Usage: ApiSchemaClient.WorkspaceApiSchemaCreateOrUpdate

ctx := context.TODO()
id := apischema.NewWorkspaceApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "apiId", "schemaId")

payload := apischema.SchemaContract{
	// ...
}


if err := client.WorkspaceApiSchemaCreateOrUpdateThenPoll(ctx, id, payload, apischema.DefaultWorkspaceApiSchemaCreateOrUpdateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: ApiSchemaClient.WorkspaceApiSchemaDelete

ctx := context.TODO()
id := apischema.NewWorkspaceApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "apiId", "schemaId")

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

Example Usage: ApiSchemaClient.WorkspaceApiSchemaGet

ctx := context.TODO()
id := apischema.NewWorkspaceApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "apiId", "schemaId")

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

Example Usage: ApiSchemaClient.WorkspaceApiSchemaGetEntityTag

ctx := context.TODO()
id := apischema.NewWorkspaceApiSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "apiId", "schemaId")

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

Example Usage: ApiSchemaClient.WorkspaceApiSchemaListByApi

ctx := context.TODO()
id := apischema.NewWorkspaceApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "apiId")

// alternatively `client.WorkspaceApiSchemaListByApi(ctx, id, apischema.DefaultWorkspaceApiSchemaListByApiOperationOptions())` can be used to do batched pagination
items, err := client.WorkspaceApiSchemaListByApiComplete(ctx, id, apischema.DefaultWorkspaceApiSchemaListByApiOperationOptions())
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 ValidateApiID

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

ValidateApiID checks that 'input' can be parsed as a Api ID

func ValidateApiSchemaID

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

ValidateApiSchemaID checks that 'input' can be parsed as a Api Schema ID

func ValidateWorkspaceApiID

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

ValidateWorkspaceApiID checks that 'input' can be parsed as a Workspace Api ID

func ValidateWorkspaceApiSchemaID

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

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

Types

type ApiId

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

ApiId is a struct representing the Resource ID for a Api

func NewApiID

func NewApiID(subscriptionId string, resourceGroupName string, serviceName string, apiId string) ApiId

NewApiID returns a new ApiId struct

func ParseApiID

func ParseApiID(input string) (*ApiId, error)

ParseApiID parses 'input' into a ApiId

func ParseApiIDInsensitively

func ParseApiIDInsensitively(input string) (*ApiId, error)

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

func (*ApiId) FromParseResult

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

func (ApiId) ID

func (id ApiId) ID() string

ID returns the formatted Api ID

func (ApiId) Segments

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

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

func (ApiId) String

func (id ApiId) String() string

String returns a human-readable description of this Api ID

type ApiSchemaClient

type ApiSchemaClient struct {
	Client *resourcemanager.Client
}

func NewApiSchemaClientWithBaseURI

func NewApiSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiSchemaClient, error)

func (ApiSchemaClient) CreateOrUpdate

CreateOrUpdate ...

func (ApiSchemaClient) CreateOrUpdateThenPoll

func (c ApiSchemaClient) CreateOrUpdateThenPoll(ctx context.Context, id ApiSchemaId, input SchemaContract, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ApiSchemaClient) Delete

Delete ...

func (ApiSchemaClient) Get

Get ...

func (ApiSchemaClient) GetEntityTag

func (c ApiSchemaClient) GetEntityTag(ctx context.Context, id ApiSchemaId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (ApiSchemaClient) ListByApi

ListByApi ...

func (ApiSchemaClient) ListByApiComplete

ListByApiComplete retrieves all the results into a single object

func (ApiSchemaClient) ListByApiCompleteMatchingPredicate

func (c ApiSchemaClient) ListByApiCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListByApiOperationOptions, predicate SchemaContractOperationPredicate) (result ListByApiCompleteResult, err error)

ListByApiCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ApiSchemaClient) WorkspaceApiSchemaCreateOrUpdate

WorkspaceApiSchemaCreateOrUpdate ...

func (ApiSchemaClient) WorkspaceApiSchemaCreateOrUpdateThenPoll

func (c ApiSchemaClient) WorkspaceApiSchemaCreateOrUpdateThenPoll(ctx context.Context, id WorkspaceApiSchemaId, input SchemaContract, options WorkspaceApiSchemaCreateOrUpdateOperationOptions) error

WorkspaceApiSchemaCreateOrUpdateThenPoll performs WorkspaceApiSchemaCreateOrUpdate then polls until it's completed

func (ApiSchemaClient) WorkspaceApiSchemaDelete

WorkspaceApiSchemaDelete ...

func (ApiSchemaClient) WorkspaceApiSchemaGet

WorkspaceApiSchemaGet ...

func (ApiSchemaClient) WorkspaceApiSchemaGetEntityTag

func (c ApiSchemaClient) WorkspaceApiSchemaGetEntityTag(ctx context.Context, id WorkspaceApiSchemaId) (result WorkspaceApiSchemaGetEntityTagOperationResponse, err error)

WorkspaceApiSchemaGetEntityTag ...

func (ApiSchemaClient) WorkspaceApiSchemaListByApi

WorkspaceApiSchemaListByApi ...

func (ApiSchemaClient) WorkspaceApiSchemaListByApiComplete

WorkspaceApiSchemaListByApiComplete retrieves all the results into a single object

func (ApiSchemaClient) WorkspaceApiSchemaListByApiCompleteMatchingPredicate

func (c ApiSchemaClient) WorkspaceApiSchemaListByApiCompleteMatchingPredicate(ctx context.Context, id WorkspaceApiId, options WorkspaceApiSchemaListByApiOperationOptions, predicate SchemaContractOperationPredicate) (result WorkspaceApiSchemaListByApiCompleteResult, err error)

WorkspaceApiSchemaListByApiCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ApiSchemaId

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

ApiSchemaId is a struct representing the Resource ID for a Api Schema

func NewApiSchemaID

func NewApiSchemaID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, schemaId string) ApiSchemaId

NewApiSchemaID returns a new ApiSchemaId struct

func ParseApiSchemaID

func ParseApiSchemaID(input string) (*ApiSchemaId, error)

ParseApiSchemaID parses 'input' into a ApiSchemaId

func ParseApiSchemaIDInsensitively

func ParseApiSchemaIDInsensitively(input string) (*ApiSchemaId, error)

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

func (*ApiSchemaId) FromParseResult

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

func (ApiSchemaId) ID

func (id ApiSchemaId) ID() string

ID returns the formatted Api Schema ID

func (ApiSchemaId) Segments

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

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

func (ApiSchemaId) String

func (id ApiSchemaId) String() string

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

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SchemaContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force   *bool
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

type ListByApiCompleteResult

type ListByApiCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SchemaContract
}

type ListByApiCustomPager

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

type ListByApiOperationOptions

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

func DefaultListByApiOperationOptions

func DefaultListByApiOperationOptions() ListByApiOperationOptions

func (ListByApiOperationOptions) ToHeaders

func (o ListByApiOperationOptions) ToHeaders() *client.Headers

func (ListByApiOperationOptions) ToOData

func (o ListByApiOperationOptions) ToOData() *odata.Query

func (ListByApiOperationOptions) ToQuery

type ListByApiOperationResponse

type ListByApiOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SchemaContract
}

type SchemaContract

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

type SchemaContractOperationPredicate

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

func (SchemaContractOperationPredicate) Matches

type SchemaContractProperties

type SchemaContractProperties struct {
	ContentType string                   `json:"contentType"`
	Document    SchemaDocumentProperties `json:"document"`
}

type SchemaDocumentProperties

type SchemaDocumentProperties struct {
	Components  *interface{} `json:"components,omitempty"`
	Definitions *interface{} `json:"definitions,omitempty"`
	Value       *string      `json:"value,omitempty"`
}

type WorkspaceApiId

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

WorkspaceApiId is a struct representing the Resource ID for a Workspace Api

func NewWorkspaceApiID

func NewWorkspaceApiID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, apiId string) WorkspaceApiId

NewWorkspaceApiID returns a new WorkspaceApiId struct

func ParseWorkspaceApiID

func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error)

ParseWorkspaceApiID parses 'input' into a WorkspaceApiId

func ParseWorkspaceApiIDInsensitively

func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error)

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

func (*WorkspaceApiId) FromParseResult

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

func (WorkspaceApiId) ID

func (id WorkspaceApiId) ID() string

ID returns the formatted Workspace Api ID

func (WorkspaceApiId) Segments

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

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

func (WorkspaceApiId) String

func (id WorkspaceApiId) String() string

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

type WorkspaceApiSchemaCreateOrUpdateOperationOptions

type WorkspaceApiSchemaCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceApiSchemaCreateOrUpdateOperationOptions

func DefaultWorkspaceApiSchemaCreateOrUpdateOperationOptions() WorkspaceApiSchemaCreateOrUpdateOperationOptions

func (WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToOData

func (WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToQuery

type WorkspaceApiSchemaCreateOrUpdateOperationResponse

type WorkspaceApiSchemaCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SchemaContract
}

type WorkspaceApiSchemaDeleteOperationOptions

type WorkspaceApiSchemaDeleteOperationOptions struct {
	Force   *bool
	IfMatch *string
}

func DefaultWorkspaceApiSchemaDeleteOperationOptions

func DefaultWorkspaceApiSchemaDeleteOperationOptions() WorkspaceApiSchemaDeleteOperationOptions

func (WorkspaceApiSchemaDeleteOperationOptions) ToHeaders

func (WorkspaceApiSchemaDeleteOperationOptions) ToOData

func (WorkspaceApiSchemaDeleteOperationOptions) ToQuery

type WorkspaceApiSchemaDeleteOperationResponse

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

type WorkspaceApiSchemaGetEntityTagOperationResponse

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

type WorkspaceApiSchemaGetOperationResponse

type WorkspaceApiSchemaGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SchemaContract
}

type WorkspaceApiSchemaId

type WorkspaceApiSchemaId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceId       string
	ApiId             string
	SchemaId          string
}

WorkspaceApiSchemaId is a struct representing the Resource ID for a Workspace Api Schema

func NewWorkspaceApiSchemaID

func NewWorkspaceApiSchemaID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, apiId string, schemaId string) WorkspaceApiSchemaId

NewWorkspaceApiSchemaID returns a new WorkspaceApiSchemaId struct

func ParseWorkspaceApiSchemaID

func ParseWorkspaceApiSchemaID(input string) (*WorkspaceApiSchemaId, error)

ParseWorkspaceApiSchemaID parses 'input' into a WorkspaceApiSchemaId

func ParseWorkspaceApiSchemaIDInsensitively

func ParseWorkspaceApiSchemaIDInsensitively(input string) (*WorkspaceApiSchemaId, error)

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

func (*WorkspaceApiSchemaId) FromParseResult

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

func (WorkspaceApiSchemaId) ID

func (id WorkspaceApiSchemaId) ID() string

ID returns the formatted Workspace Api Schema ID

func (WorkspaceApiSchemaId) Segments

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

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

func (WorkspaceApiSchemaId) String

func (id WorkspaceApiSchemaId) String() string

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

type WorkspaceApiSchemaListByApiCompleteResult

type WorkspaceApiSchemaListByApiCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SchemaContract
}

type WorkspaceApiSchemaListByApiCustomPager

type WorkspaceApiSchemaListByApiCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type WorkspaceApiSchemaListByApiOperationOptions

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

func DefaultWorkspaceApiSchemaListByApiOperationOptions

func DefaultWorkspaceApiSchemaListByApiOperationOptions() WorkspaceApiSchemaListByApiOperationOptions

func (WorkspaceApiSchemaListByApiOperationOptions) ToHeaders

func (WorkspaceApiSchemaListByApiOperationOptions) ToOData

func (WorkspaceApiSchemaListByApiOperationOptions) ToQuery

type WorkspaceApiSchemaListByApiOperationResponse

type WorkspaceApiSchemaListByApiOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SchemaContract
}

Jump to

Keyboard shortcuts

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