departments

package
v0.20240530.1123407 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/departments Documentation

The departments SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2019-10-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/billing/2019-10-01-preview/departments"

Client Initialization

client := departments.NewDepartmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DepartmentsClient.Get

ctx := context.TODO()
id := departments.NewDepartmentID("billingAccountValue", "departmentValue")

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

Example Usage: DepartmentsClient.ListByBillingAccountName

ctx := context.TODO()
id := departments.NewBillingAccountID("billingAccountValue")

// alternatively `client.ListByBillingAccountName(ctx, id, departments.DefaultListByBillingAccountNameOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingAccountNameComplete(ctx, id, departments.DefaultListByBillingAccountNameOperationOptions())
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 ValidateBillingAccountID

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

ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID

func ValidateDepartmentID

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

ValidateDepartmentID checks that 'input' can be parsed as a Department ID

Types

type BillingAccountId

type BillingAccountId struct {
	BillingAccountName string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountName string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

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

func (*BillingAccountId) FromParseResult

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

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Billing Account ID

func (BillingAccountId) String

func (id BillingAccountId) String() string

String returns a human-readable description of this Billing Account ID

type Department

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

type DepartmentId

type DepartmentId struct {
	BillingAccountName string
	DepartmentName     string
}

DepartmentId is a struct representing the Resource ID for a Department

func NewDepartmentID

func NewDepartmentID(billingAccountName string, departmentName string) DepartmentId

NewDepartmentID returns a new DepartmentId struct

func ParseDepartmentID

func ParseDepartmentID(input string) (*DepartmentId, error)

ParseDepartmentID parses 'input' into a DepartmentId

func ParseDepartmentIDInsensitively

func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error)

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

func (*DepartmentId) FromParseResult

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

func (DepartmentId) ID

func (id DepartmentId) ID() string

ID returns the formatted Department ID

func (DepartmentId) Segments

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

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

func (DepartmentId) String

func (id DepartmentId) String() string

String returns a human-readable description of this Department ID

type DepartmentOperationPredicate added in v0.20240226.1173038

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

func (DepartmentOperationPredicate) Matches added in v0.20240226.1173038

func (p DepartmentOperationPredicate) Matches(input Department) bool

type DepartmentProperties

type DepartmentProperties struct {
	CostCenter         *string              `json:"costCenter,omitempty"`
	DepartmentName     *string              `json:"departmentName,omitempty"`
	EnrollmentAccounts *[]EnrollmentAccount `json:"enrollmentAccounts,omitempty"`
	Status             *string              `json:"status,omitempty"`
}

type DepartmentsClient

type DepartmentsClient struct {
	Client *resourcemanager.Client
}

func NewDepartmentsClientWithBaseURI

func NewDepartmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DepartmentsClient, error)

func (DepartmentsClient) Get

Get ...

func (DepartmentsClient) ListByBillingAccountName

ListByBillingAccountName ...

func (DepartmentsClient) ListByBillingAccountNameComplete added in v0.20240226.1173038

ListByBillingAccountNameComplete retrieves all the results into a single object

func (DepartmentsClient) ListByBillingAccountNameCompleteMatchingPredicate added in v0.20240226.1173038

func (c DepartmentsClient) ListByBillingAccountNameCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, options ListByBillingAccountNameOperationOptions, predicate DepartmentOperationPredicate) (result ListByBillingAccountNameCompleteResult, err error)

ListByBillingAccountNameCompleteMatchingPredicate retrieves all the results and then applies the predicate

type EnrollmentAccount

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

type EnrollmentAccountProperties

type EnrollmentAccountProperties struct {
	AccountName  *string     `json:"accountName,omitempty"`
	AccountOwner *string     `json:"accountOwner,omitempty"`
	CostCenter   *string     `json:"costCenter,omitempty"`
	Department   *Department `json:"department,omitempty"`
	EndDate      *string     `json:"endDate,omitempty"`
	StartDate    *string     `json:"startDate,omitempty"`
	Status       *string     `json:"status,omitempty"`
}

func (*EnrollmentAccountProperties) GetEndDateAsTime

func (o *EnrollmentAccountProperties) GetEndDateAsTime() (*time.Time, error)

func (*EnrollmentAccountProperties) GetStartDateAsTime

func (o *EnrollmentAccountProperties) GetStartDateAsTime() (*time.Time, error)

func (*EnrollmentAccountProperties) SetEndDateAsTime

func (o *EnrollmentAccountProperties) SetEndDateAsTime(input time.Time)

func (*EnrollmentAccountProperties) SetStartDateAsTime

func (o *EnrollmentAccountProperties) SetStartDateAsTime(input time.Time)

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
	Filter *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

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

func (GetOperationOptions) ToOData

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

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListByBillingAccountNameCompleteResult added in v0.20240226.1173038

type ListByBillingAccountNameCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Department
}

type ListByBillingAccountNameOperationOptions

type ListByBillingAccountNameOperationOptions struct {
	Expand *string
	Filter *string
}

func DefaultListByBillingAccountNameOperationOptions

func DefaultListByBillingAccountNameOperationOptions() ListByBillingAccountNameOperationOptions

func (ListByBillingAccountNameOperationOptions) ToHeaders

func (ListByBillingAccountNameOperationOptions) ToOData

func (ListByBillingAccountNameOperationOptions) ToQuery

type ListByBillingAccountNameOperationResponse

type ListByBillingAccountNameOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Department
}

Jump to

Keyboard shortcuts

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