contenttype

package
v0.20241126.2320 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: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/contenttype Documentation

The contenttype SDK allows for interaction with Azure Resource Manager apimanagement (API Version 2022-08-01).

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/2022-08-01/contenttype"

Client Initialization

client := contenttype.NewContentTypeClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ContentTypeClient.CreateOrUpdate

ctx := context.TODO()
id := contenttype.NewContentTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "contentTypeId")

payload := contenttype.ContentTypeContract{
	// ...
}


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

Example Usage: ContentTypeClient.Delete

ctx := context.TODO()
id := contenttype.NewContentTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "contentTypeId")

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

Example Usage: ContentTypeClient.Get

ctx := context.TODO()
id := contenttype.NewContentTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "contentTypeId")

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: ContentTypeClient.ListByService

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

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

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

ValidateContentTypeID checks that 'input' can be parsed as a Content Type ID

func ValidateServiceID

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

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

Types

type ContentTypeClient

type ContentTypeClient struct {
	Client *resourcemanager.Client
}

func NewContentTypeClientWithBaseURI

func NewContentTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeClient, error)

func (ContentTypeClient) CreateOrUpdate

CreateOrUpdate ...

func (ContentTypeClient) Delete

Delete ...

func (ContentTypeClient) Get

Get ...

func (ContentTypeClient) ListByService

func (c ContentTypeClient) ListByService(ctx context.Context, id ServiceId) (result ListByServiceOperationResponse, err error)

ListByService ...

func (ContentTypeClient) ListByServiceComplete

func (c ContentTypeClient) ListByServiceComplete(ctx context.Context, id ServiceId) (ListByServiceCompleteResult, error)

ListByServiceComplete retrieves all the results into a single object

func (ContentTypeClient) ListByServiceCompleteMatchingPredicate

func (c ContentTypeClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, predicate ContentTypeContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ContentTypeContract

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

type ContentTypeContractOperationPredicate

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

func (ContentTypeContractOperationPredicate) Matches

type ContentTypeContractProperties

type ContentTypeContractProperties struct {
	Description *string      `json:"description,omitempty"`
	Id          *string      `json:"id,omitempty"`
	Name        *string      `json:"name,omitempty"`
	Schema      *interface{} `json:"schema,omitempty"`
	Version     *string      `json:"version,omitempty"`
}

type ContentTypeId

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

ContentTypeId is a struct representing the Resource ID for a Content Type

func NewContentTypeID

func NewContentTypeID(subscriptionId string, resourceGroupName string, serviceName string, contentTypeId string) ContentTypeId

NewContentTypeID returns a new ContentTypeId struct

func ParseContentTypeID

func ParseContentTypeID(input string) (*ContentTypeId, error)

ParseContentTypeID parses 'input' into a ContentTypeId

func ParseContentTypeIDInsensitively

func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error)

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

func (*ContentTypeId) FromParseResult

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

func (ContentTypeId) ID

func (id ContentTypeId) ID() string

ID returns the formatted Content Type ID

func (ContentTypeId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Content Type ID

func (ContentTypeId) String

func (id ContentTypeId) String() string

String returns a human-readable description of this Content Type 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        *ContentTypeContract
}

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 GetOperationResponse

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ContentTypeContract
}

type ListByServiceCustomPager

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

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ContentTypeContract
}

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) FromParseResult

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

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

Jump to

Keyboard shortcuts

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