graphqlapiresolver

package
v0.20240612.1122027 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

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

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

Client Initialization

client := graphqlapiresolver.NewGraphQLApiResolverClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GraphQLApiResolverClient.CreateOrUpdate

ctx := context.TODO()
id := graphqlapiresolver.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

payload := graphqlapiresolver.ResolverContract{
	// ...
}


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

Example Usage: GraphQLApiResolverClient.Delete

ctx := context.TODO()
id := graphqlapiresolver.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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

Example Usage: GraphQLApiResolverClient.Get

ctx := context.TODO()
id := graphqlapiresolver.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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

ctx := context.TODO()
id := graphqlapiresolver.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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: GraphQLApiResolverClient.ListByApi

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

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

Example Usage: GraphQLApiResolverClient.Update

ctx := context.TODO()
id := graphqlapiresolver.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

payload := graphqlapiresolver.ResolverUpdateContract{
	// ...
}


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

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 ValidateResolverID

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

ValidateResolverID checks that 'input' can be parsed as a Resolver 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 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 {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ResolverContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	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        *ResolverContract
}

type GraphQLApiResolverClient

type GraphQLApiResolverClient struct {
	Client *resourcemanager.Client
}

func NewGraphQLApiResolverClientWithBaseURI

func NewGraphQLApiResolverClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverClient, error)

func (GraphQLApiResolverClient) CreateOrUpdate

CreateOrUpdate ...

func (GraphQLApiResolverClient) Delete

Delete ...

func (GraphQLApiResolverClient) Get

Get ...

func (GraphQLApiResolverClient) GetEntityTag

GetEntityTag ...

func (GraphQLApiResolverClient) ListByApi

ListByApi ...

func (GraphQLApiResolverClient) ListByApiComplete

ListByApiComplete retrieves all the results into a single object

func (GraphQLApiResolverClient) ListByApiCompleteMatchingPredicate

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

ListByApiCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GraphQLApiResolverClient) Update

Update ...

type ListByApiCompleteResult

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

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        *[]ResolverContract
}

type ResolverContract

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

type ResolverContractOperationPredicate

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

func (ResolverContractOperationPredicate) Matches

type ResolverEntityBaseContract

type ResolverEntityBaseContract struct {
	Description *string `json:"description,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	Path        *string `json:"path,omitempty"`
}

type ResolverId

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

ResolverId is a struct representing the Resource ID for a Resolver

func NewResolverID

func NewResolverID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, resolverId string) ResolverId

NewResolverID returns a new ResolverId struct

func ParseResolverID

func ParseResolverID(input string) (*ResolverId, error)

ParseResolverID parses 'input' into a ResolverId

func ParseResolverIDInsensitively

func ParseResolverIDInsensitively(input string) (*ResolverId, error)

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

func (*ResolverId) FromParseResult

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

func (ResolverId) ID

func (id ResolverId) ID() string

ID returns the formatted Resolver ID

func (ResolverId) Segments

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

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

func (ResolverId) String

func (id ResolverId) String() string

String returns a human-readable description of this Resolver ID

type ResolverUpdateContract

type ResolverUpdateContract struct {
	Properties *ResolverUpdateContractProperties `json:"properties,omitempty"`
}

type ResolverUpdateContractProperties

type ResolverUpdateContractProperties struct {
	Description *string `json:"description,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	Path        *string `json:"path,omitempty"`
}

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders

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

func (UpdateOperationOptions) ToOData

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

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ResolverContract
}

Jump to

Keyboard shortcuts

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