spacecraft

package
v0.20241111.1164443 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft Documentation

The spacecraft SDK allows for interaction with Azure Resource Manager orbital (API Version 2022-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft"

Client Initialization

client := spacecraft.NewSpacecraftClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SpacecraftClient.CreateOrUpdate

ctx := context.TODO()
id := spacecraft.NewSpacecraftID("12345678-1234-9876-4563-123456789012", "example-resource-group", "spacecraftName")

payload := spacecraft.Spacecraft{
	// ...
}


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

Example Usage: SpacecraftClient.Delete

ctx := context.TODO()
id := spacecraft.NewSpacecraftID("12345678-1234-9876-4563-123456789012", "example-resource-group", "spacecraftName")

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

Example Usage: SpacecraftClient.Get

ctx := context.TODO()
id := spacecraft.NewSpacecraftID("12345678-1234-9876-4563-123456789012", "example-resource-group", "spacecraftName")

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: SpacecraftClient.List

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

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

Example Usage: SpacecraftClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: SpacecraftClient.UpdateTags

ctx := context.TODO()
id := spacecraft.NewSpacecraftID("12345678-1234-9876-4563-123456789012", "example-resource-group", "spacecraftName")

payload := spacecraft.TagsObject{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDirection

func PossibleValuesForDirection() []string

func PossibleValuesForPolarization

func PossibleValuesForPolarization() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateSpacecraftID

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

ValidateSpacecraftID checks that 'input' can be parsed as a Spacecraft ID

Types

type AuthorizedGroundstation

type AuthorizedGroundstation struct {
	ExpirationDate string `json:"expirationDate"`
	GroundStation  string `json:"groundStation"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Direction

type Direction string
const (
	DirectionDownlink Direction = "Downlink"
	DirectionUplink   Direction = "Uplink"
)

func (*Direction) UnmarshalJSON

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

type GetOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Spacecraft
}

type ListBySubscriptionCustomPager added in v0.20240628.1153531

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

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Spacecraft
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Spacecraft
}

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Spacecraft
}

type Polarization

type Polarization string
const (
	PolarizationLHCP             Polarization = "LHCP"
	PolarizationLinearHorizontal Polarization = "linearHorizontal"
	PolarizationLinearVertical   Polarization = "linearVertical"
	PolarizationRHCP             Polarization = "RHCP"
)

func (*Polarization) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "canceled"
	ProvisioningStateCreating  ProvisioningState = "creating"
	ProvisioningStateDeleting  ProvisioningState = "deleting"
	ProvisioningStateFailed    ProvisioningState = "failed"
	ProvisioningStateSucceeded ProvisioningState = "succeeded"
	ProvisioningStateUpdating  ProvisioningState = "updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type Spacecraft

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

type SpacecraftClient

type SpacecraftClient struct {
	Client *resourcemanager.Client
}

func NewSpacecraftClientWithBaseURI

func NewSpacecraftClientWithBaseURI(sdkApi sdkEnv.Api) (*SpacecraftClient, error)

func (SpacecraftClient) CreateOrUpdate

func (c SpacecraftClient) CreateOrUpdate(ctx context.Context, id SpacecraftId, input Spacecraft) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SpacecraftClient) CreateOrUpdateThenPoll

func (c SpacecraftClient) CreateOrUpdateThenPoll(ctx context.Context, id SpacecraftId, input Spacecraft) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SpacecraftClient) Delete

Delete ...

func (SpacecraftClient) DeleteThenPoll

func (c SpacecraftClient) DeleteThenPoll(ctx context.Context, id SpacecraftId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SpacecraftClient) Get

Get ...

func (SpacecraftClient) List

List ...

func (SpacecraftClient) ListBySubscription

ListBySubscription ...

func (SpacecraftClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (SpacecraftClient) ListBySubscriptionCompleteMatchingPredicate

func (c SpacecraftClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SpacecraftOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SpacecraftClient) ListComplete

ListComplete retrieves all the results into a single object

func (SpacecraftClient) ListCompleteMatchingPredicate

func (c SpacecraftClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SpacecraftOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SpacecraftClient) UpdateTags

func (c SpacecraftClient) UpdateTags(ctx context.Context, id SpacecraftId, input TagsObject) (result UpdateTagsOperationResponse, err error)

UpdateTags ...

func (SpacecraftClient) UpdateTagsThenPoll

func (c SpacecraftClient) UpdateTagsThenPoll(ctx context.Context, id SpacecraftId, input TagsObject) error

UpdateTagsThenPoll performs UpdateTags then polls until it's completed

type SpacecraftId

type SpacecraftId struct {
	SubscriptionId    string
	ResourceGroupName string
	SpacecraftName    string
}

SpacecraftId is a struct representing the Resource ID for a Spacecraft

func NewSpacecraftID

func NewSpacecraftID(subscriptionId string, resourceGroupName string, spacecraftName string) SpacecraftId

NewSpacecraftID returns a new SpacecraftId struct

func ParseSpacecraftID

func ParseSpacecraftID(input string) (*SpacecraftId, error)

ParseSpacecraftID parses 'input' into a SpacecraftId

func ParseSpacecraftIDInsensitively

func ParseSpacecraftIDInsensitively(input string) (*SpacecraftId, error)

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

func (*SpacecraftId) FromParseResult

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

func (SpacecraftId) ID

func (id SpacecraftId) ID() string

ID returns the formatted Spacecraft ID

func (SpacecraftId) Segments

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

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

func (SpacecraftId) String

func (id SpacecraftId) String() string

String returns a human-readable description of this Spacecraft ID

type SpacecraftLink struct {
	Authorizations     *[]AuthorizedGroundstation `json:"authorizations,omitempty"`
	BandwidthMHz       float64                    `json:"bandwidthMHz"`
	CenterFrequencyMHz float64                    `json:"centerFrequencyMHz"`
	Direction          Direction                  `json:"direction"`
	Name               string                     `json:"name"`
	Polarization       Polarization               `json:"polarization"`
}

type SpacecraftOperationPredicate

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

func (SpacecraftOperationPredicate) Matches

func (p SpacecraftOperationPredicate) Matches(input Spacecraft) bool

type SpacecraftsProperties

type SpacecraftsProperties struct {
	Links             []SpacecraftLink   `json:"links"`
	NoradId           *string            `json:"noradId,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	TitleLine         string             `json:"titleLine"`
	TleLine1          string             `json:"tleLine1"`
	TleLine2          string             `json:"tleLine2"`
}

type TagsObject

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

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Spacecraft
}

Jump to

Keyboard shortcuts

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