timezones

package
v0.20231214.1160726 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-11-01/timezones Documentation

The timezones SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-11-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/sql/2021-11-01/timezones"

Client Initialization

client := timezones.NewTimeZonesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TimeZonesClient.Get

ctx := context.TODO()
id := timezones.NewTimeZoneID("12345678-1234-9876-4563-123456789012", "locationValue", "timeZoneIdValue")

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: TimeZonesClient.ListByLocation

ctx := context.TODO()
id := timezones.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

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

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

func ValidateTimeZoneID

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

ValidateTimeZoneID checks that 'input' can be parsed as a Time Zone ID

Types

type GetOperationResponse

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

type ListByLocationCompleteResult

type ListByLocationCompleteResult struct {
	Items []TimeZone
}

type ListByLocationOperationResponse

type ListByLocationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TimeZone
}

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (*LocationId) FromParseResult added in v0.20231127.1171502

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type TimeZone

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

type TimeZoneId

type TimeZoneId struct {
	SubscriptionId string
	LocationName   string
	TimeZoneId     string
}

TimeZoneId is a struct representing the Resource ID for a Time Zone

func NewTimeZoneID

func NewTimeZoneID(subscriptionId string, locationName string, timeZoneId string) TimeZoneId

NewTimeZoneID returns a new TimeZoneId struct

func ParseTimeZoneID

func ParseTimeZoneID(input string) (*TimeZoneId, error)

ParseTimeZoneID parses 'input' into a TimeZoneId

func ParseTimeZoneIDInsensitively

func ParseTimeZoneIDInsensitively(input string) (*TimeZoneId, error)

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

func (*TimeZoneId) FromParseResult added in v0.20231127.1171502

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

func (TimeZoneId) ID

func (id TimeZoneId) ID() string

ID returns the formatted Time Zone ID

func (TimeZoneId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Time Zone ID

func (TimeZoneId) String

func (id TimeZoneId) String() string

String returns a human-readable description of this Time Zone ID

type TimeZoneOperationPredicate

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

func (TimeZoneOperationPredicate) Matches

func (p TimeZoneOperationPredicate) Matches(input TimeZone) bool

type TimeZoneProperties

type TimeZoneProperties struct {
	DisplayName *string `json:"displayName,omitempty"`
	TimeZoneId  *string `json:"timeZoneId,omitempty"`
}

type TimeZonesClient

type TimeZonesClient struct {
	Client *resourcemanager.Client
}

func NewTimeZonesClientWithBaseURI

func NewTimeZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*TimeZonesClient, error)

func (TimeZonesClient) Get

func (c TimeZonesClient) Get(ctx context.Context, id TimeZoneId) (result GetOperationResponse, err error)

Get ...

func (TimeZonesClient) ListByLocation

func (c TimeZonesClient) ListByLocation(ctx context.Context, id LocationId) (result ListByLocationOperationResponse, err error)

ListByLocation ...

func (TimeZonesClient) ListByLocationComplete

func (c TimeZonesClient) ListByLocationComplete(ctx context.Context, id LocationId) (ListByLocationCompleteResult, error)

ListByLocationComplete retrieves all the results into a single object

func (TimeZonesClient) ListByLocationCompleteMatchingPredicate

func (c TimeZonesClient) ListByLocationCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate TimeZoneOperationPredicate) (result ListByLocationCompleteResult, err error)

ListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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