Documentation ¶
Index ¶
- Variables
- func RegisterBudgetServiceServer(s *grpc.Server, srv BudgetServiceServer)
- type AllUpdatesRule
- func (*AllUpdatesRule) Descriptor() ([]byte, []int)
- func (m *AllUpdatesRule) GetPubsubTopic() string
- func (m *AllUpdatesRule) GetSchemaVersion() string
- func (*AllUpdatesRule) ProtoMessage()
- func (m *AllUpdatesRule) Reset()
- func (m *AllUpdatesRule) String() string
- func (m *AllUpdatesRule) XXX_DiscardUnknown()
- func (m *AllUpdatesRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllUpdatesRule) XXX_Merge(src proto.Message)
- func (m *AllUpdatesRule) XXX_Size() int
- func (m *AllUpdatesRule) XXX_Unmarshal(b []byte) error
- type Budget
- func (*Budget) Descriptor() ([]byte, []int)
- func (m *Budget) GetAllUpdatesRule() *AllUpdatesRule
- func (m *Budget) GetAmount() *BudgetAmount
- func (m *Budget) GetBudgetFilter() *Filter
- func (m *Budget) GetDisplayName() string
- func (m *Budget) GetEtag() string
- func (m *Budget) GetName() string
- func (m *Budget) GetThresholdRules() []*ThresholdRule
- func (*Budget) ProtoMessage()
- func (m *Budget) Reset()
- func (m *Budget) String() string
- func (m *Budget) XXX_DiscardUnknown()
- func (m *Budget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Budget) XXX_Merge(src proto.Message)
- func (m *Budget) XXX_Size() int
- func (m *Budget) XXX_Unmarshal(b []byte) error
- type BudgetAmount
- func (*BudgetAmount) Descriptor() ([]byte, []int)
- func (m *BudgetAmount) GetBudgetAmount() isBudgetAmount_BudgetAmount
- func (m *BudgetAmount) GetLastPeriodAmount() *LastPeriodAmount
- func (m *BudgetAmount) GetSpecifiedAmount() *money.Money
- func (*BudgetAmount) ProtoMessage()
- func (m *BudgetAmount) Reset()
- func (m *BudgetAmount) String() string
- func (m *BudgetAmount) XXX_DiscardUnknown()
- func (m *BudgetAmount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BudgetAmount) XXX_Merge(src proto.Message)
- func (*BudgetAmount) XXX_OneofWrappers() []interface{}
- func (m *BudgetAmount) XXX_Size() int
- func (m *BudgetAmount) XXX_Unmarshal(b []byte) error
- type BudgetAmount_LastPeriodAmount
- type BudgetAmount_SpecifiedAmount
- type BudgetServiceClient
- type BudgetServiceServer
- type CreateBudgetRequest
- func (*CreateBudgetRequest) Descriptor() ([]byte, []int)
- func (m *CreateBudgetRequest) GetBudget() *Budget
- func (m *CreateBudgetRequest) GetParent() string
- func (*CreateBudgetRequest) ProtoMessage()
- func (m *CreateBudgetRequest) Reset()
- func (m *CreateBudgetRequest) String() string
- func (m *CreateBudgetRequest) XXX_DiscardUnknown()
- func (m *CreateBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateBudgetRequest) XXX_Merge(src proto.Message)
- func (m *CreateBudgetRequest) XXX_Size() int
- func (m *CreateBudgetRequest) XXX_Unmarshal(b []byte) error
- type DeleteBudgetRequest
- func (*DeleteBudgetRequest) Descriptor() ([]byte, []int)
- func (m *DeleteBudgetRequest) GetName() string
- func (*DeleteBudgetRequest) ProtoMessage()
- func (m *DeleteBudgetRequest) Reset()
- func (m *DeleteBudgetRequest) String() string
- func (m *DeleteBudgetRequest) XXX_DiscardUnknown()
- func (m *DeleteBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteBudgetRequest) XXX_Merge(src proto.Message)
- func (m *DeleteBudgetRequest) XXX_Size() int
- func (m *DeleteBudgetRequest) XXX_Unmarshal(b []byte) error
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)
- func (m *Filter) GetCreditTypesTreatment() Filter_CreditTypesTreatment
- func (m *Filter) GetProjects() []string
- func (m *Filter) GetServices() []string
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) String() string
- func (m *Filter) XXX_DiscardUnknown()
- func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Filter) XXX_Merge(src proto.Message)
- func (m *Filter) XXX_Size() int
- func (m *Filter) XXX_Unmarshal(b []byte) error
- type Filter_CreditTypesTreatment
- type GetBudgetRequest
- func (*GetBudgetRequest) Descriptor() ([]byte, []int)
- func (m *GetBudgetRequest) GetName() string
- func (*GetBudgetRequest) ProtoMessage()
- func (m *GetBudgetRequest) Reset()
- func (m *GetBudgetRequest) String() string
- func (m *GetBudgetRequest) XXX_DiscardUnknown()
- func (m *GetBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetBudgetRequest) XXX_Merge(src proto.Message)
- func (m *GetBudgetRequest) XXX_Size() int
- func (m *GetBudgetRequest) XXX_Unmarshal(b []byte) error
- type LastPeriodAmount
- func (*LastPeriodAmount) Descriptor() ([]byte, []int)
- func (*LastPeriodAmount) ProtoMessage()
- func (m *LastPeriodAmount) Reset()
- func (m *LastPeriodAmount) String() string
- func (m *LastPeriodAmount) XXX_DiscardUnknown()
- func (m *LastPeriodAmount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LastPeriodAmount) XXX_Merge(src proto.Message)
- func (m *LastPeriodAmount) XXX_Size() int
- func (m *LastPeriodAmount) XXX_Unmarshal(b []byte) error
- type ListBudgetsRequest
- func (*ListBudgetsRequest) Descriptor() ([]byte, []int)
- func (m *ListBudgetsRequest) GetPageSize() int32
- func (m *ListBudgetsRequest) GetPageToken() string
- func (m *ListBudgetsRequest) GetParent() string
- func (*ListBudgetsRequest) ProtoMessage()
- func (m *ListBudgetsRequest) Reset()
- func (m *ListBudgetsRequest) String() string
- func (m *ListBudgetsRequest) XXX_DiscardUnknown()
- func (m *ListBudgetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListBudgetsRequest) XXX_Merge(src proto.Message)
- func (m *ListBudgetsRequest) XXX_Size() int
- func (m *ListBudgetsRequest) XXX_Unmarshal(b []byte) error
- type ListBudgetsResponse
- func (*ListBudgetsResponse) Descriptor() ([]byte, []int)
- func (m *ListBudgetsResponse) GetBudgets() []*Budget
- func (m *ListBudgetsResponse) GetNextPageToken() string
- func (*ListBudgetsResponse) ProtoMessage()
- func (m *ListBudgetsResponse) Reset()
- func (m *ListBudgetsResponse) String() string
- func (m *ListBudgetsResponse) XXX_DiscardUnknown()
- func (m *ListBudgetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListBudgetsResponse) XXX_Merge(src proto.Message)
- func (m *ListBudgetsResponse) XXX_Size() int
- func (m *ListBudgetsResponse) XXX_Unmarshal(b []byte) error
- type ThresholdRule
- func (*ThresholdRule) Descriptor() ([]byte, []int)
- func (m *ThresholdRule) GetSpendBasis() ThresholdRule_Basis
- func (m *ThresholdRule) GetThresholdPercent() float64
- func (*ThresholdRule) ProtoMessage()
- func (m *ThresholdRule) Reset()
- func (m *ThresholdRule) String() string
- func (m *ThresholdRule) XXX_DiscardUnknown()
- func (m *ThresholdRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ThresholdRule) XXX_Merge(src proto.Message)
- func (m *ThresholdRule) XXX_Size() int
- func (m *ThresholdRule) XXX_Unmarshal(b []byte) error
- type ThresholdRule_Basis
- type UnimplementedBudgetServiceServer
- func (*UnimplementedBudgetServiceServer) CreateBudget(ctx context.Context, req *CreateBudgetRequest) (*Budget, error)
- func (*UnimplementedBudgetServiceServer) DeleteBudget(ctx context.Context, req *DeleteBudgetRequest) (*empty.Empty, error)
- func (*UnimplementedBudgetServiceServer) GetBudget(ctx context.Context, req *GetBudgetRequest) (*Budget, error)
- func (*UnimplementedBudgetServiceServer) ListBudgets(ctx context.Context, req *ListBudgetsRequest) (*ListBudgetsResponse, error)
- func (*UnimplementedBudgetServiceServer) UpdateBudget(ctx context.Context, req *UpdateBudgetRequest) (*Budget, error)
- type UpdateBudgetRequest
- func (*UpdateBudgetRequest) Descriptor() ([]byte, []int)
- func (m *UpdateBudgetRequest) GetBudget() *Budget
- func (m *UpdateBudgetRequest) GetUpdateMask() *field_mask.FieldMask
- func (*UpdateBudgetRequest) ProtoMessage()
- func (m *UpdateBudgetRequest) Reset()
- func (m *UpdateBudgetRequest) String() string
- func (m *UpdateBudgetRequest) XXX_DiscardUnknown()
- func (m *UpdateBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateBudgetRequest) XXX_Merge(src proto.Message)
- func (m *UpdateBudgetRequest) XXX_Size() int
- func (m *UpdateBudgetRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var Filter_CreditTypesTreatment_name = map[int32]string{
0: "CREDIT_TYPES_TREATMENT_UNSPECIFIED",
1: "INCLUDE_ALL_CREDITS",
2: "EXCLUDE_ALL_CREDITS",
}
var Filter_CreditTypesTreatment_value = map[string]int32{
"CREDIT_TYPES_TREATMENT_UNSPECIFIED": 0,
"INCLUDE_ALL_CREDITS": 1,
"EXCLUDE_ALL_CREDITS": 2,
}
var ThresholdRule_Basis_name = map[int32]string{
0: "BASIS_UNSPECIFIED",
1: "CURRENT_SPEND",
2: "FORECASTED_SPEND",
}
var ThresholdRule_Basis_value = map[string]int32{
"BASIS_UNSPECIFIED": 0,
"CURRENT_SPEND": 1,
"FORECASTED_SPEND": 2,
}
Functions ¶
func RegisterBudgetServiceServer ¶
func RegisterBudgetServiceServer(s *grpc.Server, srv BudgetServiceServer)
Types ¶
type AllUpdatesRule ¶
type AllUpdatesRule struct { // Required. The name of the Cloud Pub/Sub topic where budget related messages will be // published, in the form `projects/{project_id}/topics/{topic_id}`. Updates // are sent at regular intervals to the topic. // The topic needs to be created before the budget is created; see // https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications // for more details. // Caller is expected to have // `pubsub.topics.setIamPolicy` permission on the topic when it's set for a // budget, otherwise, the API call will fail with PERMISSION_DENIED. See // https://cloud.google.com/pubsub/docs/access-control for more details on // Pub/Sub roles and permissions. PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"` // Required. The schema version of the notification. // Only "1.0" is accepted. It represents the JSON schema as defined in // https://cloud.google.com/billing/docs/how-to/budgets#notification_format SchemaVersion string `protobuf:"bytes,2,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
AllUpdatesRule defines notifications that are sent on every update to the billing account's spend, regardless of the thresholds defined using threshold rules.
func (*AllUpdatesRule) Descriptor ¶
func (*AllUpdatesRule) Descriptor() ([]byte, []int)
func (*AllUpdatesRule) GetPubsubTopic ¶
func (m *AllUpdatesRule) GetPubsubTopic() string
func (*AllUpdatesRule) GetSchemaVersion ¶
func (m *AllUpdatesRule) GetSchemaVersion() string
func (*AllUpdatesRule) ProtoMessage ¶
func (*AllUpdatesRule) ProtoMessage()
func (*AllUpdatesRule) Reset ¶
func (m *AllUpdatesRule) Reset()
func (*AllUpdatesRule) String ¶
func (m *AllUpdatesRule) String() string
func (*AllUpdatesRule) XXX_DiscardUnknown ¶
func (m *AllUpdatesRule) XXX_DiscardUnknown()
func (*AllUpdatesRule) XXX_Marshal ¶
func (m *AllUpdatesRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllUpdatesRule) XXX_Merge ¶
func (m *AllUpdatesRule) XXX_Merge(src proto.Message)
func (*AllUpdatesRule) XXX_Size ¶
func (m *AllUpdatesRule) XXX_Size() int
func (*AllUpdatesRule) XXX_Unmarshal ¶
func (m *AllUpdatesRule) XXX_Unmarshal(b []byte) error
type Budget ¶
type Budget struct { // Output only. Resource name of the budget. // The resource name implies the scope of a budget. Values are of the form // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // User data for display name in UI. // Validation: <= 60 chars. DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // Optional. Filters that define which resources are used to compute // the actual spend against the budget. BudgetFilter *Filter `protobuf:"bytes,3,opt,name=budget_filter,json=budgetFilter,proto3" json:"budget_filter,omitempty"` // Required. Budgeted amount. Amount *BudgetAmount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // Optional. Rules that trigger alerts (notifications of thresholds // being crossed) when spend exceeds the specified percentages of the budget. ThresholdRules []*ThresholdRule `protobuf:"bytes,5,rep,name=threshold_rules,json=thresholdRules,proto3" json:"threshold_rules,omitempty"` // Optional. Rules to apply to all updates to the actual spend, regardless // of the thresholds set in `threshold_rules`. AllUpdatesRule *AllUpdatesRule `protobuf:"bytes,6,opt,name=all_updates_rule,json=allUpdatesRule,proto3" json:"all_updates_rule,omitempty"` // Optional. Etag to validate that the object is unchanged for a // read-modify-write operation. // An empty etag will cause an update to overwrite other changes. Etag string `protobuf:"bytes,7,opt,name=etag,proto3" json:"etag,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). Currently all plans are monthly budgets so the usage period(s) tracked are implied (calendar months of usage back-to-back).
func (*Budget) Descriptor ¶
func (*Budget) GetAllUpdatesRule ¶
func (m *Budget) GetAllUpdatesRule() *AllUpdatesRule
func (*Budget) GetAmount ¶
func (m *Budget) GetAmount() *BudgetAmount
func (*Budget) GetBudgetFilter ¶
func (*Budget) GetDisplayName ¶
func (*Budget) GetThresholdRules ¶
func (m *Budget) GetThresholdRules() []*ThresholdRule
func (*Budget) ProtoMessage ¶
func (*Budget) ProtoMessage()
func (*Budget) XXX_DiscardUnknown ¶
func (m *Budget) XXX_DiscardUnknown()
func (*Budget) XXX_Marshal ¶
func (*Budget) XXX_Unmarshal ¶
type BudgetAmount ¶
type BudgetAmount struct { // Specification for what amount to use as the budget. // // Types that are valid to be assigned to BudgetAmount: // *BudgetAmount_SpecifiedAmount // *BudgetAmount_LastPeriodAmount BudgetAmount isBudgetAmount_BudgetAmount `protobuf_oneof:"budget_amount"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The budgeted amount for each usage period.
func (*BudgetAmount) Descriptor ¶
func (*BudgetAmount) Descriptor() ([]byte, []int)
func (*BudgetAmount) GetBudgetAmount ¶
func (m *BudgetAmount) GetBudgetAmount() isBudgetAmount_BudgetAmount
func (*BudgetAmount) GetLastPeriodAmount ¶
func (m *BudgetAmount) GetLastPeriodAmount() *LastPeriodAmount
func (*BudgetAmount) GetSpecifiedAmount ¶
func (m *BudgetAmount) GetSpecifiedAmount() *money.Money
func (*BudgetAmount) ProtoMessage ¶
func (*BudgetAmount) ProtoMessage()
func (*BudgetAmount) Reset ¶
func (m *BudgetAmount) Reset()
func (*BudgetAmount) String ¶
func (m *BudgetAmount) String() string
func (*BudgetAmount) XXX_DiscardUnknown ¶
func (m *BudgetAmount) XXX_DiscardUnknown()
func (*BudgetAmount) XXX_Marshal ¶
func (m *BudgetAmount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BudgetAmount) XXX_Merge ¶
func (m *BudgetAmount) XXX_Merge(src proto.Message)
func (*BudgetAmount) XXX_OneofWrappers ¶
func (*BudgetAmount) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*BudgetAmount) XXX_Size ¶
func (m *BudgetAmount) XXX_Size() int
func (*BudgetAmount) XXX_Unmarshal ¶
func (m *BudgetAmount) XXX_Unmarshal(b []byte) error
type BudgetAmount_LastPeriodAmount ¶
type BudgetAmount_LastPeriodAmount struct {
LastPeriodAmount *LastPeriodAmount `protobuf:"bytes,2,opt,name=last_period_amount,json=lastPeriodAmount,proto3,oneof"`
}
type BudgetServiceClient ¶
type BudgetServiceClient interface { // Creates a new budget. See // <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a> // for more information on the limits of the number of budgets you can create. CreateBudget(ctx context.Context, in *CreateBudgetRequest, opts ...grpc.CallOption) (*Budget, error) // Updates a budget and returns the updated budget. // // WARNING: There are some fields exposed on the Google Cloud Console that // aren’t available on this API. Budget fields that are not exposed in // this API will not be changed by this method. UpdateBudget(ctx context.Context, in *UpdateBudgetRequest, opts ...grpc.CallOption) (*Budget, error) // Returns a budget. // // WARNING: There are some fields exposed on the Google Cloud Console that // aren’t available on this API. When reading from the API, you will not // see these fields in the return value, though they may have been set // in the Cloud Console. GetBudget(ctx context.Context, in *GetBudgetRequest, opts ...grpc.CallOption) (*Budget, error) // Returns a list of budgets for a billing account. // // WARNING: There are some fields exposed on the Google Cloud Console that // aren’t available on this API. When reading from the API, you will not // see these fields in the return value, though they may have been set // in the Cloud Console. ListBudgets(ctx context.Context, in *ListBudgetsRequest, opts ...grpc.CallOption) (*ListBudgetsResponse, error) // Deletes a budget. Returns successfully if already deleted. DeleteBudget(ctx context.Context, in *DeleteBudgetRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
BudgetServiceClient is the client API for BudgetService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBudgetServiceClient ¶
func NewBudgetServiceClient(cc grpc.ClientConnInterface) BudgetServiceClient
type BudgetServiceServer ¶
type BudgetServiceServer interface { // Creates a new budget. See // <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a> // for more information on the limits of the number of budgets you can create. CreateBudget(context.Context, *CreateBudgetRequest) (*Budget, error) // Updates a budget and returns the updated budget. // // WARNING: There are some fields exposed on the Google Cloud Console that // aren’t available on this API. Budget fields that are not exposed in // this API will not be changed by this method. UpdateBudget(context.Context, *UpdateBudgetRequest) (*Budget, error) // Returns a budget. // // WARNING: There are some fields exposed on the Google Cloud Console that // aren’t available on this API. When reading from the API, you will not // see these fields in the return value, though they may have been set // in the Cloud Console. GetBudget(context.Context, *GetBudgetRequest) (*Budget, error) // Returns a list of budgets for a billing account. // // WARNING: There are some fields exposed on the Google Cloud Console that // aren’t available on this API. When reading from the API, you will not // see these fields in the return value, though they may have been set // in the Cloud Console. ListBudgets(context.Context, *ListBudgetsRequest) (*ListBudgetsResponse, error) // Deletes a budget. Returns successfully if already deleted. DeleteBudget(context.Context, *DeleteBudgetRequest) (*empty.Empty, error) }
BudgetServiceServer is the server API for BudgetService service.
type CreateBudgetRequest ¶
type CreateBudgetRequest struct { // Required. The name of the billing account to create the budget in. Values // are of the form `billingAccounts/{billingAccountId}`. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Required. Budget to create. Budget *Budget `protobuf:"bytes,2,opt,name=budget,proto3" json:"budget,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request for CreateBudget
func (*CreateBudgetRequest) Descriptor ¶
func (*CreateBudgetRequest) Descriptor() ([]byte, []int)
func (*CreateBudgetRequest) GetBudget ¶
func (m *CreateBudgetRequest) GetBudget() *Budget
func (*CreateBudgetRequest) GetParent ¶
func (m *CreateBudgetRequest) GetParent() string
func (*CreateBudgetRequest) ProtoMessage ¶
func (*CreateBudgetRequest) ProtoMessage()
func (*CreateBudgetRequest) Reset ¶
func (m *CreateBudgetRequest) Reset()
func (*CreateBudgetRequest) String ¶
func (m *CreateBudgetRequest) String() string
func (*CreateBudgetRequest) XXX_DiscardUnknown ¶
func (m *CreateBudgetRequest) XXX_DiscardUnknown()
func (*CreateBudgetRequest) XXX_Marshal ¶
func (m *CreateBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateBudgetRequest) XXX_Merge ¶
func (m *CreateBudgetRequest) XXX_Merge(src proto.Message)
func (*CreateBudgetRequest) XXX_Size ¶
func (m *CreateBudgetRequest) XXX_Size() int
func (*CreateBudgetRequest) XXX_Unmarshal ¶
func (m *CreateBudgetRequest) XXX_Unmarshal(b []byte) error
type DeleteBudgetRequest ¶
type DeleteBudgetRequest struct { // Required. Name of the budget to delete. Values are of the form // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request for DeleteBudget
func (*DeleteBudgetRequest) Descriptor ¶
func (*DeleteBudgetRequest) Descriptor() ([]byte, []int)
func (*DeleteBudgetRequest) GetName ¶
func (m *DeleteBudgetRequest) GetName() string
func (*DeleteBudgetRequest) ProtoMessage ¶
func (*DeleteBudgetRequest) ProtoMessage()
func (*DeleteBudgetRequest) Reset ¶
func (m *DeleteBudgetRequest) Reset()
func (*DeleteBudgetRequest) String ¶
func (m *DeleteBudgetRequest) String() string
func (*DeleteBudgetRequest) XXX_DiscardUnknown ¶
func (m *DeleteBudgetRequest) XXX_DiscardUnknown()
func (*DeleteBudgetRequest) XXX_Marshal ¶
func (m *DeleteBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteBudgetRequest) XXX_Merge ¶
func (m *DeleteBudgetRequest) XXX_Merge(src proto.Message)
func (*DeleteBudgetRequest) XXX_Size ¶
func (m *DeleteBudgetRequest) XXX_Size() int
func (*DeleteBudgetRequest) XXX_Unmarshal ¶
func (m *DeleteBudgetRequest) XXX_Unmarshal(b []byte) error
type Filter ¶
type Filter struct { // Optional. A set of projects of the form `projects/{project}`, // specifying that usage from only this set of projects should be // included in the budget. If omitted, the report will include all usage for // the billing account, regardless of which project the usage occurred on. // Only zero or one project can be specified currently. Projects []string `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` // Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. CreditTypesTreatment Filter_CreditTypesTreatment `` /* 194-byte string literal not displayed */ // Optional. A set of services of the form `services/{service_id}`, // specifying that usage from only this set of services should be // included in the budget. If omitted, the report will include usage for // all the services. // The service names are available through the Catalog API: // https://cloud.google.com/billing/v1/how-tos/catalog-api. Services []string `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A filter for a budget, limiting the scope of the cost to calculate.
func (*Filter) Descriptor ¶
func (*Filter) GetCreditTypesTreatment ¶
func (m *Filter) GetCreditTypesTreatment() Filter_CreditTypesTreatment
func (*Filter) GetProjects ¶
func (*Filter) GetServices ¶
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) XXX_DiscardUnknown ¶
func (m *Filter) XXX_DiscardUnknown()
func (*Filter) XXX_Marshal ¶
func (*Filter) XXX_Unmarshal ¶
type Filter_CreditTypesTreatment ¶
type Filter_CreditTypesTreatment int32
Specifies how credits should be treated when determining spend for threshold calculations.
const ( Filter_CREDIT_TYPES_TREATMENT_UNSPECIFIED Filter_CreditTypesTreatment = 0 // All types of credit are subtracted from the gross cost to determine the // spend for threshold calculations. Filter_INCLUDE_ALL_CREDITS Filter_CreditTypesTreatment = 1 // All types of credit are added to the net cost to determine the spend for // threshold calculations. Filter_EXCLUDE_ALL_CREDITS Filter_CreditTypesTreatment = 2 )
func (Filter_CreditTypesTreatment) EnumDescriptor ¶
func (Filter_CreditTypesTreatment) EnumDescriptor() ([]byte, []int)
func (Filter_CreditTypesTreatment) String ¶
func (x Filter_CreditTypesTreatment) String() string
type GetBudgetRequest ¶
type GetBudgetRequest struct { // Required. Name of budget to get. Values are of the form // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request for GetBudget
func (*GetBudgetRequest) Descriptor ¶
func (*GetBudgetRequest) Descriptor() ([]byte, []int)
func (*GetBudgetRequest) GetName ¶
func (m *GetBudgetRequest) GetName() string
func (*GetBudgetRequest) ProtoMessage ¶
func (*GetBudgetRequest) ProtoMessage()
func (*GetBudgetRequest) Reset ¶
func (m *GetBudgetRequest) Reset()
func (*GetBudgetRequest) String ¶
func (m *GetBudgetRequest) String() string
func (*GetBudgetRequest) XXX_DiscardUnknown ¶
func (m *GetBudgetRequest) XXX_DiscardUnknown()
func (*GetBudgetRequest) XXX_Marshal ¶
func (m *GetBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetBudgetRequest) XXX_Merge ¶
func (m *GetBudgetRequest) XXX_Merge(src proto.Message)
func (*GetBudgetRequest) XXX_Size ¶
func (m *GetBudgetRequest) XXX_Size() int
func (*GetBudgetRequest) XXX_Unmarshal ¶
func (m *GetBudgetRequest) XXX_Unmarshal(b []byte) error
type LastPeriodAmount ¶
type LastPeriodAmount struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Describes a budget amount targeted to last period's spend. At this time, the amount is automatically 100% of last period's spend; that is, there are no other options yet. Future configuration will be described here (for example, configuring a percentage of last period's spend).
func (*LastPeriodAmount) Descriptor ¶
func (*LastPeriodAmount) Descriptor() ([]byte, []int)
func (*LastPeriodAmount) ProtoMessage ¶
func (*LastPeriodAmount) ProtoMessage()
func (*LastPeriodAmount) Reset ¶
func (m *LastPeriodAmount) Reset()
func (*LastPeriodAmount) String ¶
func (m *LastPeriodAmount) String() string
func (*LastPeriodAmount) XXX_DiscardUnknown ¶
func (m *LastPeriodAmount) XXX_DiscardUnknown()
func (*LastPeriodAmount) XXX_Marshal ¶
func (m *LastPeriodAmount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LastPeriodAmount) XXX_Merge ¶
func (m *LastPeriodAmount) XXX_Merge(src proto.Message)
func (*LastPeriodAmount) XXX_Size ¶
func (m *LastPeriodAmount) XXX_Size() int
func (*LastPeriodAmount) XXX_Unmarshal ¶
func (m *LastPeriodAmount) XXX_Unmarshal(b []byte) error
type ListBudgetsRequest ¶
type ListBudgetsRequest struct { // Required. Name of billing account to list budgets under. Values // are of the form `billingAccounts/{billingAccountId}`. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. The maximum number of budgets to return per page. // The default and maximum value are 100. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Optional. The value returned by the last `ListBudgetsResponse` which // indicates that this is a continuation of a prior `ListBudgets` call, // and that the system should return the next page of data. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request for ListBudgets
func (*ListBudgetsRequest) Descriptor ¶
func (*ListBudgetsRequest) Descriptor() ([]byte, []int)
func (*ListBudgetsRequest) GetPageSize ¶
func (m *ListBudgetsRequest) GetPageSize() int32
func (*ListBudgetsRequest) GetPageToken ¶
func (m *ListBudgetsRequest) GetPageToken() string
func (*ListBudgetsRequest) GetParent ¶
func (m *ListBudgetsRequest) GetParent() string
func (*ListBudgetsRequest) ProtoMessage ¶
func (*ListBudgetsRequest) ProtoMessage()
func (*ListBudgetsRequest) Reset ¶
func (m *ListBudgetsRequest) Reset()
func (*ListBudgetsRequest) String ¶
func (m *ListBudgetsRequest) String() string
func (*ListBudgetsRequest) XXX_DiscardUnknown ¶
func (m *ListBudgetsRequest) XXX_DiscardUnknown()
func (*ListBudgetsRequest) XXX_Marshal ¶
func (m *ListBudgetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListBudgetsRequest) XXX_Merge ¶
func (m *ListBudgetsRequest) XXX_Merge(src proto.Message)
func (*ListBudgetsRequest) XXX_Size ¶
func (m *ListBudgetsRequest) XXX_Size() int
func (*ListBudgetsRequest) XXX_Unmarshal ¶
func (m *ListBudgetsRequest) XXX_Unmarshal(b []byte) error
type ListBudgetsResponse ¶
type ListBudgetsResponse struct { // List of the budgets owned by the requested billing account. Budgets []*Budget `protobuf:"bytes,1,rep,name=budgets,proto3" json:"budgets,omitempty"` // If not empty, indicates that there may be more budgets that match the // request; this value should be passed in a new `ListBudgetsRequest`. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Response for ListBudgets
func (*ListBudgetsResponse) Descriptor ¶
func (*ListBudgetsResponse) Descriptor() ([]byte, []int)
func (*ListBudgetsResponse) GetBudgets ¶
func (m *ListBudgetsResponse) GetBudgets() []*Budget
func (*ListBudgetsResponse) GetNextPageToken ¶
func (m *ListBudgetsResponse) GetNextPageToken() string
func (*ListBudgetsResponse) ProtoMessage ¶
func (*ListBudgetsResponse) ProtoMessage()
func (*ListBudgetsResponse) Reset ¶
func (m *ListBudgetsResponse) Reset()
func (*ListBudgetsResponse) String ¶
func (m *ListBudgetsResponse) String() string
func (*ListBudgetsResponse) XXX_DiscardUnknown ¶
func (m *ListBudgetsResponse) XXX_DiscardUnknown()
func (*ListBudgetsResponse) XXX_Marshal ¶
func (m *ListBudgetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListBudgetsResponse) XXX_Merge ¶
func (m *ListBudgetsResponse) XXX_Merge(src proto.Message)
func (*ListBudgetsResponse) XXX_Size ¶
func (m *ListBudgetsResponse) XXX_Size() int
func (*ListBudgetsResponse) XXX_Unmarshal ¶
func (m *ListBudgetsResponse) XXX_Unmarshal(b []byte) error
type ThresholdRule ¶
type ThresholdRule struct { // Required. Send an alert when this threshold is exceeded. // This is a 1.0-based percentage, so 0.5 = 50%. // Validation: non-negative number. ThresholdPercent float64 `protobuf:"fixed64,1,opt,name=threshold_percent,json=thresholdPercent,proto3" json:"threshold_percent,omitempty"` // Optional. The type of basis used to determine if spend has passed the // threshold. Behavior defaults to CURRENT_SPEND if not set. SpendBasis ThresholdRule_Basis `` /* 154-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ThresholdRule contains a definition of a threshold which triggers an alert (a notification of a threshold being crossed) to be sent when spend goes above the specified amount. Alerts are automatically e-mailed to users with the Billing Account Administrator role or the Billing Account User role. The thresholds here have no effect on notifications sent to anything configured under `Budget.all_updates_rule`.
func (*ThresholdRule) Descriptor ¶
func (*ThresholdRule) Descriptor() ([]byte, []int)
func (*ThresholdRule) GetSpendBasis ¶
func (m *ThresholdRule) GetSpendBasis() ThresholdRule_Basis
func (*ThresholdRule) GetThresholdPercent ¶
func (m *ThresholdRule) GetThresholdPercent() float64
func (*ThresholdRule) ProtoMessage ¶
func (*ThresholdRule) ProtoMessage()
func (*ThresholdRule) Reset ¶
func (m *ThresholdRule) Reset()
func (*ThresholdRule) String ¶
func (m *ThresholdRule) String() string
func (*ThresholdRule) XXX_DiscardUnknown ¶
func (m *ThresholdRule) XXX_DiscardUnknown()
func (*ThresholdRule) XXX_Marshal ¶
func (m *ThresholdRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ThresholdRule) XXX_Merge ¶
func (m *ThresholdRule) XXX_Merge(src proto.Message)
func (*ThresholdRule) XXX_Size ¶
func (m *ThresholdRule) XXX_Size() int
func (*ThresholdRule) XXX_Unmarshal ¶
func (m *ThresholdRule) XXX_Unmarshal(b []byte) error
type ThresholdRule_Basis ¶
type ThresholdRule_Basis int32
The type of basis used to determine if spend has passed the threshold.
const ( // Unspecified threshold basis. ThresholdRule_BASIS_UNSPECIFIED ThresholdRule_Basis = 0 // Use current spend as the basis for comparison against the threshold. ThresholdRule_CURRENT_SPEND ThresholdRule_Basis = 1 // Use forecasted spend for the period as the basis for comparison against // the threshold. ThresholdRule_FORECASTED_SPEND ThresholdRule_Basis = 2 )
func (ThresholdRule_Basis) EnumDescriptor ¶
func (ThresholdRule_Basis) EnumDescriptor() ([]byte, []int)
func (ThresholdRule_Basis) String ¶
func (x ThresholdRule_Basis) String() string
type UnimplementedBudgetServiceServer ¶
type UnimplementedBudgetServiceServer struct { }
UnimplementedBudgetServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedBudgetServiceServer) CreateBudget ¶
func (*UnimplementedBudgetServiceServer) CreateBudget(ctx context.Context, req *CreateBudgetRequest) (*Budget, error)
func (*UnimplementedBudgetServiceServer) DeleteBudget ¶
func (*UnimplementedBudgetServiceServer) DeleteBudget(ctx context.Context, req *DeleteBudgetRequest) (*empty.Empty, error)
func (*UnimplementedBudgetServiceServer) GetBudget ¶
func (*UnimplementedBudgetServiceServer) GetBudget(ctx context.Context, req *GetBudgetRequest) (*Budget, error)
func (*UnimplementedBudgetServiceServer) ListBudgets ¶
func (*UnimplementedBudgetServiceServer) ListBudgets(ctx context.Context, req *ListBudgetsRequest) (*ListBudgetsResponse, error)
func (*UnimplementedBudgetServiceServer) UpdateBudget ¶
func (*UnimplementedBudgetServiceServer) UpdateBudget(ctx context.Context, req *UpdateBudgetRequest) (*Budget, error)
type UpdateBudgetRequest ¶
type UpdateBudgetRequest struct { // Required. The updated budget object. // The budget to update is specified by the budget name in the budget. Budget *Budget `protobuf:"bytes,1,opt,name=budget,proto3" json:"budget,omitempty"` // Optional. Indicates which fields in the provided budget to update. // Read-only fields (such as `name`) cannot be changed. If this is not // provided, then only fields with non-default values from the request are // updated. See // https://developers.google.com/protocol-buffers/docs/proto3#default for more // details about default values. UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request for UpdateBudget
func (*UpdateBudgetRequest) Descriptor ¶
func (*UpdateBudgetRequest) Descriptor() ([]byte, []int)
func (*UpdateBudgetRequest) GetBudget ¶
func (m *UpdateBudgetRequest) GetBudget() *Budget
func (*UpdateBudgetRequest) GetUpdateMask ¶
func (m *UpdateBudgetRequest) GetUpdateMask() *field_mask.FieldMask
func (*UpdateBudgetRequest) ProtoMessage ¶
func (*UpdateBudgetRequest) ProtoMessage()
func (*UpdateBudgetRequest) Reset ¶
func (m *UpdateBudgetRequest) Reset()
func (*UpdateBudgetRequest) String ¶
func (m *UpdateBudgetRequest) String() string
func (*UpdateBudgetRequest) XXX_DiscardUnknown ¶
func (m *UpdateBudgetRequest) XXX_DiscardUnknown()
func (*UpdateBudgetRequest) XXX_Marshal ¶
func (m *UpdateBudgetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateBudgetRequest) XXX_Merge ¶
func (m *UpdateBudgetRequest) XXX_Merge(src proto.Message)
func (*UpdateBudgetRequest) XXX_Size ¶
func (m *UpdateBudgetRequest) XXX_Size() int
func (*UpdateBudgetRequest) XXX_Unmarshal ¶
func (m *UpdateBudgetRequest) XXX_Unmarshal(b []byte) error