testlines

package
v0.20240304.1112406 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-09-01/testlines Documentation

The testlines SDK allows for interaction with the Azure Resource Manager Service voiceservices (API Version 2023-09-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/voiceservices/2023-09-01/testlines"

Client Initialization

client := testlines.NewTestLinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TestLinesClient.CreateOrUpdate

ctx := context.TODO()
id := testlines.NewTestLineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationsGatewayValue", "testLineValue")

payload := testlines.TestLine{
	// ...
}


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

Example Usage: TestLinesClient.Delete

ctx := context.TODO()
id := testlines.NewTestLineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationsGatewayValue", "testLineValue")

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

Example Usage: TestLinesClient.Get

ctx := context.TODO()
id := testlines.NewTestLineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationsGatewayValue", "testLineValue")

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: TestLinesClient.ListByCommunicationsGateway

ctx := context.TODO()
id := testlines.NewCommunicationsGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationsGatewayValue")

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

Example Usage: TestLinesClient.Update

ctx := context.TODO()
id := testlines.NewTestLineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "communicationsGatewayValue", "testLineValue")

payload := testlines.TestLineUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForTestLinePurpose

func PossibleValuesForTestLinePurpose() []string

func ValidateCommunicationsGatewayID

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

ValidateCommunicationsGatewayID checks that 'input' can be parsed as a Communications Gateway ID

func ValidateTestLineID

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

ValidateTestLineID checks that 'input' can be parsed as a Test Line ID

Types

type CommunicationsGatewayId

type CommunicationsGatewayId struct {
	SubscriptionId            string
	ResourceGroupName         string
	CommunicationsGatewayName string
}

CommunicationsGatewayId is a struct representing the Resource ID for a Communications Gateway

func NewCommunicationsGatewayID

func NewCommunicationsGatewayID(subscriptionId string, resourceGroupName string, communicationsGatewayName string) CommunicationsGatewayId

NewCommunicationsGatewayID returns a new CommunicationsGatewayId struct

func ParseCommunicationsGatewayID

func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error)

ParseCommunicationsGatewayID parses 'input' into a CommunicationsGatewayId

func ParseCommunicationsGatewayIDInsensitively

func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGatewayId, error)

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

func (*CommunicationsGatewayId) FromParseResult

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

func (CommunicationsGatewayId) ID

ID returns the formatted Communications Gateway ID

func (CommunicationsGatewayId) Segments

Segments returns a slice of Resource ID Segments which comprise this Communications Gateway ID

func (CommunicationsGatewayId) String

func (id CommunicationsGatewayId) String() string

String returns a human-readable description of this Communications Gateway ID

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TestLine
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByCommunicationsGatewayCompleteResult

type ListByCommunicationsGatewayCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []TestLine
}

type ListByCommunicationsGatewayOperationResponse

type ListByCommunicationsGatewayOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TestLine
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type TestLine

type TestLine struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *TestLineProperties    `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type TestLineId

type TestLineId struct {
	SubscriptionId            string
	ResourceGroupName         string
	CommunicationsGatewayName string
	TestLineName              string
}

TestLineId is a struct representing the Resource ID for a Test Line

func NewTestLineID

func NewTestLineID(subscriptionId string, resourceGroupName string, communicationsGatewayName string, testLineName string) TestLineId

NewTestLineID returns a new TestLineId struct

func ParseTestLineID

func ParseTestLineID(input string) (*TestLineId, error)

ParseTestLineID parses 'input' into a TestLineId

func ParseTestLineIDInsensitively

func ParseTestLineIDInsensitively(input string) (*TestLineId, error)

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

func (*TestLineId) FromParseResult

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

func (TestLineId) ID

func (id TestLineId) ID() string

ID returns the formatted Test Line ID

func (TestLineId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Test Line ID

func (TestLineId) String

func (id TestLineId) String() string

String returns a human-readable description of this Test Line ID

type TestLineOperationPredicate

type TestLineOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (TestLineOperationPredicate) Matches

func (p TestLineOperationPredicate) Matches(input TestLine) bool

type TestLineProperties

type TestLineProperties struct {
	PhoneNumber       string             `json:"phoneNumber"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Purpose           TestLinePurpose    `json:"purpose"`
}

type TestLinePurpose

type TestLinePurpose string
const (
	TestLinePurposeAutomated TestLinePurpose = "Automated"
	TestLinePurposeManual    TestLinePurpose = "Manual"
)

func (*TestLinePurpose) UnmarshalJSON

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

type TestLineUpdate

type TestLineUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type TestLinesClient

type TestLinesClient struct {
	Client *resourcemanager.Client
}

func NewTestLinesClientWithBaseURI

func NewTestLinesClientWithBaseURI(sdkApi sdkEnv.Api) (*TestLinesClient, error)

func (TestLinesClient) CreateOrUpdate

func (c TestLinesClient) CreateOrUpdate(ctx context.Context, id TestLineId, input TestLine) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (TestLinesClient) CreateOrUpdateThenPoll

func (c TestLinesClient) CreateOrUpdateThenPoll(ctx context.Context, id TestLineId, input TestLine) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (TestLinesClient) Delete

func (c TestLinesClient) Delete(ctx context.Context, id TestLineId) (result DeleteOperationResponse, err error)

Delete ...

func (TestLinesClient) DeleteThenPoll

func (c TestLinesClient) DeleteThenPoll(ctx context.Context, id TestLineId) error

DeleteThenPoll performs Delete then polls until it's completed

func (TestLinesClient) Get

func (c TestLinesClient) Get(ctx context.Context, id TestLineId) (result GetOperationResponse, err error)

Get ...

func (TestLinesClient) ListByCommunicationsGateway

ListByCommunicationsGateway ...

func (TestLinesClient) ListByCommunicationsGatewayComplete

ListByCommunicationsGatewayComplete retrieves all the results into a single object

func (TestLinesClient) ListByCommunicationsGatewayCompleteMatchingPredicate

func (c TestLinesClient) ListByCommunicationsGatewayCompleteMatchingPredicate(ctx context.Context, id CommunicationsGatewayId, predicate TestLineOperationPredicate) (result ListByCommunicationsGatewayCompleteResult, err error)

ListByCommunicationsGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TestLinesClient) Update

func (c TestLinesClient) Update(ctx context.Context, id TestLineId, input TestLineUpdate) (result UpdateOperationResponse, err error)

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TestLine
}

Jump to

Keyboard shortcuts

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