portalrevision

package
v0.20230904.1142308 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

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

Client Initialization

client := portalrevision.NewPortalRevisionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PortalRevisionClient.CreateOrUpdate

ctx := context.TODO()
id := portalrevision.NewPortalRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalRevisionIdValue")

payload := portalrevision.PortalRevisionContract{
	// ...
}


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

Example Usage: PortalRevisionClient.Get

ctx := context.TODO()
id := portalrevision.NewPortalRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalRevisionIdValue")

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

ctx := context.TODO()
id := portalrevision.NewPortalRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalRevisionIdValue")

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

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

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

Example Usage: PortalRevisionClient.Update

ctx := context.TODO()
id := portalrevision.NewPortalRevisionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalRevisionIdValue")

payload := portalrevision.PortalRevisionContract{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload, portalrevision.DefaultUpdateOperationOptions()); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForPortalRevisionStatus

func PossibleValuesForPortalRevisionStatus() []string

func ValidatePortalRevisionID

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

ValidatePortalRevisionID checks that 'input' can be parsed as a Portal Revision 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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	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        *PortalRevisionContract
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []PortalRevisionContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToOData added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToQuery added in v0.20230801.1071415

type ListByServiceOperationResponse

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

type PortalRevisionClient

type PortalRevisionClient struct {
	Client *resourcemanager.Client
}

func NewPortalRevisionClientWithBaseURI

func NewPortalRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalRevisionClient, error)

func (PortalRevisionClient) CreateOrUpdate

CreateOrUpdate ...

func (PortalRevisionClient) CreateOrUpdateThenPoll

func (c PortalRevisionClient) CreateOrUpdateThenPoll(ctx context.Context, id PortalRevisionId, input PortalRevisionContract) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PortalRevisionClient) Get

Get ...

func (PortalRevisionClient) GetEntityTag

GetEntityTag ...

func (PortalRevisionClient) ListByService

ListByService ...

func (PortalRevisionClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (PortalRevisionClient) ListByServiceCompleteMatchingPredicate

func (c PortalRevisionClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate PortalRevisionContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PortalRevisionClient) Update

Update ...

func (PortalRevisionClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type PortalRevisionContract

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

type PortalRevisionContractOperationPredicate

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

func (PortalRevisionContractOperationPredicate) Matches

type PortalRevisionContractProperties

type PortalRevisionContractProperties struct {
	CreatedDateTime *string               `json:"createdDateTime,omitempty"`
	Description     *string               `json:"description,omitempty"`
	IsCurrent       *bool                 `json:"isCurrent,omitempty"`
	Status          *PortalRevisionStatus `json:"status,omitempty"`
	StatusDetails   *string               `json:"statusDetails,omitempty"`
	UpdatedDateTime *string               `json:"updatedDateTime,omitempty"`
}

func (*PortalRevisionContractProperties) GetCreatedDateTimeAsTime

func (o *PortalRevisionContractProperties) GetCreatedDateTimeAsTime() (*time.Time, error)

func (*PortalRevisionContractProperties) GetUpdatedDateTimeAsTime

func (o *PortalRevisionContractProperties) GetUpdatedDateTimeAsTime() (*time.Time, error)

func (*PortalRevisionContractProperties) SetCreatedDateTimeAsTime

func (o *PortalRevisionContractProperties) SetCreatedDateTimeAsTime(input time.Time)

func (*PortalRevisionContractProperties) SetUpdatedDateTimeAsTime

func (o *PortalRevisionContractProperties) SetUpdatedDateTimeAsTime(input time.Time)

type PortalRevisionId

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

PortalRevisionId is a struct representing the Resource ID for a Portal Revision

func NewPortalRevisionID

func NewPortalRevisionID(subscriptionId string, resourceGroupName string, serviceName string, portalRevisionId string) PortalRevisionId

NewPortalRevisionID returns a new PortalRevisionId struct

func ParsePortalRevisionID

func ParsePortalRevisionID(input string) (*PortalRevisionId, error)

ParsePortalRevisionID parses 'input' into a PortalRevisionId

func ParsePortalRevisionIDInsensitively

func ParsePortalRevisionIDInsensitively(input string) (*PortalRevisionId, error)

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

func (PortalRevisionId) ID

func (id PortalRevisionId) ID() string

ID returns the formatted Portal Revision ID

func (PortalRevisionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Portal Revision ID

func (PortalRevisionId) String

func (id PortalRevisionId) String() string

String returns a human-readable description of this Portal Revision ID

type PortalRevisionStatus

type PortalRevisionStatus string
const (
	PortalRevisionStatusCompleted  PortalRevisionStatus = "completed"
	PortalRevisionStatusFailed     PortalRevisionStatus = "failed"
	PortalRevisionStatusPending    PortalRevisionStatus = "pending"
	PortalRevisionStatusPublishing PortalRevisionStatus = "publishing"
)

func (*PortalRevisionStatus) UnmarshalJSON added in v0.20230801.1071415

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

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

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders added in v0.20230801.1071415

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

func (UpdateOperationOptions) ToOData added in v0.20230801.1071415

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

func (UpdateOperationOptions) ToQuery added in v0.20230801.1071415

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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