productapi

package
v0.20240903.1111904 Latest Latest
Warning

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

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

README

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

The productapi 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/productapi"

Client Initialization

client := productapi.NewProductApiClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProductApiClient.CheckEntityExists

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

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

Example Usage: ProductApiClient.CreateOrUpdate

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

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

Example Usage: ProductApiClient.Delete

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

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

Example Usage: ProductApiClient.ListByProduct

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

// alternatively `client.ListByProduct(ctx, id, productapi.DefaultListByProductOperationOptions())` can be used to do batched pagination
items, err := client.ListByProductComplete(ctx, id, productapi.DefaultListByProductOperationOptions())
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 PossibleValuesForApiType

func PossibleValuesForApiType() []string

func PossibleValuesForBearerTokenSendingMethods

func PossibleValuesForBearerTokenSendingMethods() []string

func PossibleValuesForProtocol

func PossibleValuesForProtocol() []string

func PossibleValuesForVersioningScheme

func PossibleValuesForVersioningScheme() []string

func ValidateProductApiID

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

ValidateProductApiID checks that 'input' can be parsed as a Product Api ID

func ValidateProductID

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

ValidateProductID checks that 'input' can be parsed as a Product ID

Types

type ApiContactInformation

type ApiContactInformation struct {
	Email *string `json:"email,omitempty"`
	Name  *string `json:"name,omitempty"`
	Url   *string `json:"url,omitempty"`
}

type ApiContract

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

type ApiContractOperationPredicate

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

func (ApiContractOperationPredicate) Matches

type ApiContractProperties

type ApiContractProperties struct {
	ApiRevision                   *string                                `json:"apiRevision,omitempty"`
	ApiRevisionDescription        *string                                `json:"apiRevisionDescription,omitempty"`
	ApiVersion                    *string                                `json:"apiVersion,omitempty"`
	ApiVersionDescription         *string                                `json:"apiVersionDescription,omitempty"`
	ApiVersionSet                 *ApiVersionSetContractDetails          `json:"apiVersionSet,omitempty"`
	ApiVersionSetId               *string                                `json:"apiVersionSetId,omitempty"`
	AuthenticationSettings        *AuthenticationSettingsContract        `json:"authenticationSettings,omitempty"`
	Contact                       *ApiContactInformation                 `json:"contact,omitempty"`
	Description                   *string                                `json:"description,omitempty"`
	DisplayName                   *string                                `json:"displayName,omitempty"`
	IsCurrent                     *bool                                  `json:"isCurrent,omitempty"`
	IsOnline                      *bool                                  `json:"isOnline,omitempty"`
	License                       *ApiLicenseInformation                 `json:"license,omitempty"`
	Path                          string                                 `json:"path"`
	Protocols                     *[]Protocol                            `json:"protocols,omitempty"`
	ProvisioningState             *string                                `json:"provisioningState,omitempty"`
	ServiceUrl                    *string                                `json:"serviceUrl,omitempty"`
	SourceApiId                   *string                                `json:"sourceApiId,omitempty"`
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
	SubscriptionRequired          *bool                                  `json:"subscriptionRequired,omitempty"`
	TermsOfServiceUrl             *string                                `json:"termsOfServiceUrl,omitempty"`
	Type                          *ApiType                               `json:"type,omitempty"`
}

type ApiLicenseInformation

type ApiLicenseInformation struct {
	Name *string `json:"name,omitempty"`
	Url  *string `json:"url,omitempty"`
}

type ApiType

type ApiType string
const (
	ApiTypeGraphql   ApiType = "graphql"
	ApiTypeGrpc      ApiType = "grpc"
	ApiTypeHTTP      ApiType = "http"
	ApiTypeOdata     ApiType = "odata"
	ApiTypeSoap      ApiType = "soap"
	ApiTypeWebsocket ApiType = "websocket"
)

func (*ApiType) UnmarshalJSON

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

type ApiVersionSetContractDetails

type ApiVersionSetContractDetails struct {
	Description       *string           `json:"description,omitempty"`
	Id                *string           `json:"id,omitempty"`
	Name              *string           `json:"name,omitempty"`
	VersionHeaderName *string           `json:"versionHeaderName,omitempty"`
	VersionQueryName  *string           `json:"versionQueryName,omitempty"`
	VersioningScheme  *VersioningScheme `json:"versioningScheme,omitempty"`
}

type AuthenticationSettingsContract

type AuthenticationSettingsContract struct {
	OAuth2                       *OAuth2AuthenticationSettingsContract   `json:"oAuth2,omitempty"`
	OAuth2AuthenticationSettings *[]OAuth2AuthenticationSettingsContract `json:"oAuth2AuthenticationSettings,omitempty"`
	Openid                       *OpenIdAuthenticationSettingsContract   `json:"openid,omitempty"`
	OpenidAuthenticationSettings *[]OpenIdAuthenticationSettingsContract `json:"openidAuthenticationSettings,omitempty"`
}

type BearerTokenSendingMethods

type BearerTokenSendingMethods string
const (
	BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader"
	BearerTokenSendingMethodsQuery               BearerTokenSendingMethods = "query"
)

func (*BearerTokenSendingMethods) UnmarshalJSON

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

type CheckEntityExistsOperationResponse

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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApiContract
}

type DeleteOperationResponse

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

type ListByProductCompleteResult

type ListByProductCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ApiContract
}

type ListByProductCustomPager added in v0.20240628.1153531

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

type ListByProductOperationOptions

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

func DefaultListByProductOperationOptions

func DefaultListByProductOperationOptions() ListByProductOperationOptions

func (ListByProductOperationOptions) ToHeaders

func (ListByProductOperationOptions) ToOData

func (ListByProductOperationOptions) ToQuery

type ListByProductOperationResponse

type ListByProductOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ApiContract
}

type OAuth2AuthenticationSettingsContract

type OAuth2AuthenticationSettingsContract struct {
	AuthorizationServerId *string `json:"authorizationServerId,omitempty"`
	Scope                 *string `json:"scope,omitempty"`
}

type OpenIdAuthenticationSettingsContract

type OpenIdAuthenticationSettingsContract struct {
	BearerTokenSendingMethods *[]BearerTokenSendingMethods `json:"bearerTokenSendingMethods,omitempty"`
	OpenidProviderId          *string                      `json:"openidProviderId,omitempty"`
}

type ProductApiClient

type ProductApiClient struct {
	Client *resourcemanager.Client
}

func NewProductApiClientWithBaseURI

func NewProductApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiClient, error)

func (ProductApiClient) CheckEntityExists

func (c ProductApiClient) CheckEntityExists(ctx context.Context, id ProductApiId) (result CheckEntityExistsOperationResponse, err error)

CheckEntityExists ...

func (ProductApiClient) CreateOrUpdate

func (c ProductApiClient) CreateOrUpdate(ctx context.Context, id ProductApiId) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ProductApiClient) Delete

Delete ...

func (ProductApiClient) ListByProduct

ListByProduct ...

func (ProductApiClient) ListByProductComplete

ListByProductComplete retrieves all the results into a single object

func (ProductApiClient) ListByProductCompleteMatchingPredicate

func (c ProductApiClient) ListByProductCompleteMatchingPredicate(ctx context.Context, id ProductId, options ListByProductOperationOptions, predicate ApiContractOperationPredicate) (result ListByProductCompleteResult, err error)

ListByProductCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ProductApiId

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

ProductApiId is a struct representing the Resource ID for a Product Api

func NewProductApiID

func NewProductApiID(subscriptionId string, resourceGroupName string, serviceName string, productId string, apiId string) ProductApiId

NewProductApiID returns a new ProductApiId struct

func ParseProductApiID

func ParseProductApiID(input string) (*ProductApiId, error)

ParseProductApiID parses 'input' into a ProductApiId

func ParseProductApiIDInsensitively

func ParseProductApiIDInsensitively(input string) (*ProductApiId, error)

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

func (*ProductApiId) FromParseResult

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

func (ProductApiId) ID

func (id ProductApiId) ID() string

ID returns the formatted Product Api ID

func (ProductApiId) Segments

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

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

func (ProductApiId) String

func (id ProductApiId) String() string

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

type ProductId

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

ProductId is a struct representing the Resource ID for a Product

func NewProductID

func NewProductID(subscriptionId string, resourceGroupName string, serviceName string, productId string) ProductId

NewProductID returns a new ProductId struct

func ParseProductID

func ParseProductID(input string) (*ProductId, error)

ParseProductID parses 'input' into a ProductId

func ParseProductIDInsensitively

func ParseProductIDInsensitively(input string) (*ProductId, error)

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

func (*ProductId) FromParseResult

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

func (ProductId) ID

func (id ProductId) ID() string

ID returns the formatted Product ID

func (ProductId) Segments

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

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

func (ProductId) String

func (id ProductId) String() string

String returns a human-readable description of this Product ID

type Protocol

type Protocol string
const (
	ProtocolHTTP  Protocol = "http"
	ProtocolHTTPS Protocol = "https"
	ProtocolWs    Protocol = "ws"
	ProtocolWss   Protocol = "wss"
)

func (*Protocol) UnmarshalJSON

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

type SubscriptionKeyParameterNamesContract

type SubscriptionKeyParameterNamesContract struct {
	Header *string `json:"header,omitempty"`
	Query  *string `json:"query,omitempty"`
}

type VersioningScheme

type VersioningScheme string
const (
	VersioningSchemeHeader  VersioningScheme = "Header"
	VersioningSchemeQuery   VersioningScheme = "Query"
	VersioningSchemeSegment VersioningScheme = "Segment"
)

func (*VersioningScheme) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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