recommender

package
v0.0.0-...-e165f0f Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Impact_Category_name = map[int32]string{
	0: "CATEGORY_UNSPECIFIED",
	1: "COST",
	2: "SECURITY",
	3: "PERFORMANCE",
	4: "MANAGEABILITY",
}
View Source
var Impact_Category_value = map[string]int32{
	"CATEGORY_UNSPECIFIED": 0,
	"COST":                 1,
	"SECURITY":             2,
	"PERFORMANCE":          3,
	"MANAGEABILITY":        4,
}
View Source
var RecommendationStateInfo_State_name = map[int32]string{
	0: "STATE_UNSPECIFIED",
	1: "ACTIVE",
	6: "CLAIMED",
	3: "SUCCEEDED",
	4: "FAILED",
	5: "DISMISSED",
}
View Source
var RecommendationStateInfo_State_value = map[string]int32{
	"STATE_UNSPECIFIED": 0,
	"ACTIVE":            1,
	"CLAIMED":           6,
	"SUCCEEDED":         3,
	"FAILED":            4,
	"DISMISSED":         5,
}

Functions

func RegisterRecommenderServer

func RegisterRecommenderServer(s *grpc.Server, srv RecommenderServer)

Types

type CostProjection

type CostProjection struct {
	// An approximate projection on amount saved or amount incurred. Negative cost
	// units indicate cost savings and positive cost units indicate increase.
	// See google.type.Money documentation for positive/negative units.
	Cost *money.Money `protobuf:"bytes,1,opt,name=cost,proto3" json:"cost,omitempty"`
	// Duration for which this cost applies.
	Duration             *duration.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Contains metadata about how much money a recommendation can save or incur.

func (*CostProjection) Descriptor

func (*CostProjection) Descriptor() ([]byte, []int)

func (*CostProjection) GetCost

func (m *CostProjection) GetCost() *money.Money

func (*CostProjection) GetDuration

func (m *CostProjection) GetDuration() *duration.Duration

func (*CostProjection) ProtoMessage

func (*CostProjection) ProtoMessage()

func (*CostProjection) Reset

func (m *CostProjection) Reset()

func (*CostProjection) String

func (m *CostProjection) String() string

func (*CostProjection) XXX_DiscardUnknown

func (m *CostProjection) XXX_DiscardUnknown()

func (*CostProjection) XXX_Marshal

func (m *CostProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CostProjection) XXX_Merge

func (m *CostProjection) XXX_Merge(src proto.Message)

func (*CostProjection) XXX_Size

func (m *CostProjection) XXX_Size() int

func (*CostProjection) XXX_Unmarshal

func (m *CostProjection) XXX_Unmarshal(b []byte) error

type GetRecommendationRequest

type GetRecommendationRequest struct {
	// Required. Name of the recommendation.
	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 to the `GetRecommendation` method.

func (*GetRecommendationRequest) Descriptor

func (*GetRecommendationRequest) Descriptor() ([]byte, []int)

func (*GetRecommendationRequest) GetName

func (m *GetRecommendationRequest) GetName() string

func (*GetRecommendationRequest) ProtoMessage

func (*GetRecommendationRequest) ProtoMessage()

func (*GetRecommendationRequest) Reset

func (m *GetRecommendationRequest) Reset()

func (*GetRecommendationRequest) String

func (m *GetRecommendationRequest) String() string

func (*GetRecommendationRequest) XXX_DiscardUnknown

func (m *GetRecommendationRequest) XXX_DiscardUnknown()

func (*GetRecommendationRequest) XXX_Marshal

func (m *GetRecommendationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRecommendationRequest) XXX_Merge

func (m *GetRecommendationRequest) XXX_Merge(src proto.Message)

func (*GetRecommendationRequest) XXX_Size

func (m *GetRecommendationRequest) XXX_Size() int

func (*GetRecommendationRequest) XXX_Unmarshal

func (m *GetRecommendationRequest) XXX_Unmarshal(b []byte) error

type Impact

type Impact struct {
	// Category that is being targeted.
	Category Impact_Category `protobuf:"varint,1,opt,name=category,proto3,enum=google.cloud.recommender.v1.Impact_Category" json:"category,omitempty"`
	// Contains projections (if any) for this category.
	//
	// Types that are valid to be assigned to Projection:
	//	*Impact_CostProjection
	Projection           isImpact_Projection `protobuf_oneof:"projection"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

Contains the impact a recommendation can have for a given category.

func (*Impact) Descriptor

func (*Impact) Descriptor() ([]byte, []int)

func (*Impact) GetCategory

func (m *Impact) GetCategory() Impact_Category

func (*Impact) GetCostProjection

func (m *Impact) GetCostProjection() *CostProjection

func (*Impact) GetProjection

func (m *Impact) GetProjection() isImpact_Projection

func (*Impact) ProtoMessage

func (*Impact) ProtoMessage()

func (*Impact) Reset

func (m *Impact) Reset()

func (*Impact) String

func (m *Impact) String() string

func (*Impact) XXX_DiscardUnknown

func (m *Impact) XXX_DiscardUnknown()

func (*Impact) XXX_Marshal

func (m *Impact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Impact) XXX_Merge

func (m *Impact) XXX_Merge(src proto.Message)

func (*Impact) XXX_OneofWrappers

func (*Impact) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Impact) XXX_Size

func (m *Impact) XXX_Size() int

func (*Impact) XXX_Unmarshal

func (m *Impact) XXX_Unmarshal(b []byte) error

type Impact_Category

type Impact_Category int32

The category of the impact.

const (
	// Default unspecified category. Don't use directly.
	Impact_CATEGORY_UNSPECIFIED Impact_Category = 0
	// Indicates a potential increase or decrease in cost.
	Impact_COST Impact_Category = 1
	// Indicates a potential increase or decrease in security.
	Impact_SECURITY Impact_Category = 2
	// Indicates a potential increase or decrease in performance.
	Impact_PERFORMANCE Impact_Category = 3
	// Indicates a potential increase or decrease in manageability.
	Impact_MANAGEABILITY Impact_Category = 4
)

func (Impact_Category) EnumDescriptor

func (Impact_Category) EnumDescriptor() ([]byte, []int)

func (Impact_Category) String

func (x Impact_Category) String() string

type Impact_CostProjection

type Impact_CostProjection struct {
	CostProjection *CostProjection `protobuf:"bytes,100,opt,name=cost_projection,json=costProjection,proto3,oneof"`
}

type ListRecommendationsRequest

type ListRecommendationsRequest struct {
	// Required. The container resource on which to execute the request.
	// Acceptable formats:
	//
	// 1.
	// "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
	//
	// LOCATION here refers to GCP Locations:
	// https://cloud.google.com/about/locations/
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Optional. The maximum number of results to return from this request.  Non-positive
	// values are ignored. If not specified, the server will determine the number
	// of results to return.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. If present, retrieves the next batch of results from the preceding call to
	// this method. `page_token` must be the value of `next_page_token` from the
	// previous response. The values of other method parameters must be identical
	// to those in the previous call.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// Filter expression to restrict the recommendations returned. Supported
	// filter fields: state_info.state
	// Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED"
	Filter               string   `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request for the `ListRecommendations` method.

func (*ListRecommendationsRequest) Descriptor

func (*ListRecommendationsRequest) Descriptor() ([]byte, []int)

func (*ListRecommendationsRequest) GetFilter

func (m *ListRecommendationsRequest) GetFilter() string

func (*ListRecommendationsRequest) GetPageSize

func (m *ListRecommendationsRequest) GetPageSize() int32

func (*ListRecommendationsRequest) GetPageToken

func (m *ListRecommendationsRequest) GetPageToken() string

func (*ListRecommendationsRequest) GetParent

func (m *ListRecommendationsRequest) GetParent() string

func (*ListRecommendationsRequest) ProtoMessage

func (*ListRecommendationsRequest) ProtoMessage()

func (*ListRecommendationsRequest) Reset

func (m *ListRecommendationsRequest) Reset()

func (*ListRecommendationsRequest) String

func (m *ListRecommendationsRequest) String() string

func (*ListRecommendationsRequest) XXX_DiscardUnknown

func (m *ListRecommendationsRequest) XXX_DiscardUnknown()

func (*ListRecommendationsRequest) XXX_Marshal

func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRecommendationsRequest) XXX_Merge

func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message)

func (*ListRecommendationsRequest) XXX_Size

func (m *ListRecommendationsRequest) XXX_Size() int

func (*ListRecommendationsRequest) XXX_Unmarshal

func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error

type ListRecommendationsResponse

type ListRecommendationsResponse struct {
	// The set of recommendations for the `parent` resource.
	Recommendations []*Recommendation `protobuf:"bytes,1,rep,name=recommendations,proto3" json:"recommendations,omitempty"`
	// A token that can be used to request the next page of results. This field is
	// empty if there are no additional results.
	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 to the `ListRecommendations` method.

func (*ListRecommendationsResponse) Descriptor

func (*ListRecommendationsResponse) Descriptor() ([]byte, []int)

func (*ListRecommendationsResponse) GetNextPageToken

func (m *ListRecommendationsResponse) GetNextPageToken() string

func (*ListRecommendationsResponse) GetRecommendations

func (m *ListRecommendationsResponse) GetRecommendations() []*Recommendation

func (*ListRecommendationsResponse) ProtoMessage

func (*ListRecommendationsResponse) ProtoMessage()

func (*ListRecommendationsResponse) Reset

func (m *ListRecommendationsResponse) Reset()

func (*ListRecommendationsResponse) String

func (m *ListRecommendationsResponse) String() string

func (*ListRecommendationsResponse) XXX_DiscardUnknown

func (m *ListRecommendationsResponse) XXX_DiscardUnknown()

func (*ListRecommendationsResponse) XXX_Marshal

func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRecommendationsResponse) XXX_Merge

func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message)

func (*ListRecommendationsResponse) XXX_Size

func (m *ListRecommendationsResponse) XXX_Size() int

func (*ListRecommendationsResponse) XXX_Unmarshal

func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error

type MarkRecommendationClaimedRequest

type MarkRecommendationClaimedRequest struct {
	// Required. Name of the recommendation.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// State properties to include with this state. Overwrites any existing
	// `state_metadata`.
	// Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
	// Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
	StateMetadata map[string]string `` /* 188-byte string literal not displayed */
	// Required. Fingerprint of the Recommendation. Provides optimistic locking.
	Etag                 string   `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request for the `MarkRecommendationClaimed` Method.

func (*MarkRecommendationClaimedRequest) Descriptor

func (*MarkRecommendationClaimedRequest) Descriptor() ([]byte, []int)

func (*MarkRecommendationClaimedRequest) GetEtag

func (*MarkRecommendationClaimedRequest) GetName

func (*MarkRecommendationClaimedRequest) GetStateMetadata

func (m *MarkRecommendationClaimedRequest) GetStateMetadata() map[string]string

func (*MarkRecommendationClaimedRequest) ProtoMessage

func (*MarkRecommendationClaimedRequest) ProtoMessage()

func (*MarkRecommendationClaimedRequest) Reset

func (*MarkRecommendationClaimedRequest) String

func (*MarkRecommendationClaimedRequest) XXX_DiscardUnknown

func (m *MarkRecommendationClaimedRequest) XXX_DiscardUnknown()

func (*MarkRecommendationClaimedRequest) XXX_Marshal

func (m *MarkRecommendationClaimedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MarkRecommendationClaimedRequest) XXX_Merge

func (*MarkRecommendationClaimedRequest) XXX_Size

func (m *MarkRecommendationClaimedRequest) XXX_Size() int

func (*MarkRecommendationClaimedRequest) XXX_Unmarshal

func (m *MarkRecommendationClaimedRequest) XXX_Unmarshal(b []byte) error

type MarkRecommendationFailedRequest

type MarkRecommendationFailedRequest struct {
	// Required. Name of the recommendation.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// State properties to include with this state. Overwrites any existing
	// `state_metadata`.
	// Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
	// Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
	StateMetadata map[string]string `` /* 188-byte string literal not displayed */
	// Required. Fingerprint of the Recommendation. Provides optimistic locking.
	Etag                 string   `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request for the `MarkRecommendationFailed` Method.

func (*MarkRecommendationFailedRequest) Descriptor

func (*MarkRecommendationFailedRequest) Descriptor() ([]byte, []int)

func (*MarkRecommendationFailedRequest) GetEtag

func (*MarkRecommendationFailedRequest) GetName

func (*MarkRecommendationFailedRequest) GetStateMetadata

func (m *MarkRecommendationFailedRequest) GetStateMetadata() map[string]string

func (*MarkRecommendationFailedRequest) ProtoMessage

func (*MarkRecommendationFailedRequest) ProtoMessage()

func (*MarkRecommendationFailedRequest) Reset

func (*MarkRecommendationFailedRequest) String

func (*MarkRecommendationFailedRequest) XXX_DiscardUnknown

func (m *MarkRecommendationFailedRequest) XXX_DiscardUnknown()

func (*MarkRecommendationFailedRequest) XXX_Marshal

func (m *MarkRecommendationFailedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MarkRecommendationFailedRequest) XXX_Merge

func (m *MarkRecommendationFailedRequest) XXX_Merge(src proto.Message)

func (*MarkRecommendationFailedRequest) XXX_Size

func (m *MarkRecommendationFailedRequest) XXX_Size() int

func (*MarkRecommendationFailedRequest) XXX_Unmarshal

func (m *MarkRecommendationFailedRequest) XXX_Unmarshal(b []byte) error

type MarkRecommendationSucceededRequest

type MarkRecommendationSucceededRequest struct {
	// Required. Name of the recommendation.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// State properties to include with this state. Overwrites any existing
	// `state_metadata`.
	// Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
	// Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
	StateMetadata map[string]string `` /* 188-byte string literal not displayed */
	// Required. Fingerprint of the Recommendation. Provides optimistic locking.
	Etag                 string   `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request for the `MarkRecommendationSucceeded` Method.

func (*MarkRecommendationSucceededRequest) Descriptor

func (*MarkRecommendationSucceededRequest) Descriptor() ([]byte, []int)

func (*MarkRecommendationSucceededRequest) GetEtag

func (*MarkRecommendationSucceededRequest) GetName

func (*MarkRecommendationSucceededRequest) GetStateMetadata

func (m *MarkRecommendationSucceededRequest) GetStateMetadata() map[string]string

func (*MarkRecommendationSucceededRequest) ProtoMessage

func (*MarkRecommendationSucceededRequest) ProtoMessage()

func (*MarkRecommendationSucceededRequest) Reset

func (*MarkRecommendationSucceededRequest) String

func (*MarkRecommendationSucceededRequest) XXX_DiscardUnknown

func (m *MarkRecommendationSucceededRequest) XXX_DiscardUnknown()

func (*MarkRecommendationSucceededRequest) XXX_Marshal

func (m *MarkRecommendationSucceededRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MarkRecommendationSucceededRequest) XXX_Merge

func (*MarkRecommendationSucceededRequest) XXX_Size

func (*MarkRecommendationSucceededRequest) XXX_Unmarshal

func (m *MarkRecommendationSucceededRequest) XXX_Unmarshal(b []byte) error

type Operation

type Operation struct {
	// Type of this operation. Contains one of 'and', 'remove', 'replace', 'move',
	// 'copy', 'test' and custom operations. This field is case-insensitive and
	// always populated.
	Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// Type of GCP resource being modified/tested. This field is always populated.
	// Example: cloudresourcemanager.googleapis.com/Project,
	// compute.googleapis.com/Instance
	ResourceType string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
	// Contains the fully qualified resource name. This field is always populated.
	// ex: //cloudresourcemanager.googleapis.com/projects/foo.
	Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	// Path to the target field being operated on. If the operation is at the
	// resource level, then path should be "/". This field is always populated.
	Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// Can be set with action 'copy' to copy resource configuration across
	// different resources of the same type. Example: A resource clone can be
	// done via action = 'copy', path = "/", from = "/",
	// source_resource = <source> and resource_name = <target>.
	// This field is empty for all other values of `action`.
	SourceResource string `protobuf:"bytes,5,opt,name=source_resource,json=sourceResource,proto3" json:"source_resource,omitempty"`
	// Can be set with action 'copy' or 'move' to indicate the source field within
	// resource or source_resource, ignored if provided for other operation types.
	SourcePath string `protobuf:"bytes,6,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"`
	// One of the fields in the following block will be set and intend to
	// describe a value for 'path' field.
	//
	// Types that are valid to be assigned to PathValue:
	//	*Operation_Value
	//	*Operation_ValueMatcher
	PathValue isOperation_PathValue `protobuf_oneof:"path_value"`
	// Set of filters to apply if `path` refers to array elements or nested array
	// elements in order to narrow down to a single unique element that is being
	// tested/modified.
	// This is intended to be an exact match per filter. To perform advanced
	// matching, use path_value_matchers.
	//
	// * Example: {
	//   "/versions/*/name" : "it-123"
	//   "/versions/*/targetSize/percent": 20
	//  }
	// * Example: {
	//   "/bindings/*/role": "roles/admin"
	//   "/bindings/*/condition" : null
	//  }
	// * Example: {
	//   "/bindings/*/role": "roles/admin"
	//   "/bindings/*/members/*" : ["x@google.com", "y@google.com"]
	//  }
	// When both path_filters and path_value_matchers are set, an implicit AND
	// must be performed.
	PathFilters map[string]*_struct.Value `` /* 182-byte string literal not displayed */
	// Similar to path_filters, this contains set of filters to apply if `path`
	// field referes to array elements. This is meant to support value matching
	// beyond exact match. To perform exact match, use path_filters.
	// When both path_filters and path_value_matchers are set, an implicit AND
	// must be performed.
	PathValueMatchers    map[string]*ValueMatcher `` /* 203-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

Contains an operation for a resource loosely based on the JSON-PATCH format with support for:

  • Custom filters for describing partial array patch.
  • Extended path values for describing nested arrays.
  • Custom fields for describing the resource for which the operation is being described.
  • Allows extension to custom operations not natively supported by RFC6902.

See https://tools.ietf.org/html/rfc6902 for details on the original RFC.

func (*Operation) Descriptor

func (*Operation) Descriptor() ([]byte, []int)

func (*Operation) GetAction

func (m *Operation) GetAction() string

func (*Operation) GetPath

func (m *Operation) GetPath() string

func (*Operation) GetPathFilters

func (m *Operation) GetPathFilters() map[string]*_struct.Value

func (*Operation) GetPathValue

func (m *Operation) GetPathValue() isOperation_PathValue

func (*Operation) GetPathValueMatchers

func (m *Operation) GetPathValueMatchers() map[string]*ValueMatcher

func (*Operation) GetResource

func (m *Operation) GetResource() string

func (*Operation) GetResourceType

func (m *Operation) GetResourceType() string

func (*Operation) GetSourcePath

func (m *Operation) GetSourcePath() string

func (*Operation) GetSourceResource

func (m *Operation) GetSourceResource() string

func (*Operation) GetValue

func (m *Operation) GetValue() *_struct.Value

func (*Operation) GetValueMatcher

func (m *Operation) GetValueMatcher() *ValueMatcher

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) String

func (m *Operation) String() string

func (*Operation) XXX_DiscardUnknown

func (m *Operation) XXX_DiscardUnknown()

func (*Operation) XXX_Marshal

func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Operation) XXX_Merge

func (m *Operation) XXX_Merge(src proto.Message)

func (*Operation) XXX_OneofWrappers

func (*Operation) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Operation) XXX_Size

func (m *Operation) XXX_Size() int

func (*Operation) XXX_Unmarshal

func (m *Operation) XXX_Unmarshal(b []byte) error

type OperationGroup

type OperationGroup struct {
	// List of operations across one or more resources that belong to this group.
	// Loosely based on RFC6902 and should be performed in the order they appear.
	Operations           []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Group of operations that need to be performed atomically.

func (*OperationGroup) Descriptor

func (*OperationGroup) Descriptor() ([]byte, []int)

func (*OperationGroup) GetOperations

func (m *OperationGroup) GetOperations() []*Operation

func (*OperationGroup) ProtoMessage

func (*OperationGroup) ProtoMessage()

func (*OperationGroup) Reset

func (m *OperationGroup) Reset()

func (*OperationGroup) String

func (m *OperationGroup) String() string

func (*OperationGroup) XXX_DiscardUnknown

func (m *OperationGroup) XXX_DiscardUnknown()

func (*OperationGroup) XXX_Marshal

func (m *OperationGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OperationGroup) XXX_Merge

func (m *OperationGroup) XXX_Merge(src proto.Message)

func (*OperationGroup) XXX_Size

func (m *OperationGroup) XXX_Size() int

func (*OperationGroup) XXX_Unmarshal

func (m *OperationGroup) XXX_Unmarshal(b []byte) error

type Operation_Value

type Operation_Value struct {
	Value *_struct.Value `protobuf:"bytes,7,opt,name=value,proto3,oneof"`
}

type Operation_ValueMatcher

type Operation_ValueMatcher struct {
	ValueMatcher *ValueMatcher `protobuf:"bytes,10,opt,name=value_matcher,json=valueMatcher,proto3,oneof"`
}

type Recommendation

type Recommendation struct {
	// Name of recommendation.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Free-form human readable summary in English. The maximum length is 500
	// characters.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Contains an identifier for a subtype of recommendations produced for the
	// same recommender. Subtype is a function of content and impact, meaning a
	// new subtype might be added when significant changes to `content` or
	// `primary_impact.category` are introduced. See the Recommenders section
	// to see a list of subtypes for a given Recommender.
	//
	// Examples:
	//   For recommender = "google.iam.policy.Recommender",
	//   recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
	RecommenderSubtype string `protobuf:"bytes,12,opt,name=recommender_subtype,json=recommenderSubtype,proto3" json:"recommender_subtype,omitempty"`
	// Last time this recommendation was refreshed by the system that created it
	// in the first place.
	LastRefreshTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_refresh_time,json=lastRefreshTime,proto3" json:"last_refresh_time,omitempty"`
	// The primary impact that this recommendation can have while trying to
	// optimize for one category.
	PrimaryImpact *Impact `protobuf:"bytes,5,opt,name=primary_impact,json=primaryImpact,proto3" json:"primary_impact,omitempty"`
	// Optional set of additional impact that this recommendation may have when
	// trying to optimize for the primary category. These may be positive
	// or negative.
	AdditionalImpact []*Impact `protobuf:"bytes,6,rep,name=additional_impact,json=additionalImpact,proto3" json:"additional_impact,omitempty"`
	// Content of the recommendation describing recommended changes to resources.
	Content *RecommendationContent `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"`
	// Information for state. Contains state and metadata.
	StateInfo *RecommendationStateInfo `protobuf:"bytes,10,opt,name=state_info,json=stateInfo,proto3" json:"state_info,omitempty"`
	// Fingerprint of the Recommendation. Provides optimistic locking when
	// updating states.
	Etag                 string   `protobuf:"bytes,11,opt,name=etag,proto3" json:"etag,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc

func (*Recommendation) Descriptor

func (*Recommendation) Descriptor() ([]byte, []int)

func (*Recommendation) GetAdditionalImpact

func (m *Recommendation) GetAdditionalImpact() []*Impact

func (*Recommendation) GetContent

func (m *Recommendation) GetContent() *RecommendationContent

func (*Recommendation) GetDescription

func (m *Recommendation) GetDescription() string

func (*Recommendation) GetEtag

func (m *Recommendation) GetEtag() string

func (*Recommendation) GetLastRefreshTime

func (m *Recommendation) GetLastRefreshTime() *timestamp.Timestamp

func (*Recommendation) GetName

func (m *Recommendation) GetName() string

func (*Recommendation) GetPrimaryImpact

func (m *Recommendation) GetPrimaryImpact() *Impact

func (*Recommendation) GetRecommenderSubtype

func (m *Recommendation) GetRecommenderSubtype() string

func (*Recommendation) GetStateInfo

func (m *Recommendation) GetStateInfo() *RecommendationStateInfo

func (*Recommendation) ProtoMessage

func (*Recommendation) ProtoMessage()

func (*Recommendation) Reset

func (m *Recommendation) Reset()

func (*Recommendation) String

func (m *Recommendation) String() string

func (*Recommendation) XXX_DiscardUnknown

func (m *Recommendation) XXX_DiscardUnknown()

func (*Recommendation) XXX_Marshal

func (m *Recommendation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Recommendation) XXX_Merge

func (m *Recommendation) XXX_Merge(src proto.Message)

func (*Recommendation) XXX_Size

func (m *Recommendation) XXX_Size() int

func (*Recommendation) XXX_Unmarshal

func (m *Recommendation) XXX_Unmarshal(b []byte) error

type RecommendationContent

type RecommendationContent struct {
	// Operations to one or more Google Cloud resources grouped in such a way
	// that, all operations within one group are expected to be performed
	// atomically and in an order.
	OperationGroups      []*OperationGroup `protobuf:"bytes,2,rep,name=operation_groups,json=operationGroups,proto3" json:"operation_groups,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Contains what resources are changing and how they are changing.

func (*RecommendationContent) Descriptor

func (*RecommendationContent) Descriptor() ([]byte, []int)

func (*RecommendationContent) GetOperationGroups

func (m *RecommendationContent) GetOperationGroups() []*OperationGroup

func (*RecommendationContent) ProtoMessage

func (*RecommendationContent) ProtoMessage()

func (*RecommendationContent) Reset

func (m *RecommendationContent) Reset()

func (*RecommendationContent) String

func (m *RecommendationContent) String() string

func (*RecommendationContent) XXX_DiscardUnknown

func (m *RecommendationContent) XXX_DiscardUnknown()

func (*RecommendationContent) XXX_Marshal

func (m *RecommendationContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RecommendationContent) XXX_Merge

func (m *RecommendationContent) XXX_Merge(src proto.Message)

func (*RecommendationContent) XXX_Size

func (m *RecommendationContent) XXX_Size() int

func (*RecommendationContent) XXX_Unmarshal

func (m *RecommendationContent) XXX_Unmarshal(b []byte) error

type RecommendationStateInfo

type RecommendationStateInfo struct {
	// The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
	State RecommendationStateInfo_State `` /* 127-byte string literal not displayed */
	// A map of metadata for the state, provided by user or automations systems.
	StateMetadata        map[string]string `` /* 188-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Information for state. Contains state and metadata.

func (*RecommendationStateInfo) Descriptor

func (*RecommendationStateInfo) Descriptor() ([]byte, []int)

func (*RecommendationStateInfo) GetState

func (*RecommendationStateInfo) GetStateMetadata

func (m *RecommendationStateInfo) GetStateMetadata() map[string]string

func (*RecommendationStateInfo) ProtoMessage

func (*RecommendationStateInfo) ProtoMessage()

func (*RecommendationStateInfo) Reset

func (m *RecommendationStateInfo) Reset()

func (*RecommendationStateInfo) String

func (m *RecommendationStateInfo) String() string

func (*RecommendationStateInfo) XXX_DiscardUnknown

func (m *RecommendationStateInfo) XXX_DiscardUnknown()

func (*RecommendationStateInfo) XXX_Marshal

func (m *RecommendationStateInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RecommendationStateInfo) XXX_Merge

func (m *RecommendationStateInfo) XXX_Merge(src proto.Message)

func (*RecommendationStateInfo) XXX_Size

func (m *RecommendationStateInfo) XXX_Size() int

func (*RecommendationStateInfo) XXX_Unmarshal

func (m *RecommendationStateInfo) XXX_Unmarshal(b []byte) error

type RecommendationStateInfo_State

type RecommendationStateInfo_State int32

Represents Recommendation State

const (
	// Default state. Don't use directly.
	RecommendationStateInfo_STATE_UNSPECIFIED RecommendationStateInfo_State = 0
	// Recommendation is active and can be applied. Recommendations content can
	// be updated by Google.
	//
	// ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.
	RecommendationStateInfo_ACTIVE RecommendationStateInfo_State = 1
	// Recommendation is in claimed state. Recommendations content is
	// immutable and cannot be updated by Google.
	//
	// CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.
	RecommendationStateInfo_CLAIMED RecommendationStateInfo_State = 6
	// Recommendation is in succeeded state. Recommendations content is
	// immutable and cannot be updated by Google.
	//
	// SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.
	RecommendationStateInfo_SUCCEEDED RecommendationStateInfo_State = 3
	// Recommendation is in failed state. Recommendations content is immutable
	// and cannot be updated by Google.
	//
	// FAILED recommendations can be marked as SUCCEEDED, or FAILED.
	RecommendationStateInfo_FAILED RecommendationStateInfo_State = 4
	// Recommendation is in dismissed state. Recommendation content can be
	// updated by Google.
	//
	// DISMISSED recommendations can be marked as ACTIVE.
	RecommendationStateInfo_DISMISSED RecommendationStateInfo_State = 5
)

func (RecommendationStateInfo_State) EnumDescriptor

func (RecommendationStateInfo_State) EnumDescriptor() ([]byte, []int)

func (RecommendationStateInfo_State) String

type RecommenderClient

type RecommenderClient interface {
	// Lists recommendations for a Cloud project. Requires the recommender.*.list
	// IAM permission for the specified recommender.
	ListRecommendations(ctx context.Context, in *ListRecommendationsRequest, opts ...grpc.CallOption) (*ListRecommendationsResponse, error)
	// Gets the requested recommendation. Requires the recommender.*.get
	// IAM permission for the specified recommender.
	GetRecommendation(ctx context.Context, in *GetRecommendationRequest, opts ...grpc.CallOption) (*Recommendation, error)
	// Mark the Recommendation State as Claimed. Users can use this method to
	// indicate to the Recommender API that they are starting to apply the
	// recommendation themselves. This stops the recommendation content from being
	// updated.
	//
	// MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
	// SUCCEEDED, FAILED, or ACTIVE state.
	//
	// Requires the recommender.*.update IAM permission for the specified
	// recommender.
	MarkRecommendationClaimed(ctx context.Context, in *MarkRecommendationClaimedRequest, opts ...grpc.CallOption) (*Recommendation, error)
	// Mark the Recommendation State as Succeeded. Users can use this method to
	// indicate to the Recommender API that they have applied the recommendation
	// themselves, and the operation was successful. This stops the recommendation
	// content from being updated.
	//
	// MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
	// CLAIMED, SUCCEEDED, or FAILED state.
	//
	// Requires the recommender.*.update IAM permission for the specified
	// recommender.
	MarkRecommendationSucceeded(ctx context.Context, in *MarkRecommendationSucceededRequest, opts ...grpc.CallOption) (*Recommendation, error)
	// Mark the Recommendation State as Failed. Users can use this method to
	// indicate to the Recommender API that they have applied the recommendation
	// themselves, and the operation failed. This stops the recommendation content
	// from being updated.
	//
	// MarkRecommendationFailed can be applied to recommendations in ACTIVE,
	// CLAIMED, SUCCEEDED, or FAILED state.
	//
	// Requires the recommender.*.update IAM permission for the specified
	// recommender.
	MarkRecommendationFailed(ctx context.Context, in *MarkRecommendationFailedRequest, opts ...grpc.CallOption) (*Recommendation, error)
}

RecommenderClient is the client API for Recommender service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type RecommenderServer

type RecommenderServer interface {
	// Lists recommendations for a Cloud project. Requires the recommender.*.list
	// IAM permission for the specified recommender.
	ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error)
	// Gets the requested recommendation. Requires the recommender.*.get
	// IAM permission for the specified recommender.
	GetRecommendation(context.Context, *GetRecommendationRequest) (*Recommendation, error)
	// Mark the Recommendation State as Claimed. Users can use this method to
	// indicate to the Recommender API that they are starting to apply the
	// recommendation themselves. This stops the recommendation content from being
	// updated.
	//
	// MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
	// SUCCEEDED, FAILED, or ACTIVE state.
	//
	// Requires the recommender.*.update IAM permission for the specified
	// recommender.
	MarkRecommendationClaimed(context.Context, *MarkRecommendationClaimedRequest) (*Recommendation, error)
	// Mark the Recommendation State as Succeeded. Users can use this method to
	// indicate to the Recommender API that they have applied the recommendation
	// themselves, and the operation was successful. This stops the recommendation
	// content from being updated.
	//
	// MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
	// CLAIMED, SUCCEEDED, or FAILED state.
	//
	// Requires the recommender.*.update IAM permission for the specified
	// recommender.
	MarkRecommendationSucceeded(context.Context, *MarkRecommendationSucceededRequest) (*Recommendation, error)
	// Mark the Recommendation State as Failed. Users can use this method to
	// indicate to the Recommender API that they have applied the recommendation
	// themselves, and the operation failed. This stops the recommendation content
	// from being updated.
	//
	// MarkRecommendationFailed can be applied to recommendations in ACTIVE,
	// CLAIMED, SUCCEEDED, or FAILED state.
	//
	// Requires the recommender.*.update IAM permission for the specified
	// recommender.
	MarkRecommendationFailed(context.Context, *MarkRecommendationFailedRequest) (*Recommendation, error)
}

RecommenderServer is the server API for Recommender service.

type UnimplementedRecommenderServer

type UnimplementedRecommenderServer struct {
}

UnimplementedRecommenderServer can be embedded to have forward compatible implementations.

func (*UnimplementedRecommenderServer) GetRecommendation

func (*UnimplementedRecommenderServer) ListRecommendations

func (*UnimplementedRecommenderServer) MarkRecommendationClaimed

func (*UnimplementedRecommenderServer) MarkRecommendationFailed

func (*UnimplementedRecommenderServer) MarkRecommendationSucceeded

type ValueMatcher

type ValueMatcher struct {
	// Types that are valid to be assigned to MatchVariant:
	//	*ValueMatcher_MatchesPattern
	MatchVariant         isValueMatcher_MatchVariant `protobuf_oneof:"match_variant"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

Contains various matching options for values for a GCP resource field.

func (*ValueMatcher) Descriptor

func (*ValueMatcher) Descriptor() ([]byte, []int)

func (*ValueMatcher) GetMatchVariant

func (m *ValueMatcher) GetMatchVariant() isValueMatcher_MatchVariant

func (*ValueMatcher) GetMatchesPattern

func (m *ValueMatcher) GetMatchesPattern() string

func (*ValueMatcher) ProtoMessage

func (*ValueMatcher) ProtoMessage()

func (*ValueMatcher) Reset

func (m *ValueMatcher) Reset()

func (*ValueMatcher) String

func (m *ValueMatcher) String() string

func (*ValueMatcher) XXX_DiscardUnknown

func (m *ValueMatcher) XXX_DiscardUnknown()

func (*ValueMatcher) XXX_Marshal

func (m *ValueMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValueMatcher) XXX_Merge

func (m *ValueMatcher) XXX_Merge(src proto.Message)

func (*ValueMatcher) XXX_OneofWrappers

func (*ValueMatcher) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ValueMatcher) XXX_Size

func (m *ValueMatcher) XXX_Size() int

func (*ValueMatcher) XXX_Unmarshal

func (m *ValueMatcher) XXX_Unmarshal(b []byte) error

type ValueMatcher_MatchesPattern

type ValueMatcher_MatchesPattern struct {
	MatchesPattern string `protobuf:"bytes,1,opt,name=matches_pattern,json=matchesPattern,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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