Moved to google.golang.org/genproto/googleapis/api/annotations

Fixes #52
This commit is contained in:
Valerio Gheri
2017-03-31 18:01:58 +02:00
parent 024c5a4e4e
commit c40779224f
2037 changed files with 831329 additions and 1854 deletions

View File

@@ -0,0 +1,311 @@
// Code generated by protoc-gen-go.
// source: google/cloud/audit/audit_log.proto
// DO NOT EDIT!
/*
Package audit is a generated protocol buffer package.
It is generated from these files:
google/cloud/audit/audit_log.proto
It has these top-level messages:
AuditLog
AuthenticationInfo
AuthorizationInfo
RequestMetadata
*/
package audit
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/any"
import google_protobuf2 "github.com/golang/protobuf/ptypes/struct"
import google_rpc "google.golang.org/genproto/googleapis/rpc/status"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Common audit log format for Google Cloud Platform API operations.
type AuditLog struct {
// The name of the API service performing the operation. For example,
// `"datastore.googleapis.com"`.
ServiceName string `protobuf:"bytes,7,opt,name=service_name,json=serviceName" json:"service_name,omitempty"`
// The name of the service method or operation.
// For API calls, this should be the name of the API method.
// For example,
//
// "google.datastore.v1.Datastore.RunQuery"
// "google.logging.v1.LoggingService.DeleteLog"
MethodName string `protobuf:"bytes,8,opt,name=method_name,json=methodName" json:"method_name,omitempty"`
// The resource or collection that is the target of the operation.
// The name is a scheme-less URI, not including the API service name.
// For example:
//
// "shelves/SHELF_ID/books"
// "shelves/SHELF_ID/books/BOOK_ID"
ResourceName string `protobuf:"bytes,11,opt,name=resource_name,json=resourceName" json:"resource_name,omitempty"`
// The number of items returned from a List or Query API method,
// if applicable.
NumResponseItems int64 `protobuf:"varint,12,opt,name=num_response_items,json=numResponseItems" json:"num_response_items,omitempty"`
// The status of the overall operation.
Status *google_rpc.Status `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"`
// Authentication information.
AuthenticationInfo *AuthenticationInfo `protobuf:"bytes,3,opt,name=authentication_info,json=authenticationInfo" json:"authentication_info,omitempty"`
// Authorization information. If there are multiple
// resources or permissions involved, then there is
// one AuthorizationInfo element for each {resource, permission} tuple.
AuthorizationInfo []*AuthorizationInfo `protobuf:"bytes,9,rep,name=authorization_info,json=authorizationInfo" json:"authorization_info,omitempty"`
// Metadata about the operation.
RequestMetadata *RequestMetadata `protobuf:"bytes,4,opt,name=request_metadata,json=requestMetadata" json:"request_metadata,omitempty"`
// The operation request. This may not include all request parameters,
// such as those that are too large, privacy-sensitive, or duplicated
// elsewhere in the log record.
// It should never include user-generated data, such as file contents.
// When the JSON object represented here has a proto equivalent, the proto
// name will be indicated in the `@type` property.
Request *google_protobuf2.Struct `protobuf:"bytes,16,opt,name=request" json:"request,omitempty"`
// The operation response. This may not include all response elements,
// such as those that are too large, privacy-sensitive, or duplicated
// elsewhere in the log record.
// It should never include user-generated data, such as file contents.
// When the JSON object represented here has a proto equivalent, the proto
// name will be indicated in the `@type` property.
Response *google_protobuf2.Struct `protobuf:"bytes,17,opt,name=response" json:"response,omitempty"`
// Other service-specific data about the request, response, and other
// activities.
ServiceData *google_protobuf1.Any `protobuf:"bytes,15,opt,name=service_data,json=serviceData" json:"service_data,omitempty"`
}
func (m *AuditLog) Reset() { *m = AuditLog{} }
func (m *AuditLog) String() string { return proto.CompactTextString(m) }
func (*AuditLog) ProtoMessage() {}
func (*AuditLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *AuditLog) GetServiceName() string {
if m != nil {
return m.ServiceName
}
return ""
}
func (m *AuditLog) GetMethodName() string {
if m != nil {
return m.MethodName
}
return ""
}
func (m *AuditLog) GetResourceName() string {
if m != nil {
return m.ResourceName
}
return ""
}
func (m *AuditLog) GetNumResponseItems() int64 {
if m != nil {
return m.NumResponseItems
}
return 0
}
func (m *AuditLog) GetStatus() *google_rpc.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *AuditLog) GetAuthenticationInfo() *AuthenticationInfo {
if m != nil {
return m.AuthenticationInfo
}
return nil
}
func (m *AuditLog) GetAuthorizationInfo() []*AuthorizationInfo {
if m != nil {
return m.AuthorizationInfo
}
return nil
}
func (m *AuditLog) GetRequestMetadata() *RequestMetadata {
if m != nil {
return m.RequestMetadata
}
return nil
}
func (m *AuditLog) GetRequest() *google_protobuf2.Struct {
if m != nil {
return m.Request
}
return nil
}
func (m *AuditLog) GetResponse() *google_protobuf2.Struct {
if m != nil {
return m.Response
}
return nil
}
func (m *AuditLog) GetServiceData() *google_protobuf1.Any {
if m != nil {
return m.ServiceData
}
return nil
}
// Authentication information for the operation.
type AuthenticationInfo struct {
// The email address of the authenticated user making the request.
PrincipalEmail string `protobuf:"bytes,1,opt,name=principal_email,json=principalEmail" json:"principal_email,omitempty"`
}
func (m *AuthenticationInfo) Reset() { *m = AuthenticationInfo{} }
func (m *AuthenticationInfo) String() string { return proto.CompactTextString(m) }
func (*AuthenticationInfo) ProtoMessage() {}
func (*AuthenticationInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *AuthenticationInfo) GetPrincipalEmail() string {
if m != nil {
return m.PrincipalEmail
}
return ""
}
// Authorization information for the operation.
type AuthorizationInfo struct {
// The resource being accessed, as a REST-style string. For example:
//
// bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
Resource string `protobuf:"bytes,1,opt,name=resource" json:"resource,omitempty"`
// The required IAM permission.
Permission string `protobuf:"bytes,2,opt,name=permission" json:"permission,omitempty"`
// Whether or not authorization for `resource` and `permission`
// was granted.
Granted bool `protobuf:"varint,3,opt,name=granted" json:"granted,omitempty"`
}
func (m *AuthorizationInfo) Reset() { *m = AuthorizationInfo{} }
func (m *AuthorizationInfo) String() string { return proto.CompactTextString(m) }
func (*AuthorizationInfo) ProtoMessage() {}
func (*AuthorizationInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *AuthorizationInfo) GetResource() string {
if m != nil {
return m.Resource
}
return ""
}
func (m *AuthorizationInfo) GetPermission() string {
if m != nil {
return m.Permission
}
return ""
}
func (m *AuthorizationInfo) GetGranted() bool {
if m != nil {
return m.Granted
}
return false
}
// Metadata about the request.
type RequestMetadata struct {
// The IP address of the caller.
CallerIp string `protobuf:"bytes,1,opt,name=caller_ip,json=callerIp" json:"caller_ip,omitempty"`
// The user agent of the caller.
// This information is not authenticated and should be treated accordingly.
// For example:
//
// + `google-api-python-client/1.4.0`:
// The request was made by the Google API client for Python.
// + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
// The request was made by the Google Cloud SDK CLI (gcloud).
// + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`:
// The request was made from the `my-project` App Engine app.
CallerSuppliedUserAgent string `protobuf:"bytes,2,opt,name=caller_supplied_user_agent,json=callerSuppliedUserAgent" json:"caller_supplied_user_agent,omitempty"`
}
func (m *RequestMetadata) Reset() { *m = RequestMetadata{} }
func (m *RequestMetadata) String() string { return proto.CompactTextString(m) }
func (*RequestMetadata) ProtoMessage() {}
func (*RequestMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *RequestMetadata) GetCallerIp() string {
if m != nil {
return m.CallerIp
}
return ""
}
func (m *RequestMetadata) GetCallerSuppliedUserAgent() string {
if m != nil {
return m.CallerSuppliedUserAgent
}
return ""
}
func init() {
proto.RegisterType((*AuditLog)(nil), "google.cloud.audit.AuditLog")
proto.RegisterType((*AuthenticationInfo)(nil), "google.cloud.audit.AuthenticationInfo")
proto.RegisterType((*AuthorizationInfo)(nil), "google.cloud.audit.AuthorizationInfo")
proto.RegisterType((*RequestMetadata)(nil), "google.cloud.audit.RequestMetadata")
}
func init() { proto.RegisterFile("google/cloud/audit/audit_log.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 576 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x5f, 0x6f, 0xd3, 0x30,
0x14, 0xc5, 0x55, 0x36, 0x6d, 0xad, 0xbb, 0xd1, 0xd6, 0x20, 0x1a, 0xca, 0x04, 0xa5, 0x13, 0x50,
0x21, 0x94, 0x88, 0xed, 0x61, 0x0f, 0x13, 0x0f, 0x9d, 0xe0, 0xa1, 0x12, 0x4c, 0x53, 0x0a, 0x42,
0xe2, 0x25, 0x72, 0x93, 0xdb, 0xcc, 0x22, 0xb1, 0x8d, 0xff, 0x20, 0x8d, 0xef, 0xcc, 0x77, 0x40,
0xbd, 0x71, 0x4a, 0xd7, 0x0e, 0x5e, 0x2c, 0xf9, 0x9c, 0xdf, 0xbd, 0x76, 0xaf, 0x4f, 0x43, 0x46,
0xb9, 0x94, 0x79, 0x01, 0x51, 0x5a, 0x48, 0x97, 0x45, 0xcc, 0x65, 0xdc, 0x56, 0x6b, 0x52, 0xc8,
0x3c, 0x54, 0x5a, 0x5a, 0x49, 0x69, 0xc5, 0x84, 0xc8, 0x84, 0xe8, 0x0e, 0x8e, 0x7c, 0x1d, 0x53,
0x3c, 0x62, 0x42, 0x48, 0xcb, 0x2c, 0x97, 0xc2, 0x54, 0x15, 0x83, 0xc7, 0xde, 0xc5, 0xdd, 0xdc,
0x2d, 0x22, 0x26, 0x6e, 0xbc, 0x75, 0xb4, 0x69, 0x19, 0xab, 0x5d, 0x6a, 0xbd, 0xdb, 0xf7, 0xae,
0x56, 0x69, 0x64, 0x2c, 0xb3, 0xce, 0x77, 0x1c, 0xfd, 0xde, 0x25, 0xcd, 0xc9, 0xf2, 0xe4, 0x8f,
0x32, 0xa7, 0xcf, 0xc9, 0x81, 0x01, 0xfd, 0x93, 0xa7, 0x90, 0x08, 0x56, 0x42, 0xb0, 0x3f, 0x6c,
0x8c, 0x5b, 0x71, 0xdb, 0x6b, 0x97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 0x89, 0x47, 0x95, 0xc5, 0x14, 0x37, 0xeb, 0x1f, 0x9e, 0x73, 0x5c, 0xe7, 0x7b,
0xc8, 0x9c, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x90, 0xe4, 0x37, 0xbf, 0x9b, 0x04, 0x00, 0x00,
}

View File

@@ -0,0 +1,689 @@
// Code generated by protoc-gen-go.
// source: google/cloud/billing/v1/cloud_billing.proto
// DO NOT EDIT!
/*
Package billing is a generated protocol buffer package.
It is generated from these files:
google/cloud/billing/v1/cloud_billing.proto
It has these top-level messages:
BillingAccount
ProjectBillingInfo
GetBillingAccountRequest
ListBillingAccountsRequest
ListBillingAccountsResponse
ListProjectBillingInfoRequest
ListProjectBillingInfoResponse
GetProjectBillingInfoRequest
UpdateProjectBillingInfoRequest
*/
package billing
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A billing account in [Google Cloud
// Console](https://console.cloud.google.com/). You can assign a billing account
// to one or more projects.
type BillingAccount struct {
// The resource name of the billing account. The resource name has the form
// `billingAccounts/{billing_account_id}`. For example,
// `billingAccounts/012345-567890-ABCDEF` would be the resource name for
// billing account `012345-567890-ABCDEF`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// True if the billing account is open, and will therefore be charged for any
// usage on associated projects. False if the billing account is closed, and
// therefore projects associated with it will be unable to use paid services.
Open bool `protobuf:"varint,2,opt,name=open" json:"open,omitempty"`
// The display name given to the billing account, such as `My Billing
// Account`. This name is displayed in the Google Cloud Console.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
}
func (m *BillingAccount) Reset() { *m = BillingAccount{} }
func (m *BillingAccount) String() string { return proto.CompactTextString(m) }
func (*BillingAccount) ProtoMessage() {}
func (*BillingAccount) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *BillingAccount) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *BillingAccount) GetOpen() bool {
if m != nil {
return m.Open
}
return false
}
func (m *BillingAccount) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
// Encapsulation of billing information for a Cloud Console project. A project
// has at most one associated billing account at a time (but a billing account
// can be assigned to multiple projects).
type ProjectBillingInfo struct {
// The resource name for the `ProjectBillingInfo`; has the form
// `projects/{project_id}/billingInfo`. For example, the resource name for the
// billing information for project `tokyo-rain-123` would be
// `projects/tokyo-rain-123/billingInfo`. This field is read-only.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The ID of the project that this `ProjectBillingInfo` represents, such as
// `tokyo-rain-123`. This is a convenience field so that you don't need to
// parse the `name` field to obtain a project ID. This field is read-only.
ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
// The resource name of the billing account associated with the project, if
// any. For example, `billingAccounts/012345-567890-ABCDEF`.
BillingAccountName string `protobuf:"bytes,3,opt,name=billing_account_name,json=billingAccountName" json:"billing_account_name,omitempty"`
// True if the project is associated with an open billing account, to which
// usage on the project is charged. False if the project is associated with a
// closed billing account, or no billing account at all, and therefore cannot
// use paid services. This field is read-only.
BillingEnabled bool `protobuf:"varint,4,opt,name=billing_enabled,json=billingEnabled" json:"billing_enabled,omitempty"`
}
func (m *ProjectBillingInfo) Reset() { *m = ProjectBillingInfo{} }
func (m *ProjectBillingInfo) String() string { return proto.CompactTextString(m) }
func (*ProjectBillingInfo) ProtoMessage() {}
func (*ProjectBillingInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *ProjectBillingInfo) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ProjectBillingInfo) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
func (m *ProjectBillingInfo) GetBillingAccountName() string {
if m != nil {
return m.BillingAccountName
}
return ""
}
func (m *ProjectBillingInfo) GetBillingEnabled() bool {
if m != nil {
return m.BillingEnabled
}
return false
}
// Request message for `GetBillingAccount`.
type GetBillingAccountRequest struct {
// The resource name of the billing account to retrieve. For example,
// `billingAccounts/012345-567890-ABCDEF`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *GetBillingAccountRequest) Reset() { *m = GetBillingAccountRequest{} }
func (m *GetBillingAccountRequest) String() string { return proto.CompactTextString(m) }
func (*GetBillingAccountRequest) ProtoMessage() {}
func (*GetBillingAccountRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *GetBillingAccountRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Request message for `ListBillingAccounts`.
type ListBillingAccountsRequest struct {
// Requested page size. The maximum page size is 100; this is also the
// default.
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// A token identifying a page of results to return. This should be a
// `next_page_token` value returned from a previous `ListBillingAccounts`
// call. If unspecified, the first page of results is returned.
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}
func (m *ListBillingAccountsRequest) Reset() { *m = ListBillingAccountsRequest{} }
func (m *ListBillingAccountsRequest) String() string { return proto.CompactTextString(m) }
func (*ListBillingAccountsRequest) ProtoMessage() {}
func (*ListBillingAccountsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *ListBillingAccountsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListBillingAccountsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response message for `ListBillingAccounts`.
type ListBillingAccountsResponse struct {
// A list of billing accounts.
BillingAccounts []*BillingAccount `protobuf:"bytes,1,rep,name=billing_accounts,json=billingAccounts" json:"billing_accounts,omitempty"`
// A token to retrieve the next page of results. To retrieve the next page,
// call `ListBillingAccounts` again with the `page_token` field set to this
// value. This field is empty if there are no more results to retrieve.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
func (m *ListBillingAccountsResponse) Reset() { *m = ListBillingAccountsResponse{} }
func (m *ListBillingAccountsResponse) String() string { return proto.CompactTextString(m) }
func (*ListBillingAccountsResponse) ProtoMessage() {}
func (*ListBillingAccountsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *ListBillingAccountsResponse) GetBillingAccounts() []*BillingAccount {
if m != nil {
return m.BillingAccounts
}
return nil
}
func (m *ListBillingAccountsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request message for `ListProjectBillingInfo`.
type ListProjectBillingInfoRequest struct {
// The resource name of the billing account associated with the projects that
// you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Requested page size. The maximum page size is 100; this is also the
// default.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// A token identifying a page of results to be returned. This should be a
// `next_page_token` value returned from a previous `ListProjectBillingInfo`
// call. If unspecified, the first page of results is returned.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}
func (m *ListProjectBillingInfoRequest) Reset() { *m = ListProjectBillingInfoRequest{} }
func (m *ListProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*ListProjectBillingInfoRequest) ProtoMessage() {}
func (*ListProjectBillingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *ListProjectBillingInfoRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ListProjectBillingInfoRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListProjectBillingInfoRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Request message for `ListProjectBillingInfoResponse`.
type ListProjectBillingInfoResponse struct {
// A list of `ProjectBillingInfo` resources representing the projects
// associated with the billing account.
ProjectBillingInfo []*ProjectBillingInfo `protobuf:"bytes,1,rep,name=project_billing_info,json=projectBillingInfo" json:"project_billing_info,omitempty"`
// A token to retrieve the next page of results. To retrieve the next page,
// call `ListProjectBillingInfo` again with the `page_token` field set to this
// value. This field is empty if there are no more results to retrieve.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
func (m *ListProjectBillingInfoResponse) Reset() { *m = ListProjectBillingInfoResponse{} }
func (m *ListProjectBillingInfoResponse) String() string { return proto.CompactTextString(m) }
func (*ListProjectBillingInfoResponse) ProtoMessage() {}
func (*ListProjectBillingInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *ListProjectBillingInfoResponse) GetProjectBillingInfo() []*ProjectBillingInfo {
if m != nil {
return m.ProjectBillingInfo
}
return nil
}
func (m *ListProjectBillingInfoResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request message for `GetProjectBillingInfo`.
type GetProjectBillingInfoRequest struct {
// The resource name of the project for which billing information is
// retrieved. For example, `projects/tokyo-rain-123`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *GetProjectBillingInfoRequest) Reset() { *m = GetProjectBillingInfoRequest{} }
func (m *GetProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*GetProjectBillingInfoRequest) ProtoMessage() {}
func (*GetProjectBillingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetProjectBillingInfoRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Request message for `UpdateProjectBillingInfo`.
type UpdateProjectBillingInfoRequest struct {
// The resource name of the project associated with the billing information
// that you want to update. For example, `projects/tokyo-rain-123`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The new billing information for the project. Read-only fields are ignored;
// thus, you may leave empty all fields except `billing_account_name`.
ProjectBillingInfo *ProjectBillingInfo `protobuf:"bytes,2,opt,name=project_billing_info,json=projectBillingInfo" json:"project_billing_info,omitempty"`
}
func (m *UpdateProjectBillingInfoRequest) Reset() { *m = UpdateProjectBillingInfoRequest{} }
func (m *UpdateProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateProjectBillingInfoRequest) ProtoMessage() {}
func (*UpdateProjectBillingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *UpdateProjectBillingInfoRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *UpdateProjectBillingInfoRequest) GetProjectBillingInfo() *ProjectBillingInfo {
if m != nil {
return m.ProjectBillingInfo
}
return nil
}
func init() {
proto.RegisterType((*BillingAccount)(nil), "google.cloud.billing.v1.BillingAccount")
proto.RegisterType((*ProjectBillingInfo)(nil), "google.cloud.billing.v1.ProjectBillingInfo")
proto.RegisterType((*GetBillingAccountRequest)(nil), "google.cloud.billing.v1.GetBillingAccountRequest")
proto.RegisterType((*ListBillingAccountsRequest)(nil), "google.cloud.billing.v1.ListBillingAccountsRequest")
proto.RegisterType((*ListBillingAccountsResponse)(nil), "google.cloud.billing.v1.ListBillingAccountsResponse")
proto.RegisterType((*ListProjectBillingInfoRequest)(nil), "google.cloud.billing.v1.ListProjectBillingInfoRequest")
proto.RegisterType((*ListProjectBillingInfoResponse)(nil), "google.cloud.billing.v1.ListProjectBillingInfoResponse")
proto.RegisterType((*GetProjectBillingInfoRequest)(nil), "google.cloud.billing.v1.GetProjectBillingInfoRequest")
proto.RegisterType((*UpdateProjectBillingInfoRequest)(nil), "google.cloud.billing.v1.UpdateProjectBillingInfoRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for CloudBilling service
type CloudBillingClient interface {
// Gets information about a billing account. The current authenticated user
// must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
GetBillingAccount(ctx context.Context, in *GetBillingAccountRequest, opts ...grpc.CallOption) (*BillingAccount, error)
// Lists the billing accounts that the current authenticated user
// [owns](https://support.google.com/cloud/answer/4430947).
ListBillingAccounts(ctx context.Context, in *ListBillingAccountsRequest, opts ...grpc.CallOption) (*ListBillingAccountsResponse, error)
// Lists the projects associated with a billing account. The current
// authenticated user must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
ListProjectBillingInfo(ctx context.Context, in *ListProjectBillingInfoRequest, opts ...grpc.CallOption) (*ListProjectBillingInfoResponse, error)
// Gets the billing information for a project. The current authenticated user
// must have [permission to view the
// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ).
GetProjectBillingInfo(ctx context.Context, in *GetProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error)
// Sets or updates the billing account associated with a project. You specify
// the new billing account by setting the `billing_account_name` in the
// `ProjectBillingInfo` resource to the resource name of a billing account.
// Associating a project with an open billing account enables billing on the
// project and allows charges for resource usage. If the project already had a
// billing account, this method changes the billing account used for resource
// usage charges.
//
// *Note:* Incurred charges that have not yet been reported in the transaction
// history of the Google Cloud Console may be billed to the new billing
// account, even if the charge occurred before the new billing account was
// assigned to the project.
//
// The current authenticated user must have ownership privileges for both the
// [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ) and the [billing
// account](https://support.google.com/cloud/answer/4430947).
//
// You can disable billing on the project by setting the
// `billing_account_name` field to empty. This action disassociates the
// current billing account from the project. Any billable activity of your
// in-use services will stop, and your application could stop functioning as
// expected. Any unbilled charges to date will be billed to the previously
// associated account. The current authenticated user must be either an owner
// of the project or an owner of the billing account for the project.
//
// Note that associating a project with a *closed* billing account will have
// much the same effect as disabling billing on the project: any paid
// resources used by the project will be shut down. Thus, unless you wish to
// disable billing, you should always call this method with the name of an
// *open* billing account.
UpdateProjectBillingInfo(ctx context.Context, in *UpdateProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error)
}
type cloudBillingClient struct {
cc *grpc.ClientConn
}
func NewCloudBillingClient(cc *grpc.ClientConn) CloudBillingClient {
return &cloudBillingClient{cc}
}
func (c *cloudBillingClient) GetBillingAccount(ctx context.Context, in *GetBillingAccountRequest, opts ...grpc.CallOption) (*BillingAccount, error) {
out := new(BillingAccount)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/GetBillingAccount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) ListBillingAccounts(ctx context.Context, in *ListBillingAccountsRequest, opts ...grpc.CallOption) (*ListBillingAccountsResponse, error) {
out := new(ListBillingAccountsResponse)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/ListBillingAccounts", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) ListProjectBillingInfo(ctx context.Context, in *ListProjectBillingInfoRequest, opts ...grpc.CallOption) (*ListProjectBillingInfoResponse, error) {
out := new(ListProjectBillingInfoResponse)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) GetProjectBillingInfo(ctx context.Context, in *GetProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error) {
out := new(ProjectBillingInfo)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/GetProjectBillingInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cloudBillingClient) UpdateProjectBillingInfo(ctx context.Context, in *UpdateProjectBillingInfoRequest, opts ...grpc.CallOption) (*ProjectBillingInfo, error) {
out := new(ProjectBillingInfo)
err := grpc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/UpdateProjectBillingInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for CloudBilling service
type CloudBillingServer interface {
// Gets information about a billing account. The current authenticated user
// must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
GetBillingAccount(context.Context, *GetBillingAccountRequest) (*BillingAccount, error)
// Lists the billing accounts that the current authenticated user
// [owns](https://support.google.com/cloud/answer/4430947).
ListBillingAccounts(context.Context, *ListBillingAccountsRequest) (*ListBillingAccountsResponse, error)
// Lists the projects associated with a billing account. The current
// authenticated user must be an [owner of the billing
// account](https://support.google.com/cloud/answer/4430947).
ListProjectBillingInfo(context.Context, *ListProjectBillingInfoRequest) (*ListProjectBillingInfoResponse, error)
// Gets the billing information for a project. The current authenticated user
// must have [permission to view the
// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ).
GetProjectBillingInfo(context.Context, *GetProjectBillingInfoRequest) (*ProjectBillingInfo, error)
// Sets or updates the billing account associated with a project. You specify
// the new billing account by setting the `billing_account_name` in the
// `ProjectBillingInfo` resource to the resource name of a billing account.
// Associating a project with an open billing account enables billing on the
// project and allows charges for resource usage. If the project already had a
// billing account, this method changes the billing account used for resource
// usage charges.
//
// *Note:* Incurred charges that have not yet been reported in the transaction
// history of the Google Cloud Console may be billed to the new billing
// account, even if the charge occurred before the new billing account was
// assigned to the project.
//
// The current authenticated user must have ownership privileges for both the
// [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
// ) and the [billing
// account](https://support.google.com/cloud/answer/4430947).
//
// You can disable billing on the project by setting the
// `billing_account_name` field to empty. This action disassociates the
// current billing account from the project. Any billable activity of your
// in-use services will stop, and your application could stop functioning as
// expected. Any unbilled charges to date will be billed to the previously
// associated account. The current authenticated user must be either an owner
// of the project or an owner of the billing account for the project.
//
// Note that associating a project with a *closed* billing account will have
// much the same effect as disabling billing on the project: any paid
// resources used by the project will be shut down. Thus, unless you wish to
// disable billing, you should always call this method with the name of an
// *open* billing account.
UpdateProjectBillingInfo(context.Context, *UpdateProjectBillingInfoRequest) (*ProjectBillingInfo, error)
}
func RegisterCloudBillingServer(s *grpc.Server, srv CloudBillingServer) {
s.RegisterService(&_CloudBilling_serviceDesc, srv)
}
func _CloudBilling_GetBillingAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBillingAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).GetBillingAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/GetBillingAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).GetBillingAccount(ctx, req.(*GetBillingAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_ListBillingAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBillingAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).ListBillingAccounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/ListBillingAccounts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).ListBillingAccounts(ctx, req.(*ListBillingAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_ListProjectBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListProjectBillingInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).ListProjectBillingInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).ListProjectBillingInfo(ctx, req.(*ListProjectBillingInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_GetProjectBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProjectBillingInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).GetProjectBillingInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/GetProjectBillingInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).GetProjectBillingInfo(ctx, req.(*GetProjectBillingInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CloudBilling_UpdateProjectBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateProjectBillingInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CloudBillingServer).UpdateProjectBillingInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.billing.v1.CloudBilling/UpdateProjectBillingInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CloudBillingServer).UpdateProjectBillingInfo(ctx, req.(*UpdateProjectBillingInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CloudBilling_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.billing.v1.CloudBilling",
HandlerType: (*CloudBillingServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetBillingAccount",
Handler: _CloudBilling_GetBillingAccount_Handler,
},
{
MethodName: "ListBillingAccounts",
Handler: _CloudBilling_ListBillingAccounts_Handler,
},
{
MethodName: "ListProjectBillingInfo",
Handler: _CloudBilling_ListProjectBillingInfo_Handler,
},
{
MethodName: "GetProjectBillingInfo",
Handler: _CloudBilling_GetProjectBillingInfo_Handler,
},
{
MethodName: "UpdateProjectBillingInfo",
Handler: _CloudBilling_UpdateProjectBillingInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/billing/v1/cloud_billing.proto",
}
func init() { proto.RegisterFile("google/cloud/billing/v1/cloud_billing.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 667 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x4e, 0xd4, 0x40,
0x14, 0xce, 0x00, 0x12, 0xf6, 0x80, 0x20, 0x03, 0xe8, 0x66, 0x17, 0x10, 0xea, 0x0f, 0x28, 0xb1,
0x15, 0xf0, 0xdf, 0xa8, 0x11, 0x63, 0x08, 0x89, 0x31, 0x9b, 0xaa, 0x89, 0xd1, 0x98, 0x66, 0x76,
0x3b, 0x34, 0xd5, 0x32, 0x53, 0x77, 0x0a, 0x51, 0x8c, 0x37, 0xbe, 0x82, 0x7a, 0xe1, 0x85, 0x37,
0x5e, 0xe8, 0x2b, 0x78, 0xed, 0x2b, 0xf8, 0x0a, 0xde, 0xfb, 0x0a, 0x66, 0xa6, 0x53, 0x65, 0xbb,
0x9d, 0x85, 0xc6, 0xbb, 0xe6, 0x9b, 0x73, 0xfa, 0x7d, 0xe7, 0x9b, 0xef, 0x6c, 0x17, 0x96, 0x02,
0xce, 0x83, 0x88, 0x3a, 0xad, 0x88, 0x6f, 0xfb, 0x4e, 0x33, 0x8c, 0xa2, 0x90, 0x05, 0xce, 0xce,
0x72, 0x0a, 0x78, 0x1a, 0xb0, 0xe3, 0x36, 0x4f, 0x38, 0x3e, 0x96, 0x16, 0xdb, 0xea, 0xcc, 0xce,
0xce, 0x76, 0x96, 0x6b, 0xd3, 0xfa, 0x2d, 0x24, 0x0e, 0x1d, 0x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0x53, 0x9a, 0x3e, 0xab, 0xae, 0x84,
0x4e, 0xe1, 0x09, 0x29, 0x34, 0xbf, 0x56, 0xdf, 0x11, 0x1c, 0x2d, 0x4e, 0x2f, 0xbe, 0xd4, 0x93,
0xcd, 0x18, 0x87, 0xda, 0xe5, 0xd2, 0x7d, 0x5a, 0xe8, 0x39, 0x25, 0x74, 0x01, 0x9f, 0xea, 0xe5,
0xa8, 0xa3, 0xd3, 0x20, 0xf0, 0x57, 0x04, 0x53, 0x85, 0x79, 0xc6, 0x17, 0x7b, 0x5d, 0xbb, 0x59,
0x78, 0x99, 0x54, 0x5a, 0x67, 0x94, 0xd8, 0x13, 0x78, 0xfe, 0x9f, 0xd8, 0x4c, 0x99, 0x54, 0xd9,
0xdc, 0x23, 0xe7, 0x07, 0x82, 0xaa, 0x69, 0x87, 0xf0, 0x15, 0x23, 0xe9, 0x3e, 0x6b, 0x57, 0x4e,
0xee, 0x2d, 0x25, 0xf7, 0x6a, 0x6d, 0x7f, 0xb9, 0xd7, 0x0a, 0x17, 0x77, 0xad, 0x0d, 0xf5, 0x16,
0xdf, 0x32, 0x51, 0xae, 0x8d, 0xef, 0xdd, 0xc6, 0x86, 0xfc, 0x62, 0x37, 0xd0, 0x93, 0x9b, 0xba,
0x3a, 0xe0, 0x11, 0x61, 0x81, 0xcd, 0xdb, 0x81, 0x13, 0x50, 0xa6, 0xbe, 0xe7, 0x4e, 0x7a, 0x44,
0xe2, 0x50, 0x74, 0xfd, 0x6d, 0xb8, 0xae, 0x1f, 0x9b, 0x83, 0xaa, 0x74, 0xf5, 0x4f, 0x00, 0x00,
0x00, 0xff, 0xff, 0xc0, 0x01, 0x24, 0x32, 0x60, 0x08, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,202 @@
// Code generated by protoc-gen-go.
// source: google/cloud/dataproc/v1/operations.proto
// DO NOT EDIT!
package dataproc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import _ "google.golang.org/genproto/googleapis/longrunning"
import _ "github.com/golang/protobuf/ptypes/empty"
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// The operation state.
type ClusterOperationStatus_State int32
const (
// Unused.
ClusterOperationStatus_UNKNOWN ClusterOperationStatus_State = 0
// The operation has been created.
ClusterOperationStatus_PENDING ClusterOperationStatus_State = 1
// The operation is running.
ClusterOperationStatus_RUNNING ClusterOperationStatus_State = 2
// The operation is done; either cancelled or completed.
ClusterOperationStatus_DONE ClusterOperationStatus_State = 3
)
var ClusterOperationStatus_State_name = map[int32]string{
0: "UNKNOWN",
1: "PENDING",
2: "RUNNING",
3: "DONE",
}
var ClusterOperationStatus_State_value = map[string]int32{
"UNKNOWN": 0,
"PENDING": 1,
"RUNNING": 2,
"DONE": 3,
}
func (x ClusterOperationStatus_State) String() string {
return proto.EnumName(ClusterOperationStatus_State_name, int32(x))
}
func (ClusterOperationStatus_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor2, []int{0, 0}
}
// The status of the operation.
type ClusterOperationStatus struct {
// [Output-only] A message containing the operation state.
State ClusterOperationStatus_State `protobuf:"varint,1,opt,name=state,enum=google.cloud.dataproc.v1.ClusterOperationStatus_State" json:"state,omitempty"`
// [Output-only] A message containing the detailed operation state.
InnerState string `protobuf:"bytes,2,opt,name=inner_state,json=innerState" json:"inner_state,omitempty"`
// [Output-only]A message containing any operation metadata details.
Details string `protobuf:"bytes,3,opt,name=details" json:"details,omitempty"`
// [Output-only] The time this state was entered.
StateStartTime *google_protobuf3.Timestamp `protobuf:"bytes,4,opt,name=state_start_time,json=stateStartTime" json:"state_start_time,omitempty"`
}
func (m *ClusterOperationStatus) Reset() { *m = ClusterOperationStatus{} }
func (m *ClusterOperationStatus) String() string { return proto.CompactTextString(m) }
func (*ClusterOperationStatus) ProtoMessage() {}
func (*ClusterOperationStatus) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *ClusterOperationStatus) GetState() ClusterOperationStatus_State {
if m != nil {
return m.State
}
return ClusterOperationStatus_UNKNOWN
}
func (m *ClusterOperationStatus) GetInnerState() string {
if m != nil {
return m.InnerState
}
return ""
}
func (m *ClusterOperationStatus) GetDetails() string {
if m != nil {
return m.Details
}
return ""
}
func (m *ClusterOperationStatus) GetStateStartTime() *google_protobuf3.Timestamp {
if m != nil {
return m.StateStartTime
}
return nil
}
// Metadata describing the operation.
type ClusterOperationMetadata struct {
// [Output-only] Name of the cluster for the operation.
ClusterName string `protobuf:"bytes,7,opt,name=cluster_name,json=clusterName" json:"cluster_name,omitempty"`
// [Output-only] Cluster UUID for the operation.
ClusterUuid string `protobuf:"bytes,8,opt,name=cluster_uuid,json=clusterUuid" json:"cluster_uuid,omitempty"`
// [Output-only] Current operation status.
Status *ClusterOperationStatus `protobuf:"bytes,9,opt,name=status" json:"status,omitempty"`
// [Output-only] The previous operation status.
StatusHistory []*ClusterOperationStatus `protobuf:"bytes,10,rep,name=status_history,json=statusHistory" json:"status_history,omitempty"`
// [Output-only] The operation type.
OperationType string `protobuf:"bytes,11,opt,name=operation_type,json=operationType" json:"operation_type,omitempty"`
// [Output-only] Short description of operation.
Description string `protobuf:"bytes,12,opt,name=description" json:"description,omitempty"`
}
func (m *ClusterOperationMetadata) Reset() { *m = ClusterOperationMetadata{} }
func (m *ClusterOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*ClusterOperationMetadata) ProtoMessage() {}
func (*ClusterOperationMetadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *ClusterOperationMetadata) GetClusterName() string {
if m != nil {
return m.ClusterName
}
return ""
}
func (m *ClusterOperationMetadata) GetClusterUuid() string {
if m != nil {
return m.ClusterUuid
}
return ""
}
func (m *ClusterOperationMetadata) GetStatus() *ClusterOperationStatus {
if m != nil {
return m.Status
}
return nil
}
func (m *ClusterOperationMetadata) GetStatusHistory() []*ClusterOperationStatus {
if m != nil {
return m.StatusHistory
}
return nil
}
func (m *ClusterOperationMetadata) GetOperationType() string {
if m != nil {
return m.OperationType
}
return ""
}
func (m *ClusterOperationMetadata) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func init() {
proto.RegisterType((*ClusterOperationStatus)(nil), "google.cloud.dataproc.v1.ClusterOperationStatus")
proto.RegisterType((*ClusterOperationMetadata)(nil), "google.cloud.dataproc.v1.ClusterOperationMetadata")
proto.RegisterEnum("google.cloud.dataproc.v1.ClusterOperationStatus_State", ClusterOperationStatus_State_name, ClusterOperationStatus_State_value)
}
func init() { proto.RegisterFile("google/cloud/dataproc/v1/operations.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 479 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4f, 0x6f, 0xd3, 0x30,
0x14, 0x27, 0xed, 0xb6, 0x6e, 0xce, 0x56, 0x2a, 0x1f, 0x90, 0x55, 0x26, 0x2d, 0x14, 0x21, 0x95,
0x4b, 0xc2, 0x86, 0x84, 0x90, 0xb8, 0xa0, 0xd1, 0x89, 0x21, 0xc0, 0xad, 0xb2, 0x55, 0x93, 0xb8,
0x44, 0x5e, 0x62, 0x82, 0xa5, 0xc4, 0xb6, 0x6c, 0x67, 0x52, 0x3f, 0x0e, 0xdf, 0x87, 0x0f, 0x85,
0x6c, 0x27, 0x55, 0xd9, 0xe8, 0x01, 0x4e, 0xf1, 0x7b, 0xbf, 0x3f, 0x79, 0xbf, 0xe7, 0x04, 0xbc,
0x2c, 0x85, 0x28, 0x2b, 0x9a, 0xe4, 0x95, 0x68, 0x8a, 0xa4, 0x20, 0x86, 0x48, 0x25, 0xf2, 0xe4,
0xee, 0x34, 0x11, 0x92, 0x2a, 0x62, 0x98, 0xe0, 0x3a, 0x96, 0x4a, 0x18, 0x01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 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,117 @@
// Code generated by protoc-gen-go.
// source: google/cloud/functions/v1beta2/operations.proto
// DO NOT EDIT!
package functions
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/any"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// A type of an operation.
type OperationType int32
const (
// Unknown operation type.
OperationType_OPERATION_UNSPECIFIED OperationType = 0
// Triggered by CreateFunction call
OperationType_CREATE_FUNCTION OperationType = 1
// Triggered by UpdateFunction call
OperationType_UPDATE_FUNCTION OperationType = 2
// Triggered by DeleteFunction call.
OperationType_DELETE_FUNCTION OperationType = 3
)
var OperationType_name = map[int32]string{
0: "OPERATION_UNSPECIFIED",
1: "CREATE_FUNCTION",
2: "UPDATE_FUNCTION",
3: "DELETE_FUNCTION",
}
var OperationType_value = map[string]int32{
"OPERATION_UNSPECIFIED": 0,
"CREATE_FUNCTION": 1,
"UPDATE_FUNCTION": 2,
"DELETE_FUNCTION": 3,
}
func (x OperationType) String() string {
return proto.EnumName(OperationType_name, int32(x))
}
func (OperationType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
// Metadata describing an [Operation][google.longrunning.Operation]
type OperationMetadataV1Beta2 struct {
// Target of the operation - for example
// projects/project-1/locations/region-1/functions/function-1
Target string `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
// Type of operation.
Type OperationType `protobuf:"varint,2,opt,name=type,enum=google.cloud.functions.v1beta2.OperationType" json:"type,omitempty"`
// The original request that started the operation.
Request *google_protobuf1.Any `protobuf:"bytes,3,opt,name=request" json:"request,omitempty"`
}
func (m *OperationMetadataV1Beta2) Reset() { *m = OperationMetadataV1Beta2{} }
func (m *OperationMetadataV1Beta2) String() string { return proto.CompactTextString(m) }
func (*OperationMetadataV1Beta2) ProtoMessage() {}
func (*OperationMetadataV1Beta2) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *OperationMetadataV1Beta2) GetTarget() string {
if m != nil {
return m.Target
}
return ""
}
func (m *OperationMetadataV1Beta2) GetType() OperationType {
if m != nil {
return m.Type
}
return OperationType_OPERATION_UNSPECIFIED
}
func (m *OperationMetadataV1Beta2) GetRequest() *google_protobuf1.Any {
if m != nil {
return m.Request
}
return nil
}
func init() {
proto.RegisterType((*OperationMetadataV1Beta2)(nil), "google.cloud.functions.v1beta2.OperationMetadataV1Beta2")
proto.RegisterEnum("google.cloud.functions.v1beta2.OperationType", OperationType_name, OperationType_value)
}
func init() { proto.RegisterFile("google/cloud/functions/v1beta2/operations.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 333 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x4f, 0x4f, 0xf2, 0x30,
0x1c, 0xc7, 0x9f, 0xc2, 0x13, 0x8c, 0x35, 0x2a, 0x99, 0x7f, 0x32, 0x88, 0x31, 0x84, 0x13, 0x31,
0xb1, 0x0d, 0x78, 0xf4, 0x34, 0xa0, 0x18, 0x12, 0x85, 0x65, 0x82, 0x07, 0x2f, 0xa4, 0x40, 0x69,
0x96, 0xcc, 0xb6, 0x6e, 0x9d, 0xc9, 0x5e, 0x82, 0x2f, 0xc4, 0xf7, 0x69, 0x56, 0xba, 0x05, 0x0e,
0xea, 0xb1, 0x9f, 0xf6, 0xf3, 0xed, 0xf7, 0x97, 0x1f, 0xc4, 0x5c, 0x4a, 0x1e, 0x31, 0xbc, 0x8a,
0x64, 0xba, 0xc6, 0x9b, 0x54, 0xac, 0x74, 0x28, 0x45, 0x82, 0x3f, 0xba, 0x4b, 0xa6, 0x69, 0x0f,
0x4b, 0xc5, 0x62, 0x6a, 0x10, 0x52, 0xb1, 0xd4, 0xd2, 0xb9, 0xde, 0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0, 0xfa, 0x60, 0x5d, 0x2e, 0x23, 0x2a, 0x38, 0x92, 0x31, 0xc7, 0x9c, 0x09,
0x33, 0x99, 0x5d, 0x3d, 0x55, 0x61, 0xf2, 0xd3, 0xfa, 0xef, 0x4b, 0xb2, 0xac, 0x19, 0xe7, 0xee,
0x3b, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x8a, 0xb1, 0x83, 0x31, 0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
// Code generated by protoc-gen-go.
// source: google/cloud/ml/v1/operation_metadata.proto
// DO NOT EDIT!
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf2 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// The operation type.
type OperationMetadata_OperationType int32
const (
// Unspecified operation type.
OperationMetadata_OPERATION_TYPE_UNSPECIFIED OperationMetadata_OperationType = 0
// An operation to create a new version.
OperationMetadata_CREATE_VERSION OperationMetadata_OperationType = 1
// An operation to delete an existing version.
OperationMetadata_DELETE_VERSION OperationMetadata_OperationType = 2
// An operation to delete an existing model.
OperationMetadata_DELETE_MODEL OperationMetadata_OperationType = 3
)
var OperationMetadata_OperationType_name = map[int32]string{
0: "OPERATION_TYPE_UNSPECIFIED",
1: "CREATE_VERSION",
2: "DELETE_VERSION",
3: "DELETE_MODEL",
}
var OperationMetadata_OperationType_value = map[string]int32{
"OPERATION_TYPE_UNSPECIFIED": 0,
"CREATE_VERSION": 1,
"DELETE_VERSION": 2,
"DELETE_MODEL": 3,
}
func (x OperationMetadata_OperationType) String() string {
return proto.EnumName(OperationMetadata_OperationType_name, int32(x))
}
func (OperationMetadata_OperationType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor2, []int{0, 0}
}
// Represents the metadata of the long-running operation.
type OperationMetadata struct {
// The time the operation was submitted.
CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
// The time operation processing started.
StartTime *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
// The time operation processing completed.
EndTime *google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
// Indicates whether a request to cancel this operation has been made.
IsCancellationRequested bool `protobuf:"varint,4,opt,name=is_cancellation_requested,json=isCancellationRequested" json:"is_cancellation_requested,omitempty"`
// The operation type.
OperationType OperationMetadata_OperationType `protobuf:"varint,5,opt,name=operation_type,json=operationType,enum=google.cloud.ml.v1.OperationMetadata_OperationType" json:"operation_type,omitempty"`
// Contains the name of the model associated with the operation.
ModelName string `protobuf:"bytes,6,opt,name=model_name,json=modelName" json:"model_name,omitempty"`
// Contains the version associated with the operation.
Version *Version `protobuf:"bytes,7,opt,name=version" json:"version,omitempty"`
}
func (m *OperationMetadata) Reset() { *m = OperationMetadata{} }
func (m *OperationMetadata) String() string { return proto.CompactTextString(m) }
func (*OperationMetadata) ProtoMessage() {}
func (*OperationMetadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *OperationMetadata) GetCreateTime() *google_protobuf2.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *OperationMetadata) GetStartTime() *google_protobuf2.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *OperationMetadata) GetEndTime() *google_protobuf2.Timestamp {
if m != nil {
return m.EndTime
}
return nil
}
func (m *OperationMetadata) GetIsCancellationRequested() bool {
if m != nil {
return m.IsCancellationRequested
}
return false
}
func (m *OperationMetadata) GetOperationType() OperationMetadata_OperationType {
if m != nil {
return m.OperationType
}
return OperationMetadata_OPERATION_TYPE_UNSPECIFIED
}
func (m *OperationMetadata) GetModelName() string {
if m != nil {
return m.ModelName
}
return ""
}
func (m *OperationMetadata) GetVersion() *Version {
if m != nil {
return m.Version
}
return nil
}
func init() {
proto.RegisterType((*OperationMetadata)(nil), "google.cloud.ml.v1.OperationMetadata")
proto.RegisterEnum("google.cloud.ml.v1.OperationMetadata_OperationType", OperationMetadata_OperationType_name, OperationMetadata_OperationType_value)
}
func init() { proto.RegisterFile("google/cloud/ml/v1/operation_metadata.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 454 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x5f, 0x6b, 0xdb, 0x30,
0x14, 0xc5, 0xe7, 0xb6, 0x6b, 0x1a, 0x75, 0x0d, 0x99, 0x1e, 0xb6, 0xcc, 0xfb, 0x17, 0xfa, 0x30,
0x02, 0x03, 0x99, 0xb4, 0xdb, 0xc3, 0xd6, 0xa7, 0x36, 0xd1, 0x20, 0xd0, 0xc6, 0xc6, 0xf5, 0x0a,
0xeb, 0x8b, 0x51, 0xed, 0x3b, 0x23, 0x90, 0x25, 0xcf, 0x52, 0x0c, 0xfd, 0x2c, 0xfb, 0xb2, 0x23,
0x92, 0x4d, 0x33, 0x52, 0xe8, 0xa3, 0xce, 0xfd, 0x9d, 0xab, 0xab, 0x7b, 0x84, 0x3e, 0x17, 0x4a,
0x15, 0x02, 0x82, 0x4c, 0xa8, 0x55, 0x1e, 0x94, 0x22, 0x68, 0xa6, 0x81, 0xaa, 0xa0, 0x66, 0x86,
0x2b, 0x99, 0x96, 0x60, 0x58, 0xce, 0x0c, 0x23, 0x55, 0xad, 0x8c, 0xc2, 0xd8, 0xc1, 0xc4, 0xc2,
0xa4, 0x14, 0xa4, 0x99, 0xfa, 0xef, 0xda, 0x06, 0xac, 0xe2, 0x01, 0x93, 0x52, 0x19, 0xeb, 0xd4,
0xce, 0xe1, 0x7f, 0x7a, 0xa4, 0x7d, 0xa9, 0x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, 0xf3,
0xc6, 0x21, 0x71, 0xc7, 0x1e, 0x73, 0x74, 0xf4, 0xdf, 0xad, 0xf8, 0x03, 0xf2, 0xc3, 0x88, 0xc6,
0xe7, 0xc9, 0x22, 0x5c, 0xa6, 0xc9, 0xaf, 0x88, 0xa6, 0x3f, 0x97, 0xd7, 0x11, 0x9d, 0x2d, 0x7e,
0x2c, 0xe8, 0x7c, 0xf8, 0x0c, 0x63, 0x34, 0x98, 0xc5, 0xf4, 0x3c, 0xa1, 0xe9, 0x0d, 0x8d, 0xaf,
0x17, 0xe1, 0x72, 0xe8, 0xad, 0xb5, 0x39, 0xbd, 0xa4, 0x1b, 0xda, 0x0e, 0x1e, 0xa2, 0x17, 0xad,
0x76, 0x15, 0xce, 0xe9, 0xe5, 0x70, 0xf7, 0x42, 0x20, 0x3f, 0x53, 0xe5, 0xd6, 0x54, 0xac, 0xe2,
0xa4, 0x99, 0x5e, 0xbc, 0xda, 0x5a, 0x47, 0xb4, 0x0e, 0x29, 0xf2, 0x6e, 0xbf, 0xb4, 0x8e, 0x42,
0x09, 0x26, 0x0b, 0xa2, 0xea, 0x22, 0x28, 0x40, 0xda, 0x08, 0x03, 0x57, 0x62, 0x15, 0xd7, 0x9b,
0xbf, 0xf7, 0xac, 0x14, 0x77, 0xfb, 0x16, 0x38, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x03, 0xf9,
0xcc, 0xf1, 0x3c, 0x03, 0x00, 0x00,
}

View File

@@ -0,0 +1,344 @@
// Code generated by protoc-gen-go.
// source: google/cloud/ml/v1/prediction_service.proto
// DO NOT EDIT!
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_api3 "google.golang.org/genproto/googleapis/api/httpbody"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Request for predictions to be issued against a trained model.
//
// The body of the request is a single JSON object with a single top-level
// field:
//
// <dl>
// <dt>instances</dt>
// <dd>A JSON array containing values representing the instances to use for
// prediction.</dd>
// </dl>
//
// The structure of each element of the instances list is determined by your
// model's input definition. Instances can include named inputs or can contain
// only unlabeled values.
//
// Not all data includes named inputs. Some instances will be simple
// JSON values (boolean, number, or string). However, instances are often lists
// of simple values, or complex nested lists. Here are some examples of request
// bodies:
//
// CSV data with each row encoded as a string value:
// <pre>
// {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]}
// </pre>
// Plain text:
// <pre>
// {"instances": ["the quick brown fox", "la bruja le dio"]}
// </pre>
// Sentences encoded as lists of words (vectors of strings):
// <pre>
// {
// "instances": [
// ["the","quick","brown"],
// ["la","bruja","le"],
// ...
// ]
// }
// </pre>
// Floating point scalar values:
// <pre>
// {"instances": [0.0, 1.1, 2.2]}
// </pre>
// Vectors of integers:
// <pre>
// {
// "instances": [
// [0, 1, 2],
// [3, 4, 5],
// ...
// ]
// }
// </pre>
// Tensors (in this case, two-dimensional tensors):
// <pre>
// {
// "instances": [
// [
// [0, 1, 2],
// [3, 4, 5]
// ],
// ...
// ]
// }
// </pre>
// Images can be represented different ways. In this encoding scheme the first
// two dimensions represent the rows and columns of the image, and the third
// contains lists (vectors) of the R, G, and B values for each pixel.
// <pre>
// {
// "instances": [
// [
// [
// [138, 30, 66],
// [130, 20, 56],
// ...
// ],
// [
// [126, 38, 61],
// [122, 24, 57],
// ...
// ],
// ...
// ],
// ...
// ]
// }
// </pre>
// JSON strings must be encoded as UTF-8. To send binary data, you must
// base64-encode the data and mark it as binary. To mark a JSON string
// as binary, replace it with a JSON object with a single attribute named `b64`:
// <pre>{"b64": "..."} </pre>
// For example:
//
// Two Serialized tf.Examples (fake data, for illustrative purposes only):
// <pre>
// {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
// </pre>
// Two JPEG image byte strings (fake data, for illustrative purposes only):
// <pre>
// {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
// </pre>
// If your data includes named references, format each instance as a JSON object
// with the named references as the keys:
//
// JSON input data to be preprocessed:
// <pre>
// {
// "instances": [
// {
// "a": 1.0,
// "b": true,
// "c": "x"
// },
// {
// "a": -2.0,
// "b": false,
// "c": "y"
// }
// ]
// }
// </pre>
// Some models have an underlying TensorFlow graph that accepts multiple input
// tensors. In this case, you should use the names of JSON name/value pairs to
// identify the input tensors, as shown in the following exmaples:
//
// For a graph with input tensor aliases "tag" (string) and "image"
// (base64-encoded string):
// <pre>
// {
// "instances": [
// {
// "tag": "beach",
// "image": {"b64": "ASa8asdf"}
// },
// {
// "tag": "car",
// "image": {"b64": "JLK7ljk3"}
// }
// ]
// }
// </pre>
// For a graph with input tensor aliases "tag" (string) and "image"
// (3-dimensional array of 8-bit ints):
// <pre>
// {
// "instances": [
// {
// "tag": "beach",
// "image": [
// [
// [138, 30, 66],
// [130, 20, 56],
// ...
// ],
// [
// [126, 38, 61],
// [122, 24, 57],
// ...
// ],
// ...
// ]
// },
// {
// "tag": "car",
// "image": [
// [
// [255, 0, 102],
// [255, 0, 97],
// ...
// ],
// [
// [254, 1, 101],
// [254, 2, 93],
// ...
// ],
// ...
// ]
// },
// ...
// ]
// }
// </pre>
// If the call is successful, the response body will contain one prediction
// entry per instance in the request body. If prediction fails for any
// instance, the response body will contain no predictions and will contian
// a single error entry instead.
type PredictRequest struct {
// Required. The resource name of a model or a version.
//
// Authorization: requires `Viewer` role on the parent project.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
//
// Required. The prediction request body.
HttpBody *google_api3.HttpBody `protobuf:"bytes,2,opt,name=http_body,json=httpBody" json:"http_body,omitempty"`
}
func (m *PredictRequest) Reset() { *m = PredictRequest{} }
func (m *PredictRequest) String() string { return proto.CompactTextString(m) }
func (*PredictRequest) ProtoMessage() {}
func (*PredictRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *PredictRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *PredictRequest) GetHttpBody() *google_api3.HttpBody {
if m != nil {
return m.HttpBody
}
return nil
}
func init() {
proto.RegisterType((*PredictRequest)(nil), "google.cloud.ml.v1.PredictRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for OnlinePredictionService service
type OnlinePredictionServiceClient interface {
// Performs prediction on the data in the request.
//
// **** REMOVE FROM GENERATED DOCUMENTATION
Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*google_api3.HttpBody, error)
}
type onlinePredictionServiceClient struct {
cc *grpc.ClientConn
}
func NewOnlinePredictionServiceClient(cc *grpc.ClientConn) OnlinePredictionServiceClient {
return &onlinePredictionServiceClient{cc}
}
func (c *onlinePredictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*google_api3.HttpBody, error) {
out := new(google_api3.HttpBody)
err := grpc.Invoke(ctx, "/google.cloud.ml.v1.OnlinePredictionService/Predict", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for OnlinePredictionService service
type OnlinePredictionServiceServer interface {
// Performs prediction on the data in the request.
//
// **** REMOVE FROM GENERATED DOCUMENTATION
Predict(context.Context, *PredictRequest) (*google_api3.HttpBody, error)
}
func RegisterOnlinePredictionServiceServer(s *grpc.Server, srv OnlinePredictionServiceServer) {
s.RegisterService(&_OnlinePredictionService_serviceDesc, srv)
}
func _OnlinePredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PredictRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OnlinePredictionServiceServer).Predict(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.ml.v1.OnlinePredictionService/Predict",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OnlinePredictionServiceServer).Predict(ctx, req.(*PredictRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OnlinePredictionService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.ml.v1.OnlinePredictionService",
HandlerType: (*OnlinePredictionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Predict",
Handler: _OnlinePredictionService_Predict_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/ml/v1/prediction_service.proto",
}
func init() { proto.RegisterFile("google/cloud/ml/v1/prediction_service.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 308 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x4f, 0x4b, 0xfb, 0x30,
0x18, 0xa6, 0xe3, 0xc7, 0x4f, 0x17, 0xc1, 0x43, 0x10, 0x9d, 0x45, 0x64, 0xd4, 0xcb, 0x9c, 0x90,
0xd0, 0xe9, 0x69, 0xe2, 0x65, 0x27, 0x6f, 0x96, 0x79, 0x10, 0xbc, 0x8c, 0xac, 0x0d, 0x59, 0x24,
0xcd, 0x1b, 0xdb, 0xac, 0x30, 0xc4, 0x8b, 0x37, 0xcf, 0x7e, 0x34, 0xbf, 0x82, 0x1f, 0x44, 0xd2,
0x04, 0x99, 0xd4, 0xdb, 0x4b, 0xde, 0xe7, 0x79, 0x9f, 0x3f, 0x41, 0x17, 0x02, 0x40, 0x28, 0x4e,
0x73, 0x05, 0xeb, 0x82, 0x96, 0x8a, 0x36, 0x29, 0x35, 0x15, 0x2f, 0x64, 0x6e, 0x25, 0xe8, 0x45,
0xcd, 0xab, 0x46, 0xe6, 0x9c, 0x98, 0x0a, 0x2c, 0x60, 0xec, 0xc1, 0xa4, 0x05, 0x93, 0x52, 0x91,
0x26, 0x8d, 0x4f, 0xc2, 0x01, 0x66, 0x24,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
0xd5, 0x01, 0x00, 0x00,
}

View File

@@ -0,0 +1,178 @@
// Code generated by protoc-gen-go.
// source: google/cloud/ml/v1/project_service.proto
// DO NOT EDIT!
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Requests service account information associated with a project.
type GetConfigRequest struct {
// Required. The project name.
//
// Authorization: requires `Viewer` role on the specified project.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *GetConfigRequest) Reset() { *m = GetConfigRequest{} }
func (m *GetConfigRequest) String() string { return proto.CompactTextString(m) }
func (*GetConfigRequest) ProtoMessage() {}
func (*GetConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
func (m *GetConfigRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Returns service account information associated with a project.
type GetConfigResponse struct {
// The service account Cloud ML uses to access resources in the project.
ServiceAccount string `protobuf:"bytes,1,opt,name=service_account,json=serviceAccount" json:"service_account,omitempty"`
// The project number for `service_account`.
ServiceAccountProject int64 `protobuf:"varint,2,opt,name=service_account_project,json=serviceAccountProject" json:"service_account_project,omitempty"`
}
func (m *GetConfigResponse) Reset() { *m = GetConfigResponse{} }
func (m *GetConfigResponse) String() string { return proto.CompactTextString(m) }
func (*GetConfigResponse) ProtoMessage() {}
func (*GetConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
func (m *GetConfigResponse) GetServiceAccount() string {
if m != nil {
return m.ServiceAccount
}
return ""
}
func (m *GetConfigResponse) GetServiceAccountProject() int64 {
if m != nil {
return m.ServiceAccountProject
}
return 0
}
func init() {
proto.RegisterType((*GetConfigRequest)(nil), "google.cloud.ml.v1.GetConfigRequest")
proto.RegisterType((*GetConfigResponse)(nil), "google.cloud.ml.v1.GetConfigResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for ProjectManagementService service
type ProjectManagementServiceClient interface {
// Get the service account information associated with your project. You need
// this information in order to grant the service account persmissions for
// the Google Cloud Storage location where you put your model training code
// for training the model with Google Cloud Machine Learning.
GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
}
type projectManagementServiceClient struct {
cc *grpc.ClientConn
}
func NewProjectManagementServiceClient(cc *grpc.ClientConn) ProjectManagementServiceClient {
return &projectManagementServiceClient{cc}
}
func (c *projectManagementServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
out := new(GetConfigResponse)
err := grpc.Invoke(ctx, "/google.cloud.ml.v1.ProjectManagementService/GetConfig", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ProjectManagementService service
type ProjectManagementServiceServer interface {
// Get the service account information associated with your project. You need
// this information in order to grant the service account persmissions for
// the Google Cloud Storage location where you put your model training code
// for training the model with Google Cloud Machine Learning.
GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
}
func RegisterProjectManagementServiceServer(s *grpc.Server, srv ProjectManagementServiceServer) {
s.RegisterService(&_ProjectManagementService_serviceDesc, srv)
}
func _ProjectManagementService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProjectManagementServiceServer).GetConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.ml.v1.ProjectManagementService/GetConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProjectManagementServiceServer).GetConfig(ctx, req.(*GetConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ProjectManagementService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.ml.v1.ProjectManagementService",
HandlerType: (*ProjectManagementServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetConfig",
Handler: _ProjectManagementService_GetConfig_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/ml/v1/project_service.proto",
}
func init() { proto.RegisterFile("google/cloud/ml/v1/project_service.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{
// 319 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbf, 0x4a, 0x43, 0x31,
0x14, 0xc6, 0xb9, 0x55, 0x84, 0x66, 0xf0, 0x4f, 0x44, 0x2c, 0x45, 0xb0, 0x16, 0xb5, 0xc5, 0x21,
0xa1, 0x2a, 0x0e, 0x8a, 0x83, 0x75, 0x70, 0x12, 0x4a, 0xdd, 0x5c, 0x4a, 0xbc, 0x1e, 0x43, 0x24,
0xc9, 0x89, 0x37, 0xe9, 0x5d, 0xc4, 0x41, 0x5f, 0xc1, 0xdd, 0x97, 0xf2, 0x15, 0x7c, 0x10, 0xe9,
0x4d, 0x94, 0xda, 0x0e, 0x6e, 0x87, 0x73, 0x7e, 0x5f, 0xf2, 0x7d, 0xe7, 0x90, 0xae, 0x44, 0x94,
0x1a, 0x78, 0xae, 0x71, 0x7c, 0xcf, 0x8d, 0xe6, 0x65, 0x8f, 0xbb, 0x02, 0x1f, 0x21, 0x0f, 0x23,
0x0f, 0x45, 0xa9, 0x72, 0x60, 0xae, 0xc0, 0x80, 0x94, 0x46, 0x92, 0x55, 0x24, 0x33, 0x9a, 0x95,
0xbd, 0xe6, 0x56, 0x52, 0x0b, 0xa7, 0xb8, 0xb0, 0x16, 0x83, 0x08, 0x0a, 0xad, 0x8f, 0x8a, 0xf6,
0x3e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a5, 0x43, 0x33, 0x0e, 0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
// Code generated by protoc-gen-go.
// source: google/cloud/ml/v1beta1/operation_metadata.proto
// DO NOT EDIT!
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf2 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// The operation type.
type OperationMetadata_OperationType int32
const (
// Unspecified operation type.
OperationMetadata_OPERATION_TYPE_UNSPECIFIED OperationMetadata_OperationType = 0
// An operation to create a new version.
OperationMetadata_CREATE_VERSION OperationMetadata_OperationType = 1
// An operation to delete an existing version.
OperationMetadata_DELETE_VERSION OperationMetadata_OperationType = 2
// An operation to delete an existing model.
OperationMetadata_DELETE_MODEL OperationMetadata_OperationType = 3
)
var OperationMetadata_OperationType_name = map[int32]string{
0: "OPERATION_TYPE_UNSPECIFIED",
1: "CREATE_VERSION",
2: "DELETE_VERSION",
3: "DELETE_MODEL",
}
var OperationMetadata_OperationType_value = map[string]int32{
"OPERATION_TYPE_UNSPECIFIED": 0,
"CREATE_VERSION": 1,
"DELETE_VERSION": 2,
"DELETE_MODEL": 3,
}
func (x OperationMetadata_OperationType) String() string {
return proto.EnumName(OperationMetadata_OperationType_name, int32(x))
}
func (OperationMetadata_OperationType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor2, []int{0, 0}
}
// Represents the metadata of the long-running operation.
type OperationMetadata struct {
// The time the operation was submitted.
CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
// The time operation processing started.
StartTime *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
// The time operation processing completed.
EndTime *google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
// Indicates whether a request to cancel this operation has been made.
IsCancellationRequested bool `protobuf:"varint,4,opt,name=is_cancellation_requested,json=isCancellationRequested" json:"is_cancellation_requested,omitempty"`
// The operation type.
OperationType OperationMetadata_OperationType `protobuf:"varint,5,opt,name=operation_type,json=operationType,enum=google.cloud.ml.v1beta1.OperationMetadata_OperationType" json:"operation_type,omitempty"`
// Contains the name of the model associated with the operation.
ModelName string `protobuf:"bytes,6,opt,name=model_name,json=modelName" json:"model_name,omitempty"`
// Contains the version associated with the operation.
Version *Version `protobuf:"bytes,7,opt,name=version" json:"version,omitempty"`
}
func (m *OperationMetadata) Reset() { *m = OperationMetadata{} }
func (m *OperationMetadata) String() string { return proto.CompactTextString(m) }
func (*OperationMetadata) ProtoMessage() {}
func (*OperationMetadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *OperationMetadata) GetCreateTime() *google_protobuf2.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *OperationMetadata) GetStartTime() *google_protobuf2.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *OperationMetadata) GetEndTime() *google_protobuf2.Timestamp {
if m != nil {
return m.EndTime
}
return nil
}
func (m *OperationMetadata) GetIsCancellationRequested() bool {
if m != nil {
return m.IsCancellationRequested
}
return false
}
func (m *OperationMetadata) GetOperationType() OperationMetadata_OperationType {
if m != nil {
return m.OperationType
}
return OperationMetadata_OPERATION_TYPE_UNSPECIFIED
}
func (m *OperationMetadata) GetModelName() string {
if m != nil {
return m.ModelName
}
return ""
}
func (m *OperationMetadata) GetVersion() *Version {
if m != nil {
return m.Version
}
return nil
}
func init() {
proto.RegisterType((*OperationMetadata)(nil), "google.cloud.ml.v1beta1.OperationMetadata")
proto.RegisterEnum("google.cloud.ml.v1beta1.OperationMetadata_OperationType", OperationMetadata_OperationType_name, OperationMetadata_OperationType_value)
}
func init() { proto.RegisterFile("google/cloud/ml/v1beta1/operation_metadata.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 457 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x5f, 0x6b, 0xdb, 0x30,
0x14, 0xc5, 0xe7, 0xb6, 0x6b, 0x1b, 0x75, 0x0d, 0x99, 0x1f, 0x56, 0x2f, 0x6c, 0xab, 0xe9, 0x53,
0x60, 0x60, 0xaf, 0x1d, 0x83, 0x75, 0x7d, 0x6a, 0x13, 0x0d, 0x02, 0x6d, 0x6c, 0x54, 0xaf, 0xb0,
0xbd, 0x18, 0xc5, 0xbe, 0x33, 0x02, 0xfd, 0xf1, 0x2c, 0x25, 0xd0, 0x0f, 0xb4, 0xef, 0x39, 0x22,
0xd9, 0x34, 0x23, 0x84, 0x3e, 0xea, 0xdc, 0xf3, 0xbb, 0xf7, 0xf8, 0x5e, 0xa3, 0x4f, 0x95, 0x52,
0x15, 0x87, 0xb8, 0xe0, 0x6a, 0x51, 0xc6, 0x82, 0xc7, 0xcb, 0xf3, 0x39, 0x18, 0x7a, 0x1e, 0xab,
0x1a, 0x1a, 0x6a, 0x98, 0x92, 0xb9, 0x00, 0x43, 0x4b, 0x6a, 0x68, 0x54, 0x37, 0xca, 0x28, 0xff,
0xc4, 0x11, 0x91, 0x25, 0x22, 0xc1, 0xa3, 0x96, 0x18, 0xbe, 0x6b, 0x5b, 0xd1, 0x9a, 0xc5, 0x54,
0x4a, 0x65, 0x2c, 0xae, 0x1d, 0x36, 0xfc, 0xb8, 0x6d, 0x90, 0x50, 0x25, 0xf0, 0x5c, 0x43, 0xb3,
0x64, 0x05, 0xb4, 0xe6, 0xd3, 0xd6, 0x6c, 0x5f, 0xf3, 0xc5, 0xef, 0xd8, 0x30, 0x01, 0xda, 0x50,
0x51, 0x3b, 0xc3, 0xd9, 0xdf, 0x3d, 0xf4, 0x3a, 0xe9, 0x12, 0xde, 0xb5, 0x01, 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, 0xdf, 0x47, 0xfd, 0x31, 0xc1, 0xd7, 0x19, 0xce, 0x1f,
0x30, 0xb9, 0x9f, 0x26, 0xb3, 0x81, 0xb7, 0xd2, 0x26, 0xf8, 0x16, 0xaf, 0x69, 0x3b, 0xfe, 0x00,
0xbd, 0x6a, 0xb5, 0xbb, 0x64, 0x82, 0x6f, 0x07, 0xbb, 0x37, 0x4b, 0x74, 0x5a, 0x28, 0xb1, 0x11,
0x8d, 0xd6, 0xac, 0x8b, 0x77, 0xf3, 0x66, 0x63, 0x31, 0xe9, 0xea, 0x66, 0xa9, 0xf7, 0xeb, 0xb2,
0xc5, 0x2a, 0xc5, 0xa9, 0xac, 0x22, 0xd5, 0x54, 0x71, 0x05, 0xd2, 0x5e, 0x34, 0x76, 0x25, 0x5a,
0x33, 0xbd, 0xf1, 0x47, 0x5f, 0x09, 0x3e, 0xdf, 0xb7, 0xae, 0xcf, 0xff, 0x02, 0x00, 0x00, 0xff,
0xff, 0x89, 0xf8, 0x21, 0xa7, 0x5f, 0x03, 0x00, 0x00,
}

View File

@@ -0,0 +1,344 @@
// Code generated by protoc-gen-go.
// source: google/cloud/ml/v1beta1/prediction_service.proto
// DO NOT EDIT!
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_api3 "google.golang.org/genproto/googleapis/api/httpbody"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Request for predictions to be issued against a trained model.
//
// The body of the request is a single JSON object with a single top-level
// field:
//
// <dl>
// <dt>instances</dt>
// <dd>A JSON array containing values representing the instances to use for
// prediction.</dd>
// </dl>
//
// The structure of each element of the instances list is determined by your
// model's input definition. Instances can include named inputs or can contain
// only unlabeled values.
//
// Not all data includes named inputs. Some instances will be simple
// JSON values (boolean, number, or string). However, instances are often lists
// of simple values, or complex nested lists. Here are some examples of request
// bodies:
//
// CSV data with each row encoded as a string value:
// <pre>
// {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]}
// </pre>
// Plain text:
// <pre>
// {"instances": ["the quick brown fox", "la bruja le dio"]}
// </pre>
// Sentences encoded as lists of words (vectors of strings):
// <pre>
// {
// "instances": [
// ["the","quick","brown"],
// ["la","bruja","le"],
// ...
// ]
// }
// </pre>
// Floating point scalar values:
// <pre>
// {"instances": [0.0, 1.1, 2.2]}
// </pre>
// Vectors of integers:
// <pre>
// {
// "instances": [
// [0, 1, 2],
// [3, 4, 5],
// ...
// ]
// }
// </pre>
// Tensors (in this case, two-dimensional tensors):
// <pre>
// {
// "instances": [
// [
// [0, 1, 2],
// [3, 4, 5]
// ],
// ...
// ]
// }
// </pre>
// Images can be represented different ways. In this encoding scheme the first
// two dimensions represent the rows and columns of the image, and the third
// contains lists (vectors) of the R, G, and B values for each pixel.
// <pre>
// {
// "instances": [
// [
// [
// [138, 30, 66],
// [130, 20, 56],
// ...
// ],
// [
// [126, 38, 61],
// [122, 24, 57],
// ...
// ],
// ...
// ],
// ...
// ]
// }
// </pre>
// JSON strings must be encoded as UTF-8. To send binary data, you must
// base64-encode the data and mark it as binary. To mark a JSON string
// as binary, replace it with a JSON object with a single attribute named `b64`:
// <pre>{"b64": "..."} </pre>
// For example:
//
// Two Serialized tf.Examples (fake data, for illustrative purposes only):
// <pre>
// {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
// </pre>
// Two JPEG image byte strings (fake data, for illustrative purposes only):
// <pre>
// {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
// </pre>
// If your data includes named references, format each instance as a JSON object
// with the named references as the keys:
//
// JSON input data to be preprocessed:
// <pre>
// {
// "instances": [
// {
// "a": 1.0,
// "b": true,
// "c": "x"
// },
// {
// "a": -2.0,
// "b": false,
// "c": "y"
// }
// ]
// }
// </pre>
// Some models have an underlying TensorFlow graph that accepts multiple input
// tensors. In this case, you should use the names of JSON name/value pairs to
// identify the input tensors, as shown in the following exmaples:
//
// For a graph with input tensor aliases "tag" (string) and "image"
// (base64-encoded string):
// <pre>
// {
// "instances": [
// {
// "tag": "beach",
// "image": {"b64": "ASa8asdf"}
// },
// {
// "tag": "car",
// "image": {"b64": "JLK7ljk3"}
// }
// ]
// }
// </pre>
// For a graph with input tensor aliases "tag" (string) and "image"
// (3-dimensional array of 8-bit ints):
// <pre>
// {
// "instances": [
// {
// "tag": "beach",
// "image": [
// [
// [138, 30, 66],
// [130, 20, 56],
// ...
// ],
// [
// [126, 38, 61],
// [122, 24, 57],
// ...
// ],
// ...
// ]
// },
// {
// "tag": "car",
// "image": [
// [
// [255, 0, 102],
// [255, 0, 97],
// ...
// ],
// [
// [254, 1, 101],
// [254, 2, 93],
// ...
// ],
// ...
// ]
// },
// ...
// ]
// }
// </pre>
// If the call is successful, the response body will contain one prediction
// entry per instance in the request body. If prediction fails for any
// instance, the response body will contain no predictions and will contian
// a single error entry instead.
type PredictRequest struct {
// Required. The resource name of a model or a version.
//
// Authorization: requires `Viewer` role on the parent project.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
//
// Required. The prediction request body.
HttpBody *google_api3.HttpBody `protobuf:"bytes,2,opt,name=http_body,json=httpBody" json:"http_body,omitempty"`
}
func (m *PredictRequest) Reset() { *m = PredictRequest{} }
func (m *PredictRequest) String() string { return proto.CompactTextString(m) }
func (*PredictRequest) ProtoMessage() {}
func (*PredictRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *PredictRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *PredictRequest) GetHttpBody() *google_api3.HttpBody {
if m != nil {
return m.HttpBody
}
return nil
}
func init() {
proto.RegisterType((*PredictRequest)(nil), "google.cloud.ml.v1beta1.PredictRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for OnlinePredictionService service
type OnlinePredictionServiceClient interface {
// Performs prediction on the data in the request.
//
// **** REMOVE FROM GENERATED DOCUMENTATION
Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*google_api3.HttpBody, error)
}
type onlinePredictionServiceClient struct {
cc *grpc.ClientConn
}
func NewOnlinePredictionServiceClient(cc *grpc.ClientConn) OnlinePredictionServiceClient {
return &onlinePredictionServiceClient{cc}
}
func (c *onlinePredictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*google_api3.HttpBody, error) {
out := new(google_api3.HttpBody)
err := grpc.Invoke(ctx, "/google.cloud.ml.v1beta1.OnlinePredictionService/Predict", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for OnlinePredictionService service
type OnlinePredictionServiceServer interface {
// Performs prediction on the data in the request.
//
// **** REMOVE FROM GENERATED DOCUMENTATION
Predict(context.Context, *PredictRequest) (*google_api3.HttpBody, error)
}
func RegisterOnlinePredictionServiceServer(s *grpc.Server, srv OnlinePredictionServiceServer) {
s.RegisterService(&_OnlinePredictionService_serviceDesc, srv)
}
func _OnlinePredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PredictRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OnlinePredictionServiceServer).Predict(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.ml.v1beta1.OnlinePredictionService/Predict",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OnlinePredictionServiceServer).Predict(ctx, req.(*PredictRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OnlinePredictionService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.ml.v1beta1.OnlinePredictionService",
HandlerType: (*OnlinePredictionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Predict",
Handler: _OnlinePredictionService_Predict_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/ml/v1beta1/prediction_service.proto",
}
func init() { proto.RegisterFile("google/cloud/ml/v1beta1/prediction_service.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 312 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4a, 0x03, 0x31,
0x14, 0xc7, 0x49, 0x11, 0xb5, 0x11, 0x5c, 0x04, 0xb1, 0xb5, 0x08, 0x96, 0xba, 0xb0, 0x74, 0x91,
0xd8, 0xba, 0xb2, 0xe2, 0xa6, 0x2b, 0x77, 0x0e, 0x75, 0x21, 0xb8, 0x29, 0xe9, 0x4c, 0x48, 0x23,
0x99, 0xbc, 0x38, 0x93, 0x16, 0x8b, 0xb8, 0xf1, 0x0a, 0x3d, 0x9a, 0x57, 0xf0, 0x20, 0x92, 0x49,
0x28, 0xca, 0xe8, 0xee, 0x31, 0x6f, 0x7e, 0xef, 0xff, 0x11, 0x7c, 0x29, 0x01, 0xa4, 0x16, 0x2c,
0xd5, 0xb0, 0xcc, 0x58, 0xae, 0xd9, 0x6a, 0x38, 0x17, 0x8e, 0x0f, 0x99, 0x2d, 0x44, 0xa6, 0x52,
0xa7, 0xc0, 0xcc, 0x4a, 0x51, 0xac, 0x54, 0x2a, 0xa8, 0x2d, 0xc0, 0x01, 0x69, 0x05, 0x82, 0x56,
0x04, 0xcd, 0x35, 0x8d, 0x44, 0xe7, 0x34, 0x9e, 0xe2, 0x56, 0x31, 0x6e, 0x0c, 0x38, 0xee, 0xe9,
0x32, 0x60, 0x9d, 0x93, 0x1f, 0xdb, 0x85, 0x73, 0x76, 0x0e, 0xd9, 0x3a, 0xac, 0x7a, 0x8f, 0xf8,
0x30, 0x09, 0x6a, 0x53, 0xf1, 0xb2, 0x14, 0xa5, 0x23, 0x04, 0xef, 0x18, 0x9e, 0x8b, 0x36, 0xea,
0xa2, 0x7e, 0x73, 0x5a, 0xcd, 0x64, 0x88, 0x9b, 0x9e, 0x9b, 0x79, 0xb0, 0xdd, 0xe8, 0xa2, 0xfe,
0xc1, 0xe8, 0x88, 0x46, 0x2f, 0xdc, 0x2a, 0x7a, 0xe7, 0x9c, 0x9d, 0x40, 0xb6, 0x9e, 0xee, 0x2f,
0xe2, 0x34, 0xda, 0x20, 0xdc, 0xba, 0x37, 0x5a, 0x19, 0x91, 0x6c, 0xd3, 0x3c, 0x84, 0x30, 0xe4,
0x15, 0xef, 0xc5, 0x8f, 0xe4, 0x82, 0xfe, 0x13, 0x89, 0xfe, 0xb6, 0xd5, 0xf9, 0x53, 0xaf, 0x47,
0x3f, 0x3e, 0xbf, 0x36, 0x8d, 0x7e, 0xef, 0x7c, 0xdb, 0xdd, 0x9b, 0x37, 0x7c, 0x6b, 0x0b, 0x78,
0x16, 0xa9, 0x2b, 0xd9, 0x60, 0xf0, 0x3e, 0x8e, 0x75, 0x8e, 0xd1, 0x60, 0xb2, 0xc2, 0x67, 0x29,
0xe4, 0x35, 0x4d, 0x7f, 0x33, 0x1e, 0x98, 0x1c, 0xd7, 0xfc, 0x26, 0xbe, 0xa9, 0x04, 0x3d, 0x5d,
0x47, 0x4c, 0x82, 0xe6, 0x46, 0x52, 0x28, 0x24, 0x93, 0xc2, 0x54, 0x3d, 0xb2, 0xb0, 0xe2, 0x56,
0x95, 0xb5, 0xe7, 0xbc, 0xc9, 0xf5, 0x7c, 0xb7, 0xfa, 0xeb, 0xea, 0x3b, 0x00, 0x00, 0xff, 0xff,
0x00, 0x26, 0x25, 0x67, 0xf3, 0x01, 0x00, 0x00,
}

View File

@@ -0,0 +1,179 @@
// Code generated by protoc-gen-go.
// source: google/cloud/ml/v1beta1/project_service.proto
// DO NOT EDIT!
package ml
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Requests service account information associated with a project.
type GetConfigRequest struct {
// Required. The project name.
//
// Authorization: requires `Viewer` role on the specified project.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *GetConfigRequest) Reset() { *m = GetConfigRequest{} }
func (m *GetConfigRequest) String() string { return proto.CompactTextString(m) }
func (*GetConfigRequest) ProtoMessage() {}
func (*GetConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
func (m *GetConfigRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Returns service account information associated with a project.
type GetConfigResponse struct {
// The service account Cloud ML uses to access resources in the project.
ServiceAccount string `protobuf:"bytes,1,opt,name=service_account,json=serviceAccount" json:"service_account,omitempty"`
// The project number for `service_account`.
ServiceAccountProject int64 `protobuf:"varint,2,opt,name=service_account_project,json=serviceAccountProject" json:"service_account_project,omitempty"`
}
func (m *GetConfigResponse) Reset() { *m = GetConfigResponse{} }
func (m *GetConfigResponse) String() string { return proto.CompactTextString(m) }
func (*GetConfigResponse) ProtoMessage() {}
func (*GetConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
func (m *GetConfigResponse) GetServiceAccount() string {
if m != nil {
return m.ServiceAccount
}
return ""
}
func (m *GetConfigResponse) GetServiceAccountProject() int64 {
if m != nil {
return m.ServiceAccountProject
}
return 0
}
func init() {
proto.RegisterType((*GetConfigRequest)(nil), "google.cloud.ml.v1beta1.GetConfigRequest")
proto.RegisterType((*GetConfigResponse)(nil), "google.cloud.ml.v1beta1.GetConfigResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for ProjectManagementService service
type ProjectManagementServiceClient interface {
// Get the service account information associated with your project. You need
// this information in order to grant the service account persmissions for
// the Google Cloud Storage location where you put your model training code
// for training the model with Google Cloud Machine Learning.
GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
}
type projectManagementServiceClient struct {
cc *grpc.ClientConn
}
func NewProjectManagementServiceClient(cc *grpc.ClientConn) ProjectManagementServiceClient {
return &projectManagementServiceClient{cc}
}
func (c *projectManagementServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
out := new(GetConfigResponse)
err := grpc.Invoke(ctx, "/google.cloud.ml.v1beta1.ProjectManagementService/GetConfig", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ProjectManagementService service
type ProjectManagementServiceServer interface {
// Get the service account information associated with your project. You need
// this information in order to grant the service account persmissions for
// the Google Cloud Storage location where you put your model training code
// for training the model with Google Cloud Machine Learning.
GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
}
func RegisterProjectManagementServiceServer(s *grpc.Server, srv ProjectManagementServiceServer) {
s.RegisterService(&_ProjectManagementService_serviceDesc, srv)
}
func _ProjectManagementService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProjectManagementServiceServer).GetConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.ml.v1beta1.ProjectManagementService/GetConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProjectManagementServiceServer).GetConfig(ctx, req.(*GetConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ProjectManagementService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.ml.v1beta1.ProjectManagementService",
HandlerType: (*ProjectManagementServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetConfig",
Handler: _ProjectManagementService_GetConfig_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/ml/v1beta1/project_service.proto",
}
func init() { proto.RegisterFile("google/cloud/ml/v1beta1/project_service.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{
// 327 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x4a, 0x43, 0x31,
0x10, 0xc6, 0x79, 0x55, 0x84, 0x66, 0xe1, 0x9f, 0x88, 0xb4, 0x14, 0xc1, 0x52, 0xa4, 0xd6, 0xa2,
0x09, 0x55, 0x10, 0x54, 0x5c, 0x58, 0x17, 0xae, 0x84, 0x52, 0x77, 0x6e, 0x4a, 0xfa, 0x1c, 0xc3,
0x93, 0x24, 0x13, 0x5f, 0xd2, 0x6e, 0xc4, 0x8d, 0x27, 0x10, 0x3c, 0x87, 0xa7, 0xf1, 0x0a, 0x1e,
0x44, 0xfa, 0x92, 0x16, 0x6d, 0x11, 0xdc, 0x0d, 0x33, 0xbf, 0x6f, 0x32, 0xdf, 0x4c, 0xc8, 0xa1,
0x44, 0x94, 0x0a, 0x78, 0xaa, 0x70, 0x74, 0xcf, 0xb5, 0xe2, 0xe3, 0xce, 0x10, 0xbc, 0xe8, 0x70,
0x9b, 0xe3, 0x23, 0xa4, 0x7e, 0xe0, 0x20, 0x1f, 0x67, 0x29, 0x30, 0x9b, 0xa3, 0x47, 0x5a, 0x09,
0x38, 0x2b, 0x70, 0xa6, 0x15, 0x8b, 0x78, 0x6d, 0x3b, 0xf6, 0x11, 0x36, 0xe3, 0xc2, 0x18, 0xf4,
0xc2, 0x67, 0x68, 0x5c, 0x90, 0x35, 0x9a, 0x64, 0xfd, 0x1a, 0xfc, 0x15, 0x9a, 0x87, 0x4c, 0xf6,
0xe1, 0x69, 0x04, 0xce, 0x53, 0x4a, 0x96, 0x8d, 0xd0, 0x50, 0x4d, 0xea, 0x49, 0xab, 0xdc, 0x2f,
0xe2, 0x86, 0x27, 0x1b, 0x3f, 0x38, 0x67, 0xd1, 0x38, 0xa0, 0x7b, 0x64, 0x2d, 0x0e, 0x31, 0x10,
0x69, 0x8a, 0x23, 0xe3, 0xa3, 0x66, 0x35, 0xa6, 0x2f, 0x43, 0x96, 0x9e, 0x90, 0xca, 0x1c, 0x38,
0x88, 0x2e, 0xaa, 0xa5, 0x7a, 0xd2, 0x5a, 0xea, 0x6f, 0xfd, 0x16, 0xf4, 0x42, 0xf1, 0xe8, 0x23,
0x21, 0xd5, 0x18, 0xdf, 0x08, 0x23, 0x24, 0x68, 0x30, 0xfe, 0x36, 0xa0, 0xf4, 0x2d, 0x21, 0xe5,
0xd9, 0x4c, 0x74, 0x9f, 0xfd, 0xb1, 0x00, 0x36, 0xef, 0xaf, 0xd6, 0xfe, 0x0f, 0x1a, 0x2c, 0x36,
0x0e, 0x5e, 0x3f, 0xbf, 0xde, 0x4b, 0x4d, 0xba, 0x3b, 0x5b, 0xff, 0xf3, 0x64, 0x1f, 0x17, 0x71,
0x7c, 0xc7, 0xdb, 0x2f, 0x67, 0x72, 0xaa, 0xea, 0x3a, 0xb2, 0x93, 0xa2, 0x5e, 0x68, 0x2f, 0x6c,
0x36, 0x7d, 0xa2, 0xbb, 0x19, 0xfd, 0x44, 0x17, 0xbd, 0xc9, 0x15, 0x7a, 0xc9, 0xdd, 0x69, 0xd4,
0x48, 0x54, 0xc2, 0x48, 0x86, 0xb9, 0xe4, 0x12, 0x4c, 0x71, 0x23, 0x1e, 0x4a, 0xc2, 0x66, 0x6e,
0xe1, 0x33, 0x9c, 0x6b, 0x35, 0x5c, 0x29, 0xa8, 0xe3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76,
0x59, 0xc4, 0x91, 0x31, 0x02, 0x00, 0x00,
}

View File

@@ -0,0 +1,591 @@
// Code generated by protoc-gen-go.
// source: google/cloud/runtimeconfig/v1beta1/resources.proto
// DO NOT EDIT!
/*
Package runtimeconfig is a generated protocol buffer package.
It is generated from these files:
google/cloud/runtimeconfig/v1beta1/resources.proto
google/cloud/runtimeconfig/v1beta1/runtimeconfig.proto
It has these top-level messages:
RuntimeConfig
Variable
EndCondition
Waiter
ListConfigsRequest
ListConfigsResponse
GetConfigRequest
CreateConfigRequest
UpdateConfigRequest
DeleteConfigRequest
ListVariablesRequest
ListVariablesResponse
WatchVariableRequest
GetVariableRequest
CreateVariableRequest
UpdateVariableRequest
DeleteVariableRequest
ListWaitersRequest
ListWaitersResponse
GetWaiterRequest
CreateWaiterRequest
DeleteWaiterRequest
*/
package runtimeconfig
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/duration"
import google_protobuf2 "github.com/golang/protobuf/ptypes/timestamp"
import google_rpc "google.golang.org/genproto/googleapis/rpc/status"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// The `VariableState` describes the last known state of the variable and is
// used during a `variables().watch` call to distinguish the state of the
// variable.
type VariableState int32
const (
// Default variable state.
VariableState_VARIABLE_STATE_UNSPECIFIED VariableState = 0
// The variable was updated, while `variables().watch` was executing.
VariableState_UPDATED VariableState = 1
// The variable was deleted, while `variables().watch` was executing.
VariableState_DELETED VariableState = 2
)
var VariableState_name = map[int32]string{
0: "VARIABLE_STATE_UNSPECIFIED",
1: "UPDATED",
2: "DELETED",
}
var VariableState_value = map[string]int32{
"VARIABLE_STATE_UNSPECIFIED": 0,
"UPDATED": 1,
"DELETED": 2,
}
func (x VariableState) String() string {
return proto.EnumName(VariableState_name, int32(x))
}
func (VariableState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig
// service. A RuntimeConfig resource consists of metadata and a hierarchy of
// variables.
type RuntimeConfig struct {
// The resource name of a runtime config. The name must have the format:
//
// projects/[PROJECT_ID]/configs/[CONFIG_NAME]
//
// The `[PROJECT_ID]` must be a valid project ID, and `[CONFIG_NAME]` is an
// arbitrary name that matches RFC 1035 segment specification. The length of
// `[CONFIG_NAME]` must be less than 64 bytes.
//
// You pick the RuntimeConfig resource name, but the server will validate that
// the name adheres to this format. After you create the resource, you cannot
// change the resource's name.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// An optional description of the RuntimeConfig object.
Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
}
func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} }
func (m *RuntimeConfig) String() string { return proto.CompactTextString(m) }
func (*RuntimeConfig) ProtoMessage() {}
func (*RuntimeConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *RuntimeConfig) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *RuntimeConfig) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// Describes a single variable within a RuntimeConfig resource.
// The name denotes the hierarchical variable name. For example,
// `ports/serving_port` is a valid variable name. The variable value is an
// opaque string and only leaf variables can have values (that is, variables
// that do not have any child variables).
type Variable struct {
// The name of the variable resource, in the format:
//
// projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]
//
// The `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a
// valid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system
// file path naming.
//
// The `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and
// dashes. Slashes are used as path element separators and are not part of the
// `[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one
// non-slash character. Multiple slashes are coalesced into single slash
// character. Each path segment should follow RFC 1035 segment specification.
// The length of a `[VARIABLE_NAME]` must be less than 256 bytes.
//
// Once you create a variable, you cannot change the variable name.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The the value of the variable. It can be either a binary or a string
// value. You must specify one of either `value` or `text`. Specifying both
// will cause the server to return an error.
//
// Types that are valid to be assigned to Contents:
// *Variable_Value
// *Variable_Text
Contents isVariable_Contents `protobuf_oneof:"contents"`
// [Output Only] The time of the last variable update.
UpdateTime *google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime" json:"update_time,omitempty"`
// [Ouput only] The current state of the variable. The variable state indicates
// the outcome of the `variables().watch` call and is visible through the
// `get` and `list` calls.
State VariableState `protobuf:"varint,4,opt,name=state,enum=google.cloud.runtimeconfig.v1beta1.VariableState" json:"state,omitempty"`
}
func (m *Variable) Reset() { *m = Variable{} }
func (m *Variable) String() string { return proto.CompactTextString(m) }
func (*Variable) ProtoMessage() {}
func (*Variable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type isVariable_Contents interface {
isVariable_Contents()
}
type Variable_Value struct {
Value []byte `protobuf:"bytes,2,opt,name=value,proto3,oneof"`
}
type Variable_Text struct {
Text string `protobuf:"bytes,5,opt,name=text,oneof"`
}
func (*Variable_Value) isVariable_Contents() {}
func (*Variable_Text) isVariable_Contents() {}
func (m *Variable) GetContents() isVariable_Contents {
if m != nil {
return m.Contents
}
return nil
}
func (m *Variable) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Variable) GetValue() []byte {
if x, ok := m.GetContents().(*Variable_Value); ok {
return x.Value
}
return nil
}
func (m *Variable) GetText() string {
if x, ok := m.GetContents().(*Variable_Text); ok {
return x.Text
}
return ""
}
func (m *Variable) GetUpdateTime() *google_protobuf2.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *Variable) GetState() VariableState {
if m != nil {
return m.State
}
return VariableState_VARIABLE_STATE_UNSPECIFIED
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Variable) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Variable_OneofMarshaler, _Variable_OneofUnmarshaler, _Variable_OneofSizer, []interface{}{
(*Variable_Value)(nil),
(*Variable_Text)(nil),
}
}
func _Variable_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Variable)
// contents
switch x := m.Contents.(type) {
case *Variable_Value:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeRawBytes(x.Value)
case *Variable_Text:
b.EncodeVarint(5<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Text)
case nil:
default:
return fmt.Errorf("Variable.Contents has unexpected type %T", x)
}
return nil
}
func _Variable_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Variable)
switch tag {
case 2: // contents.value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.Contents = &Variable_Value{x}
return true, err
case 5: // contents.text
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Contents = &Variable_Text{x}
return true, err
default:
return false, nil
}
}
func _Variable_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Variable)
// contents
switch x := m.Contents.(type) {
case *Variable_Value:
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Value)))
n += len(x.Value)
case *Variable_Text:
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Text)))
n += len(x.Text)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// The condition that a Waiter resource is waiting for.
type EndCondition struct {
// The condition oneof holds the available condition types for this
// EndCondition. Currently, the only available type is Cardinality.
//
// Types that are valid to be assigned to Condition:
// *EndCondition_Cardinality_
Condition isEndCondition_Condition `protobuf_oneof:"condition"`
}
func (m *EndCondition) Reset() { *m = EndCondition{} }
func (m *EndCondition) String() string { return proto.CompactTextString(m) }
func (*EndCondition) ProtoMessage() {}
func (*EndCondition) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
type isEndCondition_Condition interface {
isEndCondition_Condition()
}
type EndCondition_Cardinality_ struct {
Cardinality *EndCondition_Cardinality `protobuf:"bytes,1,opt,name=cardinality,oneof"`
}
func (*EndCondition_Cardinality_) isEndCondition_Condition() {}
func (m *EndCondition) GetCondition() isEndCondition_Condition {
if m != nil {
return m.Condition
}
return nil
}
func (m *EndCondition) GetCardinality() *EndCondition_Cardinality {
if x, ok := m.GetCondition().(*EndCondition_Cardinality_); ok {
return x.Cardinality
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*EndCondition) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _EndCondition_OneofMarshaler, _EndCondition_OneofUnmarshaler, _EndCondition_OneofSizer, []interface{}{
(*EndCondition_Cardinality_)(nil),
}
}
func _EndCondition_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*EndCondition)
// condition
switch x := m.Condition.(type) {
case *EndCondition_Cardinality_:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Cardinality); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("EndCondition.Condition has unexpected type %T", x)
}
return nil
}
func _EndCondition_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*EndCondition)
switch tag {
case 1: // condition.cardinality
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(EndCondition_Cardinality)
err := b.DecodeMessage(msg)
m.Condition = &EndCondition_Cardinality_{msg}
return true, err
default:
return false, nil
}
}
func _EndCondition_OneofSizer(msg proto.Message) (n int) {
m := msg.(*EndCondition)
// condition
switch x := m.Condition.(type) {
case *EndCondition_Cardinality_:
s := proto.Size(x.Cardinality)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A Cardinality condition for the Waiter resource. A cardinality condition is
// met when the number of variables under a specified path prefix reaches a
// predefined number. For example, if you set a Cardinality condition where
// the `path` is set to `/foo` and the number of paths is set to 2, the
// following variables would meet the condition in a RuntimeConfig resource:
//
// + `/foo/variable1 = "value1"`
// + `/foo/variable2 = "value2"`
// + `/bar/variable3 = "value3"`
//
// It would not would not satisify the same condition with the `number` set to
// 3, however, because there is only 2 paths that start with `/foo`.
// Cardinality conditions are recursive; all subtrees under the specific
// path prefix are counted.
type EndCondition_Cardinality struct {
// The root of the variable subtree to monitor. For example, `/foo`.
Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
// The number variables under the `path` that must exist to meet this
// condition. Defaults to 1 if not specified.
Number int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
}
func (m *EndCondition_Cardinality) Reset() { *m = EndCondition_Cardinality{} }
func (m *EndCondition_Cardinality) String() string { return proto.CompactTextString(m) }
func (*EndCondition_Cardinality) ProtoMessage() {}
func (*EndCondition_Cardinality) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
func (m *EndCondition_Cardinality) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
func (m *EndCondition_Cardinality) GetNumber() int32 {
if m != nil {
return m.Number
}
return 0
}
// A Waiter resource waits for some end condition within a RuntimeConfig resource
// to be met before it returns. For example, assume you have a distributed
// system where each node writes to a Variable resource indidicating the node's
// readiness as part of the startup process.
//
// You then configure a Waiter resource with the success condition set to wait
// until some number of nodes have checked in. Afterwards, your application
// runs some arbitrary code after the condition has been met and the waiter
// returns successfully.
//
// Once created, a Waiter resource is immutable.
//
// To learn more about using waiters, read the
// [Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter)
// documentation.
type Waiter struct {
// The name of the Waiter resource, in the format:
//
// projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]
//
// The `[PROJECT_ID]` must be a valid Google Cloud project ID,
// the `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the
// `[WAITER_NAME]` must match RFC 1035 segment specification, and the length
// of `[WAITER_NAME]` must be less than 64 bytes.
//
// After you create a Waiter resource, you cannot change the resource name.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// [Required] Specifies the timeout of the waiter in seconds, beginning from
// the instant that `waiters().create` method is called. If this time elapses
// before the success or failure conditions are met, the waiter fails and sets
// the `error` code to `DEADLINE_EXCEEDED`.
Timeout *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=timeout" json:"timeout,omitempty"`
// [Optional] The failure condition of this waiter. If this condition is met,
// `done` will be set to `true` and the `error` code will be set to `ABORTED`.
// The failure condition takes precedence over the success condition. If both
// conditions are met, a failure will be indicated. This value is optional; if
// no failure condition is set, the only failure scenario will be a timeout.
Failure *EndCondition `protobuf:"bytes,3,opt,name=failure" json:"failure,omitempty"`
// [Required] The success condition. If this condition is met, `done` will be
// set to `true` and the `error` value will remain unset. The failure condition
// takes precedence over the success condition. If both conditions are met, a
// failure will be indicated.
Success *EndCondition `protobuf:"bytes,4,opt,name=success" json:"success,omitempty"`
// [Output Only] The instant at which this Waiter resource was created. Adding
// the value of `timeout` to this instant yields the timeout deadline for the
// waiter.
CreateTime *google_protobuf2.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
// [Output Only] If the value is `false`, it means the waiter is still waiting
// for one of its conditions to be met.
//
// If true, the waiter has finished. If the waiter finished due to a timeout
// or failure, `error` will be set.
Done bool `protobuf:"varint,6,opt,name=done" json:"done,omitempty"`
// [Output Only] If the waiter ended due to a failure or timeout, this value
// will be set.
Error *google_rpc.Status `protobuf:"bytes,7,opt,name=error" json:"error,omitempty"`
}
func (m *Waiter) Reset() { *m = Waiter{} }
func (m *Waiter) String() string { return proto.CompactTextString(m) }
func (*Waiter) ProtoMessage() {}
func (*Waiter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Waiter) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Waiter) GetTimeout() *google_protobuf1.Duration {
if m != nil {
return m.Timeout
}
return nil
}
func (m *Waiter) GetFailure() *EndCondition {
if m != nil {
return m.Failure
}
return nil
}
func (m *Waiter) GetSuccess() *EndCondition {
if m != nil {
return m.Success
}
return nil
}
func (m *Waiter) GetCreateTime() *google_protobuf2.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Waiter) GetDone() bool {
if m != nil {
return m.Done
}
return false
}
func (m *Waiter) GetError() *google_rpc.Status {
if m != nil {
return m.Error
}
return nil
}
func init() {
proto.RegisterType((*RuntimeConfig)(nil), "google.cloud.runtimeconfig.v1beta1.RuntimeConfig")
proto.RegisterType((*Variable)(nil), "google.cloud.runtimeconfig.v1beta1.Variable")
proto.RegisterType((*EndCondition)(nil), "google.cloud.runtimeconfig.v1beta1.EndCondition")
proto.RegisterType((*EndCondition_Cardinality)(nil), "google.cloud.runtimeconfig.v1beta1.EndCondition.Cardinality")
proto.RegisterType((*Waiter)(nil), "google.cloud.runtimeconfig.v1beta1.Waiter")
proto.RegisterEnum("google.cloud.runtimeconfig.v1beta1.VariableState", VariableState_name, VariableState_value)
}
func init() { proto.RegisterFile("google/cloud/runtimeconfig/v1beta1/resources.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 615 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x5d, 0x6f, 0xd3, 0x3c,
0x14, 0xc7, 0x9b, 0x3e, 0x7d, 0xd9, 0x4e, 0xb6, 0x47, 0x93, 0x85, 0x46, 0xa8, 0xd0, 0xa8, 0x7a,
0x81, 0x2a, 0x2e, 0x12, 0xda, 0x5d, 0xa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60, 0xac, 0x43, 0x96, 0x2d, 0x93, 0xe0, 0xf0, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61,
0xe4, 0x09, 0x63, 0x10, 0x05, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,172 @@
// Code generated by protoc-gen-go.
// source: google/cloud/vision/v1/geometry.proto
// DO NOT EDIT!
/*
Package vision is a generated protocol buffer package.
It is generated from these files:
google/cloud/vision/v1/geometry.proto
google/cloud/vision/v1/image_annotator.proto
google/cloud/vision/v1/text_annotation.proto
google/cloud/vision/v1/web_detection.proto
It has these top-level messages:
Vertex
BoundingPoly
Position
Feature
ImageSource
Image
FaceAnnotation
LocationInfo
Property
EntityAnnotation
SafeSearchAnnotation
LatLongRect
ColorInfo
DominantColorsAnnotation
ImageProperties
CropHint
CropHintsAnnotation
CropHintsParams
ImageContext
AnnotateImageRequest
AnnotateImageResponse
BatchAnnotateImagesRequest
BatchAnnotateImagesResponse
TextAnnotation
Page
Block
Paragraph
Word
Symbol
WebDetection
*/
package vision
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A vertex represents a 2D point in the image.
// NOTE: the vertex coordinates are in the same scale as the original image.
type Vertex struct {
// X coordinate.
X int32 `protobuf:"varint,1,opt,name=x" json:"x,omitempty"`
// Y coordinate.
Y int32 `protobuf:"varint,2,opt,name=y" json:"y,omitempty"`
}
func (m *Vertex) Reset() { *m = Vertex{} }
func (m *Vertex) String() string { return proto.CompactTextString(m) }
func (*Vertex) ProtoMessage() {}
func (*Vertex) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Vertex) GetX() int32 {
if m != nil {
return m.X
}
return 0
}
func (m *Vertex) GetY() int32 {
if m != nil {
return m.Y
}
return 0
}
// A bounding polygon for the detected image annotation.
type BoundingPoly struct {
// The bounding polygon vertices.
Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices" json:"vertices,omitempty"`
}
func (m *BoundingPoly) Reset() { *m = BoundingPoly{} }
func (m *BoundingPoly) String() string { return proto.CompactTextString(m) }
func (*BoundingPoly) ProtoMessage() {}
func (*BoundingPoly) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *BoundingPoly) GetVertices() []*Vertex {
if m != nil {
return m.Vertices
}
return nil
}
// A 3D position in the image, used primarily for Face detection landmarks.
// A valid Position must have both x and y coordinates.
// The position coordinates are in the same scale as the original image.
type Position struct {
// X coordinate.
X float32 `protobuf:"fixed32,1,opt,name=x" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y" json:"y,omitempty"`
// Z coordinate (or depth).
Z float32 `protobuf:"fixed32,3,opt,name=z" json:"z,omitempty"`
}
func (m *Position) Reset() { *m = Position{} }
func (m *Position) String() string { return proto.CompactTextString(m) }
func (*Position) ProtoMessage() {}
func (*Position) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Position) GetX() float32 {
if m != nil {
return m.X
}
return 0
}
func (m *Position) GetY() float32 {
if m != nil {
return m.Y
}
return 0
}
func (m *Position) GetZ() float32 {
if m != nil {
return m.Z
}
return 0
}
func init() {
proto.RegisterType((*Vertex)(nil), "google.cloud.vision.v1.Vertex")
proto.RegisterType((*BoundingPoly)(nil), "google.cloud.vision.v1.BoundingPoly")
proto.RegisterType((*Position)(nil), "google.cloud.vision.v1.Position")
}
func init() { proto.RegisterFile("google/cloud/vision/v1/geometry.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 237 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0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xfb, 0xf3, 0x51, 0x24, 0x1e, 0x96, 0x86, 0x24, 0x5b, 0x52, 0x84, 0x26, 0x9d, 0x42, 0xe5,
0xaf, 0xe5, 0x46, 0xbb, 0xbf, 0x47, 0x7b, 0xca, 0xaf, 0x4f, 0x80, 0x8f, 0x71, 0x72, 0xef, 0xbf,
0x02, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x04, 0x38, 0x95, 0x5f, 0x01, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,538 @@
// Code generated by protoc-gen-go.
// source: google/cloud/vision/v1/text_annotation.proto
// DO NOT EDIT!
package vision
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Enum to denote the type of break found. New line, space etc.
type TextAnnotation_DetectedBreak_BreakType int32
const (
// Unknown break label type.
TextAnnotation_DetectedBreak_UNKNOWN TextAnnotation_DetectedBreak_BreakType = 0
// Regular space.
TextAnnotation_DetectedBreak_SPACE TextAnnotation_DetectedBreak_BreakType = 1
// Sure space (very wide).
TextAnnotation_DetectedBreak_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 2
// Line-wrapping break.
TextAnnotation_DetectedBreak_EOL_SURE_SPACE TextAnnotation_DetectedBreak_BreakType = 3
// End-line hyphen that is not present in text; does
TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
// not co-occur with SPACE, LEADER_SPACE, or
// LINE_BREAK.
// Line break that ends a paragraph.
TextAnnotation_DetectedBreak_LINE_BREAK TextAnnotation_DetectedBreak_BreakType = 5
)
var TextAnnotation_DetectedBreak_BreakType_name = map[int32]string{
0: "UNKNOWN",
1: "SPACE",
2: "SURE_SPACE",
3: "EOL_SURE_SPACE",
4: "HYPHEN",
5: "LINE_BREAK",
}
var TextAnnotation_DetectedBreak_BreakType_value = map[string]int32{
"UNKNOWN": 0,
"SPACE": 1,
"SURE_SPACE": 2,
"EOL_SURE_SPACE": 3,
"HYPHEN": 4,
"LINE_BREAK": 5,
}
func (x TextAnnotation_DetectedBreak_BreakType) String() string {
return proto.EnumName(TextAnnotation_DetectedBreak_BreakType_name, int32(x))
}
func (TextAnnotation_DetectedBreak_BreakType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor2, []int{0, 1, 0}
}
// Type of a block (text, image etc) as identified by OCR.
type Block_BlockType int32
const (
// Unknown block type.
Block_UNKNOWN Block_BlockType = 0
// Regular text block.
Block_TEXT Block_BlockType = 1
// Table block.
Block_TABLE Block_BlockType = 2
// Image block.
Block_PICTURE Block_BlockType = 3
// Horizontal/vertical line box.
Block_RULER Block_BlockType = 4
// Barcode block.
Block_BARCODE Block_BlockType = 5
)
var Block_BlockType_name = map[int32]string{
0: "UNKNOWN",
1: "TEXT",
2: "TABLE",
3: "PICTURE",
4: "RULER",
5: "BARCODE",
}
var Block_BlockType_value = map[string]int32{
"UNKNOWN": 0,
"TEXT": 1,
"TABLE": 2,
"PICTURE": 3,
"RULER": 4,
"BARCODE": 5,
}
func (x Block_BlockType) String() string {
return proto.EnumName(Block_BlockType_name, int32(x))
}
func (Block_BlockType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{2, 0} }
// TextAnnotation contains a structured representation of OCR extracted text.
// The hierarchy of an OCR extracted text structure is like this:
// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
// Each structural component, starting from Page, may further have their own
// properties. Properties describe detected languages, breaks etc.. Please
// refer to the [google.cloud.vision.v1.TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message
// definition below for more detail.
type TextAnnotation struct {
// List of pages detected by OCR.
Pages []*Page `protobuf:"bytes,1,rep,name=pages" json:"pages,omitempty"`
// UTF-8 text detected on the pages.
Text string `protobuf:"bytes,2,opt,name=text" json:"text,omitempty"`
}
func (m *TextAnnotation) Reset() { *m = TextAnnotation{} }
func (m *TextAnnotation) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation) ProtoMessage() {}
func (*TextAnnotation) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *TextAnnotation) GetPages() []*Page {
if m != nil {
return m.Pages
}
return nil
}
func (m *TextAnnotation) GetText() string {
if m != nil {
return m.Text
}
return ""
}
// Detected language for a structural component.
type TextAnnotation_DetectedLanguage struct {
// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode" json:"language_code,omitempty"`
// Confidence of detected language. Range [0, 1].
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence" json:"confidence,omitempty"`
}
func (m *TextAnnotation_DetectedLanguage) Reset() { *m = TextAnnotation_DetectedLanguage{} }
func (m *TextAnnotation_DetectedLanguage) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation_DetectedLanguage) ProtoMessage() {}
func (*TextAnnotation_DetectedLanguage) Descriptor() ([]byte, []int) {
return fileDescriptor2, []int{0, 0}
}
func (m *TextAnnotation_DetectedLanguage) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func (m *TextAnnotation_DetectedLanguage) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// Detected start or end of a structural component.
type TextAnnotation_DetectedBreak struct {
Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,enum=google.cloud.vision.v1.TextAnnotation_DetectedBreak_BreakType" json:"type,omitempty"`
// True if break prepends the element.
IsPrefix bool `protobuf:"varint,2,opt,name=is_prefix,json=isPrefix" json:"is_prefix,omitempty"`
}
func (m *TextAnnotation_DetectedBreak) Reset() { *m = TextAnnotation_DetectedBreak{} }
func (m *TextAnnotation_DetectedBreak) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation_DetectedBreak) ProtoMessage() {}
func (*TextAnnotation_DetectedBreak) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 1} }
func (m *TextAnnotation_DetectedBreak) GetType() TextAnnotation_DetectedBreak_BreakType {
if m != nil {
return m.Type
}
return TextAnnotation_DetectedBreak_UNKNOWN
}
func (m *TextAnnotation_DetectedBreak) GetIsPrefix() bool {
if m != nil {
return m.IsPrefix
}
return false
}
// Additional information detected on the structural component.
type TextAnnotation_TextProperty struct {
// A list of detected languages together with confidence.
DetectedLanguages []*TextAnnotation_DetectedLanguage `protobuf:"bytes,1,rep,name=detected_languages,json=detectedLanguages" json:"detected_languages,omitempty"`
// Detected start or end of a text segment.
DetectedBreak *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak" json:"detected_break,omitempty"`
}
func (m *TextAnnotation_TextProperty) Reset() { *m = TextAnnotation_TextProperty{} }
func (m *TextAnnotation_TextProperty) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation_TextProperty) ProtoMessage() {}
func (*TextAnnotation_TextProperty) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 2} }
func (m *TextAnnotation_TextProperty) GetDetectedLanguages() []*TextAnnotation_DetectedLanguage {
if m != nil {
return m.DetectedLanguages
}
return nil
}
func (m *TextAnnotation_TextProperty) GetDetectedBreak() *TextAnnotation_DetectedBreak {
if m != nil {
return m.DetectedBreak
}
return nil
}
// Detected page from OCR.
type Page struct {
// Additional information detected on the page.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
// Page width in pixels.
Width int32 `protobuf:"varint,2,opt,name=width" json:"width,omitempty"`
// Page height in pixels.
Height int32 `protobuf:"varint,3,opt,name=height" json:"height,omitempty"`
// List of blocks of text, images etc on this page.
Blocks []*Block `protobuf:"bytes,4,rep,name=blocks" json:"blocks,omitempty"`
}
func (m *Page) Reset() { *m = Page{} }
func (m *Page) String() string { return proto.CompactTextString(m) }
func (*Page) ProtoMessage() {}
func (*Page) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *Page) GetProperty() *TextAnnotation_TextProperty {
if m != nil {
return m.Property
}
return nil
}
func (m *Page) GetWidth() int32 {
if m != nil {
return m.Width
}
return 0
}
func (m *Page) GetHeight() int32 {
if m != nil {
return m.Height
}
return 0
}
func (m *Page) GetBlocks() []*Block {
if m != nil {
return m.Blocks
}
return nil
}
// Logical element on the page.
type Block struct {
// Additional information detected for the block.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
// The bounding box for the block.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// * when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// * when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertice order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
// List of paragraphs in this block (if this blocks is of type text).
Paragraphs []*Paragraph `protobuf:"bytes,3,rep,name=paragraphs" json:"paragraphs,omitempty"`
// Detected block type (text, image etc) for this block.
BlockType Block_BlockType `protobuf:"varint,4,opt,name=block_type,json=blockType,enum=google.cloud.vision.v1.Block_BlockType" json:"block_type,omitempty"`
}
func (m *Block) Reset() { *m = Block{} }
func (m *Block) String() string { return proto.CompactTextString(m) }
func (*Block) ProtoMessage() {}
func (*Block) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
func (m *Block) GetProperty() *TextAnnotation_TextProperty {
if m != nil {
return m.Property
}
return nil
}
func (m *Block) GetBoundingBox() *BoundingPoly {
if m != nil {
return m.BoundingBox
}
return nil
}
func (m *Block) GetParagraphs() []*Paragraph {
if m != nil {
return m.Paragraphs
}
return nil
}
func (m *Block) GetBlockType() Block_BlockType {
if m != nil {
return m.BlockType
}
return Block_UNKNOWN
}
// Structural unit of text representing a number of words in certain order.
type Paragraph struct {
// Additional information detected for the paragraph.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
// The bounding box for the paragraph.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// * when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// * when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertice order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
// List of words in this paragraph.
Words []*Word `protobuf:"bytes,3,rep,name=words" json:"words,omitempty"`
}
func (m *Paragraph) Reset() { *m = Paragraph{} }
func (m *Paragraph) String() string { return proto.CompactTextString(m) }
func (*Paragraph) ProtoMessage() {}
func (*Paragraph) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (m *Paragraph) GetProperty() *TextAnnotation_TextProperty {
if m != nil {
return m.Property
}
return nil
}
func (m *Paragraph) GetBoundingBox() *BoundingPoly {
if m != nil {
return m.BoundingBox
}
return nil
}
func (m *Paragraph) GetWords() []*Word {
if m != nil {
return m.Words
}
return nil
}
// A word representation.
type Word struct {
// Additional information detected for the word.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
// The bounding box for the word.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// * when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// * when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertice order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
// List of symbols in the word.
// The order of the symbols follows the natural reading order.
Symbols []*Symbol `protobuf:"bytes,3,rep,name=symbols" json:"symbols,omitempty"`
}
func (m *Word) Reset() { *m = Word{} }
func (m *Word) String() string { return proto.CompactTextString(m) }
func (*Word) ProtoMessage() {}
func (*Word) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
func (m *Word) GetProperty() *TextAnnotation_TextProperty {
if m != nil {
return m.Property
}
return nil
}
func (m *Word) GetBoundingBox() *BoundingPoly {
if m != nil {
return m.BoundingBox
}
return nil
}
func (m *Word) GetSymbols() []*Symbol {
if m != nil {
return m.Symbols
}
return nil
}
// A single symbol representation.
type Symbol struct {
// Additional information detected for the symbol.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
// The bounding box for the symbol.
// The vertices are in the order of top-left, top-right, bottom-right,
// bottom-left. When a rotation of the bounding box is detected the rotation
// is represented as around the top-left corner as defined when the text is
// read in the 'natural' orientation.
// For example:
// * when the text is horizontal it might look like:
// 0----1
// | |
// 3----2
// * when it's rotated 180 degrees around the top-left corner it becomes:
// 2----3
// | |
// 1----0
// and the vertice order will still be (0, 1, 2, 3).
BoundingBox *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_box,json=boundingBox" json:"bounding_box,omitempty"`
// The actual UTF-8 representation of the symbol.
Text string `protobuf:"bytes,3,opt,name=text" json:"text,omitempty"`
}
func (m *Symbol) Reset() { *m = Symbol{} }
func (m *Symbol) String() string { return proto.CompactTextString(m) }
func (*Symbol) ProtoMessage() {}
func (*Symbol) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
func (m *Symbol) GetProperty() *TextAnnotation_TextProperty {
if m != nil {
return m.Property
}
return nil
}
func (m *Symbol) GetBoundingBox() *BoundingPoly {
if m != nil {
return m.BoundingBox
}
return nil
}
func (m *Symbol) GetText() string {
if m != nil {
return m.Text
}
return ""
}
func init() {
proto.RegisterType((*TextAnnotation)(nil), "google.cloud.vision.v1.TextAnnotation")
proto.RegisterType((*TextAnnotation_DetectedLanguage)(nil), "google.cloud.vision.v1.TextAnnotation.DetectedLanguage")
proto.RegisterType((*TextAnnotation_DetectedBreak)(nil), "google.cloud.vision.v1.TextAnnotation.DetectedBreak")
proto.RegisterType((*TextAnnotation_TextProperty)(nil), "google.cloud.vision.v1.TextAnnotation.TextProperty")
proto.RegisterType((*Page)(nil), "google.cloud.vision.v1.Page")
proto.RegisterType((*Block)(nil), "google.cloud.vision.v1.Block")
proto.RegisterType((*Paragraph)(nil), "google.cloud.vision.v1.Paragraph")
proto.RegisterType((*Word)(nil), "google.cloud.vision.v1.Word")
proto.RegisterType((*Symbol)(nil), "google.cloud.vision.v1.Symbol")
proto.RegisterEnum("google.cloud.vision.v1.TextAnnotation_DetectedBreak_BreakType", TextAnnotation_DetectedBreak_BreakType_name, TextAnnotation_DetectedBreak_BreakType_value)
proto.RegisterEnum("google.cloud.vision.v1.Block_BlockType", Block_BlockType_name, Block_BlockType_value)
}
func init() { proto.RegisterFile("google/cloud/vision/v1/text_annotation.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 744 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x4f, 0x6f, 0xd3, 0x4e,
0x10, 0xfd, 0xb9, 0xb1, 0xd3, 0x78, 0xd2, 0x46, 0xfe, 0x2d, 0xa8, 0x8a, 0x42, 0xa9, 0x8a, 0x01,
0xd1, 0x03, 0x72, 0xd4, 0x14, 0x04, 0x12, 0x08, 0x29, 0x4e, 0x0d, 0xad, 0x1a, 0x25, 0xd6, 0x36,
0x51, 0xf9, 0x73, 0xb0, 0xfc, 0x67, 0xeb, 0x58, 0x4d, 0xbd, 0x96, 0xed, 0xb6, 0xc9, 0x8d, 0x4f,
0xc5, 0x89, 0x6f, 0xc1, 0x09, 0xee, 0x9c, 0xb9, 0x72, 0x44, 0x5e, 0xdb, 0x69, 0x52, 0x61, 0x04,
0x88, 0x43, 0x2f, 0xd6, 0xce, 0xe4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 0xa7,
0x50, 0xf9, 0x0b, 0x07, 0x7c, 0x12, 0x5f, 0x63, 0x5b, 0x4f, 0x61, 0x39, 0x9a, 0x9e, 0x5a, 0x74,
0x9c, 0x1b, 0xdb, 0x28, 0xe2, 0x38, 0x64, 0x30, 0x9c, 0xc3, 0xe5, 0x0f, 0x1c, 0x94, 0xd3, 0xdc,
0x35, 0xb6, 0x97, 0x8f, 0xb2, 0xd2, 0xe5, 0x28, 0x53, 0x63, 0x68, 0xd8, 0xf4, 0xb4, 0x80, 0x4b,
0xbd, 0xb1, 0xa8, 0x50, 0x4f, 0x06, 0xab, 0xce, 0xbd, 0x7d, 0x9e, 0xc1, 0x5d, 0x9a, 0xbc, 0xd5,
0x0a, 0x0d, 0xdd, 0xa6, 0x4b, 0x7c, 0x36, 0x76, 0x9b, 0xe9, 0x4f, 0x66, 0xe0, 0x45, 0x57, 0x07,
0xf4, 0xb3, 0x74, 0xf5, 0x9d, 0xe3, 0xac, 0x32, 0xc3, 0xee, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff,
0x80, 0x29, 0x2a, 0x3b, 0x2f, 0x08, 0x00, 0x00,
}

View File

@@ -0,0 +1,194 @@
// Code generated by protoc-gen-go.
// source: google/cloud/vision/v1/web_detection.proto
// DO NOT EDIT!
package vision
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Relevant information for the image from the Internet.
type WebDetection struct {
// Deduced entities from similar images on the Internet.
WebEntities []*WebDetection_WebEntity `protobuf:"bytes,1,rep,name=web_entities,json=webEntities" json:"web_entities,omitempty"`
// Fully matching images from the Internet.
// They're definite neardups and most often a copy of the query image with
// merely a size change.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages" json:"full_matching_images,omitempty"`
// Partial matching images from the Internet.
// Those images are similar enough to share some key-point features. For
// example an original image will likely have partial matching for its crops.
PartialMatchingImages []*WebDetection_WebImage `protobuf:"bytes,3,rep,name=partial_matching_images,json=partialMatchingImages" json:"partial_matching_images,omitempty"`
// Web pages containing the matching images from the Internet.
PagesWithMatchingImages []*WebDetection_WebPage `protobuf:"bytes,4,rep,name=pages_with_matching_images,json=pagesWithMatchingImages" json:"pages_with_matching_images,omitempty"`
}
func (m *WebDetection) Reset() { *m = WebDetection{} }
func (m *WebDetection) String() string { return proto.CompactTextString(m) }
func (*WebDetection) ProtoMessage() {}
func (*WebDetection) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *WebDetection) GetWebEntities() []*WebDetection_WebEntity {
if m != nil {
return m.WebEntities
}
return nil
}
func (m *WebDetection) GetFullMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.FullMatchingImages
}
return nil
}
func (m *WebDetection) GetPartialMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.PartialMatchingImages
}
return nil
}
func (m *WebDetection) GetPagesWithMatchingImages() []*WebDetection_WebPage {
if m != nil {
return m.PagesWithMatchingImages
}
return nil
}
// Entity deduced from similar images on the Internet.
type WebDetection_WebEntity struct {
// Opaque entity ID.
EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId" json:"entity_id,omitempty"`
// Overall relevancy score for the entity.
// Not normalized and not comparable across different image queries.
Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
// Canonical description of the entity, in English.
Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
}
func (m *WebDetection_WebEntity) Reset() { *m = WebDetection_WebEntity{} }
func (m *WebDetection_WebEntity) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebEntity) ProtoMessage() {}
func (*WebDetection_WebEntity) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} }
func (m *WebDetection_WebEntity) GetEntityId() string {
if m != nil {
return m.EntityId
}
return ""
}
func (m *WebDetection_WebEntity) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
func (m *WebDetection_WebEntity) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// Metadata for online images.
type WebDetection_WebImage struct {
// The result image URL.
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
// Overall relevancy score for the image.
// Not normalized and not comparable across different image queries.
Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
}
func (m *WebDetection_WebImage) Reset() { *m = WebDetection_WebImage{} }
func (m *WebDetection_WebImage) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebImage) ProtoMessage() {}
func (*WebDetection_WebImage) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 1} }
func (m *WebDetection_WebImage) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *WebDetection_WebImage) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
// Metadata for web pages.
type WebDetection_WebPage struct {
// The result web page URL.
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
// Overall relevancy score for the web page.
// Not normalized and not comparable across different image queries.
Score float32 `protobuf:"fixed32,2,opt,name=score" json:"score,omitempty"`
}
func (m *WebDetection_WebPage) Reset() { *m = WebDetection_WebPage{} }
func (m *WebDetection_WebPage) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebPage) ProtoMessage() {}
func (*WebDetection_WebPage) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 2} }
func (m *WebDetection_WebPage) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *WebDetection_WebPage) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
func init() {
proto.RegisterType((*WebDetection)(nil), "google.cloud.vision.v1.WebDetection")
proto.RegisterType((*WebDetection_WebEntity)(nil), "google.cloud.vision.v1.WebDetection.WebEntity")
proto.RegisterType((*WebDetection_WebImage)(nil), "google.cloud.vision.v1.WebDetection.WebImage")
proto.RegisterType((*WebDetection_WebPage)(nil), "google.cloud.vision.v1.WebDetection.WebPage")
}
func init() { proto.RegisterFile("google/cloud/vision/v1/web_detection.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 383 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x4f, 0xea, 0x40,
0x14, 0x85, 0x53, 0xca, 0x7b, 0x0f, 0x06, 0x16, 0xcf, 0x09, 0x4a, 0x53, 0x5d, 0x34, 0xae, 0x88,
0xd1, 0x69, 0xc0, 0xa5, 0xae, 0x88, 0x2e, 0x58, 0x98, 0x60, 0x37, 0x24, 0x6e, 0xea, 0xd0, 0x8e,
0xc3, 0x4d, 0xca, 0x4c, 0xd3, 0x19, 0x20, 0xfc, 0x58, 0xff, 0x87, 0x4b, 0x33, 0xd3, 0x62, 0x10,
0x30, 0x21, 0xee, 0xee, 0xdc, 0x9e, 0xf3, 0x9d, 0xf6, 0xf6, 0x0e, 0xba, 0xe2, 0x52, 0xf2, 0x8c,
0x85, 0x49, 0x26, 0x17, 0x69, 0xb8, 0x04, 0x05, 0x52, 0x84, 0xcb, 0x7e, 0xb8, 0x62, 0xd3, 0x38,
0x65, 0x9a, 0x25, 0x1a, 0xa4, 0x20, 0x79, 0x21, 0xb5, 0xc4, 0x67, 0xa5, 0x96, 0x58, 0x2d, 0x29,
0xb5, 0x64, 0xd9, 0xf7, 0x2f, 0x2a, 0x06, 0xcd, 0x21, 0xa4, 0x42, 0x48, 0x4d, 0x8d, 0x49, 0x95,
0xae, 0xcb, 0xf7, 0x3a, 0x6a, 0x4f, 0xd8, 0xf4, 0x61, 0x03, 0xc3, 0xcf, 0xa8, 0x6d, 0xe8, 0x4c,
0x68, 0xd0, 0xc0, 0x94, 0xe7, 0x04, 0x6e, 0xaf, 0x35, 0x20, 0xe4, 0x30, 0x9d, 0x6c, 0x7b, 0xcd,
0xe1, 0xd1, 0xf8, 0xd6, 0x51, 0x6b, 0x55, 0x95, 0xc0, 0x14, 0x8e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