contenttype

package
v0.20230127.1133443 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

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

The contenttype SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-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/2021-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", "serviceValue", "contentTypeIdValue")

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", "serviceValue", "contentTypeIdValue")

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", "serviceValue", "contentTypeIdValue")

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", "serviceValue")

// 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 autorest.Client
	// contains filtered or unexported fields
}

func NewContentTypeClientWithBaseURI

func NewContentTypeClientWithBaseURI(endpoint string) ContentTypeClient

func (ContentTypeClient) CreateOrUpdate

CreateOrUpdate ...

func (ContentTypeClient) Delete

Delete ...

func (ContentTypeClient) Get

Get ...

func (ContentTypeClient) ListByService

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

ListByService ...

func (ContentTypeClient) ListByServiceComplete

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

ListByServiceComplete retrieves all of the results into a single object

func (ContentTypeClient) ListByServiceCompleteMatchingPredicate

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

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied 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) 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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ContentTypeContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []ContentTypeContract
}

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ContentTypeContract
	// contains filtered or unexported fields
}

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

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

Jump to

Keyboard shortcuts

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